]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_display.c
drm/i915: Skip modeset for cdclk changes if possible
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 10 Jun 2019 07:14:00 +0000 (09:14 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:18:49 +0000 (14:18 +0200)
commit163e0af53acf87c288b2577879c08c0951a3666e
tree9ed444843b96b03a3360b1fbcb389c11a60d10bd
parent78da6815dcf3b37fd869623040235982b0aaf3c6
drm/i915: Skip modeset for cdclk changes if possible

BugLink: https://launchpad.net/bugs/1826868
If we have only a single active pipe and the cdclk change only requires
the cd2x divider to be updated bxt+ can do the update with forcing a full
modeset on the pipe. Try to hook that up.

v2:
- Wait for vblank after an optimized CDCLK change.
- Avoid optimization if the pipe needs a modeset (or was disabled).
- Split CDCLK change to a pre/post plane update step.
v3:
- Use correct version of CDCLK state as old state. (Ville)
- Remove unused intel_cdclk_can_skip_modeset()
v4:
- For consistency call intel_set_cdclk_post_plane_update() only during
  modesets (and not fastsets).
v5:
- Remove the logic to update the CD2X divider on-the-fly on ICL, since
  only a divider of 1 is supported there. Clint also noticed that the
  pipe select bits in CDCLK_CTL are oddly defined on ICL, it's not clear
  yet whether that's only an error in the specification.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
Tested-by: Abhay Kumar <abhay.kumar@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190327101321.3095-1-imre.deak@intel.com
(backported from commit 59f9e9cab3a1e6762fb707d0d829b982930f1349)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_cdclk.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h