Re: [2/2] drm/i915: Check some transcoder timing minimum limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2019 at 12:43:56PM -0700, Manasi Navare wrote:
> From: Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> On ILK+ the documented min hdisplay is 64, min hblank is 32, and min
> vblank is 5. On earlier platforms min hblank is also 32, and min
> vblank is 3. Make sure the mode satisfies those limits.
> 
> There are further limits for HDMI and pfit use cases, but we'll check
> for those in a more specific location.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Double checked the min limits from the spec and looks good to me

Reviewed-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index e25b82d07d4f..1141f4aa31c7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15816,6 +15816,21 @@ intel_mode_valid(struct drm_device *dev,
>  	    mode->vtotal > vtotal_max)
>  		return MODE_V_ILLEGAL;
>  
> +	if (INTEL_GEN(dev_priv) >= 5) {
> +		if (mode->hdisplay < 64 ||
> +		    mode->htotal - mode->hdisplay < 32)
> +			return MODE_H_ILLEGAL;
> +
> +		if (mode->vtotal - mode->vdisplay < 5)
> +			return MODE_V_ILLEGAL;
> +	} else {
> +		if (mode->htotal - mode->hdisplay < 32)
> +			return MODE_H_ILLEGAL;
> +
> +		if (mode->vtotal - mode->vdisplay < 3)
> +			return MODE_V_ILLEGAL;
> +	}
> +
>  	return MODE_OK;
>  }
>  
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux