> -----Original Message-----
> From: Maarten Lankhorst <[email protected]>
> Sent: Monday, August 10, 2020 8:17 PM
> To: Shankar, Uma <[email protected]>; [email protected]
> Cc: Zuo, Alex <[email protected]>; Kumar, Abhishek4
> <[email protected]>; [email protected]
> Subject: Re: [PATCH] drm/i915/display: Fix NV12 sub plane atomic state
> 
> Op 10-08-2020 om 17:16 schreef Uma Shankar:
> > From: Abhishek Kumar <[email protected]>
> >
> > 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 <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Abhishek Kumar <[email protected]>
> > Signed-off-by: Uma Shankar <[email protected]>
> > ---
> >  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.

Hi Maarten,
We seem to get EBUSY from commit and flips fail with NV12, RGB seems to work 
fine.
This change is making things work. What could be possibly going wrong ?

This is being tested with Chrome browser app while switching tabs with videos 
being
played on each of these tabs.

Regards,
Uma Shankar


_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to