[Intel-gfx] [PATCH 1/2] drm/i915/mtl: Added restriction for plane downscaling

Murthy, Arun R arun.r.murthy at intel.com
Mon Aug 29 02:48:17 UTC 2022


> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Animesh Manna
> Sent: Friday, August 26, 2022 5:48 PM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 1/2] drm/i915/mtl: Added restriction for plane
> downscaling
> 
> The second Scaler (i.e. Scaler 2) does not support vertical downscaling (i.e.
> it's vertical scale factor must not be greater than 1.0). So, vertical plane
> downscaling is not supported on MTL, scale factor modified accordingly.
> 
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Manasi Navare <manasi.d.navare at intel.com>
> Signed-off-by: Animesh Manna <animesh.manna at intel.com>
> ---
>  drivers/gpu/drm/i915/display/skl_universal_plane.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index bcfde81e4d08..6bfcda748e7b 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -1464,9 +1464,12 @@ static int skl_plane_max_scale(struct
> drm_i915_private *dev_priv,
>  	 * whether we can use the HQ scaler mode. Assume
>  	 * the best case.
>  	 * FIXME need to properly check this later.
> +	 * FIXME On MTL, adjust specific scaler's downscaling capability.
This should not be FIXME and this is a limitation of hardware. A NOTE can be added instead!
>  	 */
> -	if (DISPLAY_VER(dev_priv) >= 10 ||
> -	    !intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier))
> +	if (IS_METEORLAKE(dev_priv))
> +		return 0x10000;
Can this magic number be replaced with a macro?

> +	else if (DISPLAY_VER(dev_priv) >= 10 ||
> +		 !intel_format_info_is_yuv_semiplanar(fb->format, fb-
> >modifier))
>  		return 0x30000 - 1;
>  	else
>  		return 0x20000 - 1;
> --
> 2.29.0


Thanks and Regards,
Arun R Murthy
--------------------


More information about the Intel-gfx mailing list