drm/i915: Do panel VBT init early if the VBT declares an explicit panel type
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 Nov 2022 17:31:49 +0000 (19:31 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 9 Dec 2022 17:02:49 +0000 (19:02 +0200)
commit3f9ffce5765d68775163b8b134c4d7f156b48eec
tree52db717e07fc3d7c66b772b830aef7196f5e104b
parentf70f8153e3642337b444fbc0c64d546a46bbcd62
drm/i915: Do panel VBT init early if the VBT declares an explicit panel type

Lots of ADL machines out there with bogus VBTs that declare
two eDP child devices. In order for those to work we need to
figure out which power sequencer to use before we try the EDID
read. So let's do the panel VBT init early if we can, falling
back to the post-EDID init otherwise.

The post-EDID init panel_type=0xff approach of assuming the
power sequencer should already be enabled doesn't really work
with multiple eDP panels, and currently we just end up using
the same power sequencer for both eDP ports, which at least
confuses the wakeref tracking, and potentially also causes us
to toggle the VDD for the panel when we should not.

Cc: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_bios.h
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_sdvo.c
drivers/gpu/drm/i915/display/vlv_dsi.c