From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Navare, Manasi" <manasi.d.navare@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
Daniel Vetter <daniel.vetter@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Daniel Stone <daniels@collabora.com>
Subject: Re: [Intel-gfx] [PATCH] drm/atomic: Add the crtc to affected crtc only if uapi.enable = true
Date: Wed, 29 Sep 2021 14:14:51 +0300 [thread overview]
Message-ID: <YVRKq79qPNlFcC8I@intel.com> (raw)
In-Reply-To: <20210401214908.GA24310@labuser-Z97X-UD5H>
On Thu, Apr 01, 2021 at 02:49:13PM -0700, Navare, Manasi wrote:
> On Fri, Mar 26, 2021 at 06:15:22PM +0200, Ville Syrjälä wrote:
> > On Thu, Mar 25, 2021 at 03:01:29PM -0700, Navare, Manasi wrote:
> > > On Fri, Mar 19, 2021 at 11:27:59PM +0200, Ville Syrjälä wrote:
> > > > On Fri, Mar 19, 2021 at 02:26:24PM -0700, Navare, Manasi wrote:
> > > > > On Fri, Mar 19, 2021 at 11:12:41PM +0200, Ville Syrjälä wrote:
> > > > > > On Fri, Mar 19, 2021 at 01:54:13PM -0700, Navare, Manasi wrote:
> > > > > > > On Fri, Mar 19, 2021 at 04:56:24PM +0200, Ville Syrjälä wrote:
> > > > > > > > On Thu, Mar 18, 2021 at 04:01:26PM -0700, Navare, Manasi wrote:
> > > > > > > > > So basically we see this warning only in case of bigjoiner when
> > > > > > > > > drm_atomic_check gets called without setting the state->allow_modeset flag.
> > > > > > > >
> > > > > > > > Considering the code is 'WARN(!state->allow_modeset, ...' that
> > > > > > > > fact should be rather obvious.
> > > > > > > >
> > > > > > > > >
> > > > > > > > > So do you think that in i915, in intel_atomic_check_bigjoiner() we should only
> > > > > > > > > steal the crtc when allow_modeset flag is set in state?
> > > > > > > >
> > > > > > > > No. If you fully read drm_atomic_check_only() you will observe
> > > > > > > > that it will reject any commit w/ allow_modeset==false which
> > > > > > > > needs a modeset. And it does that before the WARN.
> > > > > > > >
> > > > > > > > So you're barking up the wrong tree here. The problem I think
> > > > > > > > is that you're just computing requested_crtcs wrong.
> > > > > > >
> > > > > > > So here in this case, requested CRTC = 0x1 since it requests modeset on CRTC 0
> > > > > > > Now in teh atomic check, it steals the slave CRTC 1 and hence affected CRTC comes out
> > > > > > > as 0x3 and hence the mismatch.
> > > > > >
> > > > > > Hmm. How can it be 0x3 if we filtered out the uapi.enable==false case?
> > > > > >
> > > > >
> > > > > Yes if I add that condition like in this patch then it correctly calculates
> > > > > the affected crtc bitmask as only 0x1 since it doesnt include the slave crtc.
> > > > > So with this patch, requested crtc = 0x 1, affected crtc = 0x1
> > > > >
> > > > > If this looks good then this fixes our bigjoiner warnings.
> > > > > Does this patch look good to you as is then?
> > > >
> > > > I think you still need to fix the requested_crtcs calculation.
> > >
> > > We calculate requested crtc at the beginning :
> > > for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)
> > > requested_crtc |= drm_crtc_mask(crtc);
> > >
> > > Are you suggesting adding this to after:
> > > if (config->funcs->atomic_check) {
> > > ret = config->funcs->atomic_check(state->dev, state);
> > >
> > > if (ret) {
> > > DRM_DEBUG_ATOMIC("atomic driver check for %p failed: %d\n",
> > > state, ret);
> > > return ret;
> > > }
> > > requested_crtc |= drm_crtc_mask(crtc); // Here it will have requested crtc = 0x11
> > > }
> > >
> > > in this case here the state should already have master crtc 0 and slave crtc 1
> > > and that requested crtc should already be 0x11
> > >
> > > Then in that case we dont need any special check for calculating affected crtc, that also will be 0x11
> >
> > All I'm saying is that you're currently calculating requested_crtcs and
> > affected_crtcs differently. So I'm not at all surprised that they might
> > not match.
> >
>
> I dont get your point yet.
> requested crtc is calculated before the atomic check call and we dont check for crtc uapi.enable to be true.
> And hence requested crtc = CRTC 0 = 0x2
> After I added the check in this patch where affected crtc will include only the crtcs that have uapi.enable = true
> then it perfectly matches the requested crtc and return 0x2 but without this check when the calculation of
> requested and affected crtc is the same is where we see the affected crtc = CRTC 0 and 1 = 0x3
>
> So when the calculation is different infcat we dont see the mismatch
>
> What is your point here?
Try doing an atomic commit wiht both crtcs already added in by
userspace. I think that will still WARN.
--
Ville Syrjälä
Intel
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Navare, Manasi" <manasi.d.navare@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
Daniel Vetter <daniel.vetter@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Daniel Stone <daniels@collabora.com>
Subject: Re: [PATCH] drm/atomic: Add the crtc to affected crtc only if uapi.enable = true
Date: Wed, 29 Sep 2021 14:14:51 +0300 [thread overview]
Message-ID: <YVRKq79qPNlFcC8I@intel.com> (raw)
In-Reply-To: <20210401214908.GA24310@labuser-Z97X-UD5H>
On Thu, Apr 01, 2021 at 02:49:13PM -0700, Navare, Manasi wrote:
> On Fri, Mar 26, 2021 at 06:15:22PM +0200, Ville Syrjälä wrote:
> > On Thu, Mar 25, 2021 at 03:01:29PM -0700, Navare, Manasi wrote:
> > > On Fri, Mar 19, 2021 at 11:27:59PM +0200, Ville Syrjälä wrote:
> > > > On Fri, Mar 19, 2021 at 02:26:24PM -0700, Navare, Manasi wrote:
> > > > > On Fri, Mar 19, 2021 at 11:12:41PM +0200, Ville Syrjälä wrote:
> > > > > > On Fri, Mar 19, 2021 at 01:54:13PM -0700, Navare, Manasi wrote:
> > > > > > > On Fri, Mar 19, 2021 at 04:56:24PM +0200, Ville Syrjälä wrote:
> > > > > > > > On Thu, Mar 18, 2021 at 04:01:26PM -0700, Navare, Manasi wrote:
> > > > > > > > > So basically we see this warning only in case of bigjoiner when
> > > > > > > > > drm_atomic_check gets called without setting the state->allow_modeset flag.
> > > > > > > >
> > > > > > > > Considering the code is 'WARN(!state->allow_modeset, ...' that
> > > > > > > > fact should be rather obvious.
> > > > > > > >
> > > > > > > > >
> > > > > > > > > So do you think that in i915, in intel_atomic_check_bigjoiner() we should only
> > > > > > > > > steal the crtc when allow_modeset flag is set in state?
> > > > > > > >
> > > > > > > > No. If you fully read drm_atomic_check_only() you will observe
> > > > > > > > that it will reject any commit w/ allow_modeset==false which
> > > > > > > > needs a modeset. And it does that before the WARN.
> > > > > > > >
> > > > > > > > So you're barking up the wrong tree here. The problem I think
> > > > > > > > is that you're just computing requested_crtcs wrong.
> > > > > > >
> > > > > > > So here in this case, requested CRTC = 0x1 since it requests modeset on CRTC 0
> > > > > > > Now in teh atomic check, it steals the slave CRTC 1 and hence affected CRTC comes out
> > > > > > > as 0x3 and hence the mismatch.
> > > > > >
> > > > > > Hmm. How can it be 0x3 if we filtered out the uapi.enable==false case?
> > > > > >
> > > > >
> > > > > Yes if I add that condition like in this patch then it correctly calculates
> > > > > the affected crtc bitmask as only 0x1 since it doesnt include the slave crtc.
> > > > > So with this patch, requested crtc = 0x 1, affected crtc = 0x1
> > > > >
> > > > > If this looks good then this fixes our bigjoiner warnings.
> > > > > Does this patch look good to you as is then?
> > > >
> > > > I think you still need to fix the requested_crtcs calculation.
> > >
> > > We calculate requested crtc at the beginning :
> > > for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)
> > > requested_crtc |= drm_crtc_mask(crtc);
> > >
> > > Are you suggesting adding this to after:
> > > if (config->funcs->atomic_check) {
> > > ret = config->funcs->atomic_check(state->dev, state);
> > >
> > > if (ret) {
> > > DRM_DEBUG_ATOMIC("atomic driver check for %p failed: %d\n",
> > > state, ret);
> > > return ret;
> > > }
> > > requested_crtc |= drm_crtc_mask(crtc); // Here it will have requested crtc = 0x11
> > > }
> > >
> > > in this case here the state should already have master crtc 0 and slave crtc 1
> > > and that requested crtc should already be 0x11
> > >
> > > Then in that case we dont need any special check for calculating affected crtc, that also will be 0x11
> >
> > All I'm saying is that you're currently calculating requested_crtcs and
> > affected_crtcs differently. So I'm not at all surprised that they might
> > not match.
> >
>
> I dont get your point yet.
> requested crtc is calculated before the atomic check call and we dont check for crtc uapi.enable to be true.
> And hence requested crtc = CRTC 0 = 0x2
> After I added the check in this patch where affected crtc will include only the crtcs that have uapi.enable = true
> then it perfectly matches the requested crtc and return 0x2 but without this check when the calculation of
> requested and affected crtc is the same is where we see the affected crtc = CRTC 0 and 1 = 0x3
>
> So when the calculation is different infcat we dont see the mismatch
>
> What is your point here?
Try doing an atomic commit wiht both crtcs already added in by
userspace. I think that will still WARN.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-09-29 11:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 20:41 [Intel-gfx] [PATCH] drm/atomic: Add the crtc to affected crtc only if uapi.enable = true Manasi Navare
2021-03-02 20:41 ` Manasi Navare
2021-03-03 8:47 ` [Intel-gfx] " Pekka Paalanen
2021-03-03 8:47 ` Pekka Paalanen
2021-03-03 20:44 ` [Intel-gfx] " Navare, Manasi
2021-03-03 20:44 ` Navare, Manasi
2021-03-04 8:42 ` [Intel-gfx] " Pekka Paalanen
2021-03-04 8:42 ` Pekka Paalanen
2021-03-09 0:52 ` [Intel-gfx] " Navare, Manasi
2021-03-09 0:52 ` Navare, Manasi
2021-03-09 9:13 ` [Intel-gfx] " Pekka Paalanen
2021-03-09 9:13 ` Pekka Paalanen
2021-03-16 21:35 ` [Intel-gfx] " Daniel Vetter
2021-03-16 21:35 ` Daniel Vetter
2021-03-16 23:46 ` [Intel-gfx] " Daniel Stone
2021-03-16 23:46 ` Daniel Stone
2021-03-17 21:23 ` Navare, Manasi
2021-03-17 21:23 ` Navare, Manasi
2021-03-18 23:01 ` Navare, Manasi
2021-03-18 23:01 ` Navare, Manasi
2021-03-19 14:56 ` [Intel-gfx] " Ville Syrjälä
2021-03-19 14:56 ` Ville Syrjälä
2021-03-19 20:54 ` [Intel-gfx] " Navare, Manasi
2021-03-19 20:54 ` Navare, Manasi
2021-03-19 21:12 ` [Intel-gfx] " Ville Syrjälä
2021-03-19 21:12 ` Ville Syrjälä
2021-03-19 21:26 ` [Intel-gfx] " Navare, Manasi
2021-03-19 21:26 ` Navare, Manasi
2021-03-19 21:27 ` [Intel-gfx] " Ville Syrjälä
2021-03-19 21:27 ` Ville Syrjälä
2021-03-25 22:01 ` [Intel-gfx] " Navare, Manasi
2021-03-25 22:01 ` Navare, Manasi
2021-03-26 16:15 ` [Intel-gfx] " Ville Syrjälä
2021-03-26 16:15 ` Ville Syrjälä
2021-04-01 21:49 ` [Intel-gfx] " Navare, Manasi
2021-04-01 21:49 ` Navare, Manasi
2021-09-29 11:14 ` Ville Syrjälä [this message]
2021-09-29 11:14 ` Ville Syrjälä
2021-03-03 18:09 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-03-03 18:30 ` [Intel-gfx] ✗ Fi.CI.BAT: 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=YVRKq79qPNlFcC8I@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=manasi.d.navare@intel.com \
/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.