[Intel-gfx] [PATCH 13/15] drm/i915: Add a sanity check for 'hdmi_default_entry'

Daniel Vetter daniel at ffwll.ch
Thu Dec 10 05:54:54 PST 2015


On Tue, Dec 08, 2015 at 07:59:48PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index c47f45c0f4a2..8d8f346a9615 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -526,6 +526,9 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder)
>  		hdmi_default_entry = 7;
>  	}
>  
> +	if (WARN_ON(hdmi_default_entry >= n_hdmi_entries))
> +		hdmi_default_entry = 0;
> +
>  	/* Choose a good default if VBT is badly populated */
>  	if (hdmi_level == HDMI_LEVEL_SHIFT_UNKNOWN ||
>  	    hdmi_level >= n_hdmi_entries)
> -- 
> 2.4.10
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list