[Intel-gfx] [PATCH v5 2/6] drm/i915/display: Check plane damage clips

Mun, Gwan-gyeong gwan-gyeong.mun at intel.com
Mon Dec 14 09:33:21 UTC 2020


On Sun, 2020-12-13 at 10:39 -0800, José Roberto de Souza wrote:
> Call the function that validates every damage clips of each plane.
> As in commit 093a3a300009 ("drm/i915: Add plane damage clips
> property")
> this property was only enabled for gen12+ only checking it for gen12
> too.
> 
> v2:
> - add logs to underspace understand why commit was rejected
> 
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_sprite.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c
> b/drivers/gpu/drm/i915/display/intel_sprite.c
> index b7e208816074..cb862bb8d6fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -2492,6 +2492,13 @@ static int skl_plane_check(struct
> intel_crtc_state *crtc_state,
>  	if (ret)
>  		return ret;
>  
> +	if (INTEL_GEN(dev_priv) >= 12) {
> +		ret = drm_atomic_helper_check_plane_damage(crtc_state-
> >uapi.state,
> +
we should only exclude the damaged clip which is outside fb src.
therefore if there is at least one damage clip intersect fb src rect,
we should handle this damage clip region.
> 							   &plane_state
> ->uapi);
> +		if (ret)
> +			return ret;
> +	}
> +
>  	/* HW only has 8 bits pixel precision, disable plane if
> invisible */
>  	if (!(plane_state->hw.alpha >> 8))
>  		plane_state->uapi.visible = false;


More information about the Intel-gfx mailing list