drm/i915/bios: Determine panel type via PNPID match
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 10 May 2022 10:42:40 +0000 (13:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 27 May 2022 17:32:16 +0000 (20:32 +0300)
commitc518a775a843413786d3db8b5cab084597730a5a
treed52be876928a9c755908d6b8d1a13b8f32821834
parent3cf050762534cc268a02793ec00240f81c6e2229
drm/i915/bios: Determine panel type via PNPID match

Apparently when the VBT panel_type==0xff we should trawl through
the PNPID table and check for a match against the EDID. If a
match is found the index gives us the panel_type.

Tried to match the Windows behaviour here with first looking
for an exact match, and if one isn't found we fall back to
looking for a match w/o the mfg year/week.

v2: Rebase due to vlv_dsi changes
v3: Adjust to .get_panel_type() vfunc

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5545
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/20220510104242.6099-14-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_dp.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_sdvo.c
drivers/gpu/drm/i915/display/vlv_dsi.c