]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/i915_drv.h
drm/i915: Add distrust_bios_wm flag to dev_priv (v2)
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 12 May 2016 14:06:02 +0000 (07:06 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 13 May 2016 14:33:54 +0000 (07:33 -0700)
commit279e99d76e6097ee7b531114777fa9b030496d81
tree530832355fdc4835bd4c1794d519ad964664598a
parentc107acfeb03187873657ccc8af4fc5c704b3626b
drm/i915: Add distrust_bios_wm flag to dev_priv (v2)

SKL-style platforms can't fully trust the watermark/DDB settings
programmed by the BIOS and need to do extra sanitization on their first
atomic update.  Add a flag to dev_priv that is set during hardware
readout and cleared at the end of the first commit.

Note that for the somewhat common case where everything is turned off
when the driver starts up, we don't need to bother with a recompute...we
know exactly what the DDB should be (all zero's) so just setup the DDB
directly in that case.

v2:
 - Move clearing of distrust_bios_wm up below the swap_state call since
   it's a more natural / self-explanatory location.  (Maarten)
 - Use dev_priv->active_crtcs to test whether any CRTC's are turned on
   during HW WM readout rather than trying to count the active CRTC's
   again ourselves.  (Maarten)

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-9-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c