From: Daniel Vetter <daniel@ffwll.ch>
To: Simon Ser <contact@emersion.fr>
Cc: Manasi Navare <manasi.d.navare@intel.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm: document how user-space should use link-status
Date: Wed, 3 Jun 2020 15:44:27 +0200 [thread overview]
Message-ID: <20200603134427.GO20149@phenom.ffwll.local> (raw)
In-Reply-To: <M7Ja_vtKU8uXTBBAW_4XJJAeG4Tq-ftcqJEZ_DtlSPqx_yS_zCnYFnKtB5WQQpxz-2hylwWMlDmSKfZz9IkevX4BjXIuj17UyfRwyNSrWL8=@emersion.fr>
On Wed, Jun 03, 2020 at 01:27:55PM +0000, Simon Ser wrote:
> > > + * When user-space performs an atomic commit on a connector with a "BAD"
> > > + * link-status without resetting the property to "GOOD", it gets
> > > + * implicitly reset. This might make the atomic commit fail if the modeset
> > > + * is unsuccessful.
> >
> > I think this was what Daniel was saying that the kernel should require
> > ALLOW_MODESET to be set for the automatic reset, right?
>
> Actually this paragraph isn't true. link-status is only reset to GOOD for
> legacy modeset.
>
> But right now this doesn't matter since no driver reads the link-status
> property value as far as I can tell. Note, only i915 sets link-status
> to BAD.
It's magic ... change in link status results in connectors_change (or
something like that), which forces the modeset (and first recomputation of
mode state) that fixes everything up.
But yeah I entirely missed that the autoreset to GOOD only happens in
legacy modeset.
I guess we might have some atomic compositors with slightly suboptimal
handling of link status failure :-/
> > I'm fine with how the doc is written now. But if ALLOW_MODESET becomes
> > a requirement for the automatic reset, I suspect there is a risk to
> > regress Weston, assuming the automatic reset used to be successful.
>
> Right now a commit without ALLOW_MODESET won't reset link-status to GOOD,
> but also won't re-train the link on i915. So I think it's fine to require
> ALLOW_MODESET.
>
> Should drivers read the value of the link-status property? Or should we
> ignore user-space writes to the property and only require ALLOW_MODESET
> to re-train the link?
Well without allow_modeset it'll fail, that's the problem. But since we
dont automatically restore, I think the only problem is that existing
atomic userspace might be stuck on a bad link for a while ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-06-03 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 19:18 [PATCH v2] drm: document how user-space should use link-status Simon Ser
2020-06-03 9:32 ` Pekka Paalanen
2020-06-03 13:27 ` Simon Ser
2020-06-03 13:44 ` Daniel Vetter [this message]
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=20200603134427.GO20149@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=contact@emersion.fr \
--cc=dri-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox