drm/i915/gen9+: Kill off hw_ddb from intel_crtc.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 8 Nov 2016 12:55:35 +0000 (13:55 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 15 Nov 2016 12:13:47 +0000 (13:13 +0100)
commit5eff503b9d9665e957c174e40ba6b6dcd3d305b8
tree223c12a76402907de4044794cc4c488b1bd1ad3b
parent512b552798bfa3c4e665c34b9618d05c71b753ad
drm/i915/gen9+: Kill off hw_ddb from intel_crtc.

dev_priv->hw_ddb is only used by skl_update_crtcs, but the ddb
allocation for each pipe is calculated in crtc_state.

We can rid of the global member by looking at crtc_state.
Do this by saving all active old ddb allocations from the old crtc_state
in an array, and then point them to the new allocation every time we update
a crtc.

This will allow us to keep track of the intermediate ddb allocations,
which is what hw_ddb was previously used for. With hw_ddb gone all
SKL-style watermark values are properly maintained only in crtc_state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-5-git-send-email-maarten.lankhorst@linux.intel.com
[mlankhorst: Reword commit message.]
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c