]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/i915: Force VDD off on the new power seqeuencer before starting to use it
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Dec 2016 16:51:17 +0000 (18:51 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Dec 2016 12:31:04 +0000 (14:31 +0200)
commit5d5ab2d26f32bdaa5872b938658e0bf8d341bc4c
tree3068efa37ced80902489d12dc0b043ff8309c38d
parenta98d9c1d7e9bb08648e40abe604374825e57f8ff
drm/i915: Force VDD off on the new power seqeuencer before starting to use it

Apparently some VLV BIOSen like to leave the VDD force bit enabled
even for power seqeuncers that aren't properly hooked up to any
port. That will result in a imbalance in the AUX power domain
refcount when we stat to use said power sequencer as edp_panel_vdd_on()
will not grab the power domain reference if it sees that the VDD is
already on.

To fix this let's make sure we turn off the VDD force bit when we
initialize the power sequencer registers. That is, unless it's
being done from the init path since there we are actually
initializing the registers for the current power sequencer and
we don't want to turn VDD off needlessly as that would require
waiting for the power cycle delay before we turn it back on.

This fixes the following kind of warnings:
WARNING: CPU: 0 PID: 123 at ../drivers/gpu/drm/i915/intel_runtime_pm.c:1455 intel_display_power_put+0x13a/0x170 [i915]()
WARN_ON(!power_domains->domain_use_count[domain])
...

v2: Fix typos in comment (David)

Cc: stable@vger.kernel.org
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Tested-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98695
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161220165117.24801-1-ville.syrjala@linux.intel.com
Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
drivers/gpu/drm/i915/intel_dp.c