drm/i915/gen9: Make skl_pipe_wm_get_hw_state() reusable
authorcpaul@redhat.com <cpaul@redhat.com>
Fri, 14 Oct 2016 21:31:55 +0000 (17:31 -0400)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 19 Oct 2016 20:25:33 +0000 (18:25 -0200)
commitbf9d99ad17ff3d85dc8c807063f76560587d983a
tree3b6813acedfe42a8240dae327ab2117f978fdf12
parent413fc530c5b2fbf8c5ff926aaa18d7597463c055
drm/i915/gen9: Make skl_pipe_wm_get_hw_state() reusable

There's not much of a reason this should have the locations to read out
the hardware state hardcoded, so allow the caller to specify the
location and add this function to intel_drv.h. As well, we're going to
need this function to be reusable for the next patch.

Changes since v1:
- Fix accidental behavior change in the code that Paulo pointed out

Signed-off-by: Lyude <cpaul@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1476480722-13015-8-git-send-email-cpaul@redhat.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c