All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shankar, Uma" <uma.shankar@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Zuo, Alex" <alex.zuo@intel.com>,
	"Kumar, Abhishek4" <abhishek4.kumar@intel.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] drm/i915/display: Fix NV12 sub plane atomic state
Date: Mon, 10 Aug 2020 14:56:34 +0000	[thread overview]
Message-ID: <db10f02b5f074f268cf304e42d4b057f@intel.com> (raw)
In-Reply-To: <c73e1ba2-dec8-c95c-dbb4-efeffe21cfb4@linux.intel.com>



> -----Original Message-----
> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Sent: Monday, August 10, 2020 8:17 PM
> To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: Zuo, Alex <alex.zuo@intel.com>; Kumar, Abhishek4
> <abhishek4.kumar@intel.com>; stable@vger.kernel.org
> 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 <abhishek4.kumar@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@linux.intel.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
> > Signed-off-by: Uma Shankar <uma.shankar@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.

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



WARNING: multiple messages have this Message-ID (diff)
From: "Shankar, Uma" <uma.shankar@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Kumar, Abhishek4" <abhishek4.kumar@intel.com>,
	"Zuo, Alex" <alex.zuo@intel.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix NV12 sub plane atomic state
Date: Mon, 10 Aug 2020 14:56:34 +0000	[thread overview]
Message-ID: <db10f02b5f074f268cf304e42d4b057f@intel.com> (raw)
In-Reply-To: <c73e1ba2-dec8-c95c-dbb4-efeffe21cfb4@linux.intel.com>



> -----Original Message-----
> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Sent: Monday, August 10, 2020 8:17 PM
> To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: Zuo, Alex <alex.zuo@intel.com>; Kumar, Abhishek4
> <abhishek4.kumar@intel.com>; stable@vger.kernel.org
> 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 <abhishek4.kumar@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@linux.intel.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
> > Signed-off-by: Uma Shankar <uma.shankar@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.

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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-08-10 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 15:16 [PATCH] drm/i915/display: Fix NV12 sub plane atomic state Uma Shankar
2020-08-10 15:16 ` [Intel-gfx] " Uma Shankar
2020-08-10 14:47 ` Maarten Lankhorst
2020-08-10 14:47   ` [Intel-gfx] " Maarten Lankhorst
2020-08-10 14:56   ` Shankar, Uma [this message]
2020-08-10 14:56     ` Shankar, Uma
2020-08-10 14:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-08-10 14:49 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-08-10 15:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-10 18:13 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db10f02b5f074f268cf304e42d4b057f@intel.com \
    --to=uma.shankar@intel.com \
    --cc=abhishek4.kumar@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.