diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-05-04 17:04:36 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-05-05 17:25:49 +0200 |
commit | 4d1b21605d3922c18ceea7fb610a0e17cf7700f9 (patch) | |
tree | 440630139b8336feb95363b9f0d2897a65cf6a84 | |
parent | drm/i915/bios: Document the mess around the LFP data tables (diff) | |
download | linux-4d1b21605d3922c18ceea7fb610a0e17cf7700f9.tar.xz linux-4d1b21605d3922c18ceea7fb610a0e17cf7700f9.zip |
drm/i915/bios: Assume panel_type==0 if the VBT has bogus data
Just assume panel_type==0 always if the VBT gives us bogus data.
We actually already do this everywhere else except in
parse_panel_options() since we just leave i915->vbt.panel_type
zeroed. This also seems to be what Windows does.
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/20220504150440.13748-6-ville.syrjala@linux.intel.com
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_bios.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 4d7953e74814..bbf49e98fe02 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -618,13 +618,14 @@ parse_panel_options(struct drm_i915_private *i915) } else { if (lvds_options->panel_type > 0xf) { drm_dbg_kms(&i915->drm, - "Invalid VBT panel type 0x%x\n", + "Invalid VBT panel type 0x%x, assuming 0\n", lvds_options->panel_type); - return; + panel_type = 0; + } else { + panel_type = lvds_options->panel_type; + drm_dbg_kms(&i915->drm, "Panel type: %d (VBT)\n", + panel_type); } - panel_type = lvds_options->panel_type; - drm_dbg_kms(&i915->drm, "Panel type: %d (VBT)\n", - panel_type); } i915->vbt.panel_type = panel_type; |