[Intel-gfx] [PATCH] drm/i915/display: Fix NV12 sub plane atomic state

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Aug 10 14:47:17 UTC 2020


Op 10-08-2020 om 17:16 schreef Uma Shankar:
> From: Abhishek Kumar <abhishek4.kumar at intel.com>
>
> For NV12 display sub plane is also configured and drivers internally
> create plane atomic state. Driver copies all of the param of main
> plane atomic state to sub planer atomic state but in sub plane
> atomic state crtc is not added ,so when drm atomic state is configured
> for commit ,fake commit handler is created for sub plane and also
> state is not cleared when NV12 buffer is not displayed.
>
> Fixes: 1f594b209fe1 ("drm/i915: Remove special case slave handling during hw programming")
> Change-Id: I447b16bf433dfb5b43b2e4cade258fc775aee065
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: stable at vger.kernel.org
> Signed-off-by: Abhishek Kumar <abhishek4.kumar at intel.com>
> Signed-off-by: Uma Shankar <uma.shankar at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 522c772a2111..76da2189b01d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -12502,6 +12502,7 @@ static int icl_check_nv12_planes(struct intel_crtc_state *crtc_state)
>  	struct intel_atomic_state *state = to_intel_atomic_state(crtc_state->uapi.state);
>  	struct intel_plane *plane, *linked;
>  	struct intel_plane_state *plane_state;
> +	int ret;
>  	int i;
>  
>  	if (INTEL_GEN(dev_priv) < 11)
> @@ -12576,6 +12577,11 @@ static int icl_check_nv12_planes(struct intel_crtc_state *crtc_state)
>  		linked_state->uapi.src = plane_state->uapi.src;
>  		linked_state->uapi.dst = plane_state->uapi.dst;
>  
> +		/* Update Linked plane crtc same as of main plane */
> +		ret = drm_atomic_set_crtc_for_plane(&linked_state->uapi, plane_state->uapi.crtc);
> +		if(ret)
> +			return ret;
> +
>  		if (icl_is_hdr_plane(dev_priv, plane->id)) {
>  			if (linked->id == PLANE_SPRITE5)
>  				plane_state->cus_ctl |= PLANE_CUS_PLANE_7;

That shouldnt be done, uapi.crtc should be NULL for the slave plane.



More information about the Intel-gfx mailing list