From: "Navare, Manasi" <manasi.d.navare@intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: 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, 17 Mar 2021 14:23:49 -0700 [thread overview]
Message-ID: <20210317212349.GA30079@labuser-Z97X-UD5H> (raw)
In-Reply-To: <CAPj87rOtWpBW3u7M+ePPQqT_RKEmCzDA8u4gRfT-HrcRaR7_zg@mail.gmail.com>
On Tue, Mar 16, 2021 at 11:46:38PM +0000, Daniel Stone wrote:
> On Tue, 16 Mar 2021 at 21:35, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> > On Tue, Mar 9, 2021 at 10:14 AM Pekka Paalanen <ppaalanen@gmail.com>
> > wrote:
> > > On Mon, 8 Mar 2021 16:52:58 -0800
> > > "Navare, Manasi" <manasi.d.navare@intel.com> wrote:
> > > > Hmm well after the actual real commit, since the second crtc is stolen
> > > > even though it is not being used for the display output, it is
> > > > used for joiner so the uapi.enable will be true after the real commit.
> > > >
> > > > so actually the assertion would fail in this case.
> > > >
> > > > @Ville @Danvet any suggestions here in that case?
> >
> > That is very bad. We can't frob uapi state like that. I think that
> > calls for even more checks to make sure kms drivers who try to play
> > clever games don't get it wrong, so we probably need to check uapi
> > enable and active state in another mask before/after ->atomic_check
> > too. Or something like that.
> >
>
> Yeah. We can _never_ generate externally-visible completion events. We can
> later fail to enable the stolen CRTC - because trying to enable new things
> can fail for any reason whatsoever - but we can't generate spurious
> completion events, as doing so falls into the uncanny valley.
>
> If the kernel is doing clever things behind userspace's back - such as
> stealing planes or CRTCs - then userspace can never know about it, apart
> from failing to enable those resources later. The kernel can either never
> do anything clever (and make userspace bind them both together), or be
> extremely clever (by hiding the entire details from userspace), but it
> cannot choose the halfway house of doing clever things behind userspace's
> back (such as stealing new CRTCs) whilst also exposing all those details to
> userspace (such as delivering spurious completion events for resources
> userspace never requested to be programmed).
>
> Cheers,
> Daniel
Yes I agree, in this case there will not be any completion events associated with
the stolen slave CRTC since that does not get used for the output.
The completion events will only occur on the bigjoiner master crtc.
But I guess like Danvet suggested we need a separate mask for keeping track of active and
enabled crtcs before and after atomic check. But need to look at how this will fix
the affected crtc not matching warning.
Manasi
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-03-17 21:17 UTC|newest]
Thread overview: 21+ 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-03 8:47 ` Pekka Paalanen
2021-03-03 20:44 ` Navare, Manasi
2021-03-04 8:42 ` Pekka Paalanen
2021-03-09 0:52 ` Navare, Manasi
2021-03-09 9:13 ` Pekka Paalanen
2021-03-16 21:35 ` Daniel Vetter
2021-03-16 23:46 ` Daniel Stone
2021-03-17 21:23 ` Navare, Manasi [this message]
2021-03-18 23:01 ` Navare, Manasi
2021-03-19 14:56 ` Ville Syrjälä
2021-03-19 20:54 ` Navare, Manasi
2021-03-19 21:12 ` Ville Syrjälä
2021-03-19 21:26 ` Navare, Manasi
2021-03-19 21:27 ` Ville Syrjälä
2021-03-25 22:01 ` Navare, Manasi
2021-03-26 16:15 ` Ville Syrjälä
2021-04-01 21:49 ` Navare, Manasi
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=20210317212349.GA30079@labuser-Z97X-UD5H \
--to=manasi.d.navare@intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@fooishbar.org \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox