[Intel-gfx] [PATCH 1/3] drm/i915: Reject panel_type > 0xf from VBT
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Fri Apr 8 13:28:11 UTC 2016
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
VBT can only contain 16 panel entries, indexed with the panel_type.
To play it safe we should reject panel_type > 0xf, so that we don't
read past the valid data.
Cc: Rob Kramer <rob at solution-space.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index eb756c41d9e1..13bdd4316092 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -212,7 +212,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
return;
dev_priv->vbt.lvds_dither = lvds_options->pixel_dither;
- if (lvds_options->panel_type == 0xff)
+ if (lvds_options->panel_type > 0xf)
return;
panel_type = lvds_options->panel_type;
--
2.7.4
More information about the Intel-gfx
mailing list