All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Reject panel_type > 0xf from VBT
@ 2016-04-08 13:28 ville.syrjala
  2016-04-08 13:28 ` [PATCH 2/3] drm/i915: Replace the static panel_type variable with dev_priv->vbt.panel_type ville.syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: ville.syrjala @ 2016-04-08 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rob Kramer

From: Ville Syrjälä <ville.syrjala@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@solution-space.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-04-12 12:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 13:28 [PATCH 1/3] drm/i915: Reject panel_type > 0xf from VBT ville.syrjala
2016-04-08 13:28 ` [PATCH 2/3] drm/i915: Replace the static panel_type variable with dev_priv->vbt.panel_type ville.syrjala
2016-04-08 14:29   ` Jani Nikula
2016-04-08 13:28 ` [PATCH 3/3] drm/i915: Get panel_type from OpRegion panel details ville.syrjala
2016-04-08 14:50   ` Jani Nikula
2016-04-08 14:59     ` Ville Syrjälä
2016-04-08 15:01       ` Jani Nikula
2016-04-08 15:46         ` Ville Syrjälä
2016-04-11  7:23   ` [PATCH v2 " ville.syrjala
2016-04-11  8:09     ` Jani Nikula
2016-04-12 12:18       ` Ville Syrjälä
2016-04-08 13:56 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Reject panel_type > 0xf from VBT Patchwork
2016-04-08 14:07   ` Ville Syrjälä
2016-04-08 14:26 ` [PATCH 1/3] " Jani Nikula
2016-04-11  7:22 ` [PATCH v2 " ville.syrjala
2016-04-11  8:08   ` Jani Nikula
2016-04-11  7:56 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/3] drm/i915: Reject panel_type > 0xf from VBT (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.