]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/i915: Try to use the correct power sequencer intiially on bxt/glk
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 Mar 2023 08:32:41 +0000 (16:32 +0800)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:34:05 +0000 (13:34 +0200)
commit747fab5bab3fc41f3a61d87e00c32b0e1c6e0171
treeab0965572aff565f7b61b766cada44e17680e6a4
parentaf3bffc905ce7d03b1730f204c4ea994e9b717ac
drm/i915: Try to use the correct power sequencer intiially on bxt/glk

BugLink: https://launchpad.net/bugs/2001599
Currently on bxt/glk we just grab the power sequencer index from
the VBT data even though it may not have been parsed yet. That
could lead us to using the incorrect power sequencer during the
initial panel probe.

To avoid that let's try to read out the current state of the
power sequencer from the hardware. Unfortunately the power
sequencer no longer has anything in its registers to associate
it with the port, so the best we can do is just iterate through
the power sequencers and pick the first one. This should be
sufficient for single panel cases.

For the dual panel cases we probably need to go back to
parsing the VBT before the panel probe (and hope that
panel_type=0xff is never a thing in those cases). To that
end the code always prefers the VBT panel sequencer, if
available.

v2: Restructure a bit for upcoming icp+ dual PPS support

Cc: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-5-ville.syrjala@linux.intel.com
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
(cherry picked from commit bf38bba3e7d635ff1b6abc097f50094d100e90e2)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Cory Todd <cory.todd@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_pps.c