dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Keith Packard <keithp@keithp.com>
Cc: Simon Ser <contact@emersion.fr>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, nd <nd@arm.com>
Subject: Re: Expose more EDID fields to userspace
Date: Thu, 17 Jan 2019 10:28:17 +0100	[thread overview]
Message-ID: <20190117092816.GC3271@phenom.ffwll.local> (raw)
In-Reply-To: <874la8xs05.fsf@keithp.com>

On Wed, Jan 16, 2019 at 12:32:58PM -0800, Keith Packard wrote:
> Adam Jackson <ajax@redhat.com> writes:
> 
> > If the kernel wanted to expose its quirks db somehow the library could
> > certainly be taught to use it. However there are likely to be quirks
> > relevant only to userspace (see below), making the kernel carry that
> > doesn't make a ton of sense.
> 
> We do expose some of the quirks to user space, but not as a database,
> and not consistently. Some of the quirks just match EDID data to drive
> some decision (like non-desktop). Other quirks override some EDID data
> that is 'wrong'. For these latter instances, I wonder if we shouldn't be
> re-writing the EDID data that user space gets? Or at least making sure
> the quirked values are available to user space?
> 
> > Part of the problem with the idea is that EDID parsing is not
> > unambiguous. There are several fields for "physical output size" with
> > slightly different semantics, which one do you want? There are both
> > structured and free-form ways to encode monitor name and serial
> > number.
> 
> Hrm. For places where the kernel *does* parse the data, it would sure be
> nice to have the kernel version to at least make that
> consistent. Model/serial data used to select quirks seems like something
> we should be exposing?
> 
> I'm getting the feeling that either extreme approach (parse all of the
> EDID data, or parse none of it) is not going to work and that our
> current technique of picking some EDID-derived data to expose as
> separate parsed values, and some to leave for user space to discover for
> itself is where we'll be stuck for at least the near term.
> 
> If we come to agreement that this approach is what we'll be doing, then
> I'd like to have a couple of suggestions:
> 
>  1) Document what we've got today

Connector properties are documented here:

https://dri.freedesktop.org/docs/drm/gpu/drm-kms.html#standard-connector-properties

I think we've caught up and have them all documented now, at least all the
ones that have been standardized. There's not much, from a quick look we
expose the following immutable props for userspace's benefit:

EDID, PATH, TILE (this has been used for other composite screens, not just
MST), non_desktop, "panel orientation". Plus vrr_capable, which is
documented in a separate chapter. All the other properties are meant
to be set, or not about parsing sink information.

For all the other bits I think it'd be good to do a better job, but most
likely we'll just muddle on. Exhibit A: The super consistent naming
scheme for properties we have, see above :-)

But in case we're going to do better, fully agree on documenting all this.
-Daniel

>  2) Document basic guidelines of when to expose parsed EDID-derived data
>     and when to just leave it in the EDID block for user space
> 
>  3) Plan on exposing all values which the kernel *does* use internally
>     as parsed-out properties. Especially values which get quirked,
>     possibly exposing both the "raw" value and the "quirk" value.
> 
>  4) Decide if we want to let user-space in on the quirking fun. I can
>     imagine a user-space helper that gets run at hot-plug time, reads
>     the EDID data and then pokes quirk values into the kernel.
> 
>  5) Decide, as a matter of policy, whether the kernel will ever edit
>     EDID data that gets exposed to user space. I can think of good
>     reasons on both sides, but I think we need to hash out what the
>     kernel will do so that user space knows what's going on.
> 
> I think what I want is for kernel and user space to at least be
> operating on the same data, even if we end up re-implementing a pile of
> code up in user space.
> 
> -- 
> -keith



> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


-- 
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

  reply	other threads:[~2019-01-17  9:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-23  9:16 Expose more EDID fields to userspace Simon Ser
2018-12-24 10:23 ` Daniel Vetter
2018-12-31 12:57   ` Simon Ser
2019-01-07 10:02     ` Daniel Vetter
2019-01-07 15:57       ` Keith Packard
2019-01-07 17:07         ` Brian Starkey
2019-01-16 18:35           ` Pekka Paalanen
2019-01-16 19:11             ` Ville Syrjälä
2019-01-16 19:40             ` Adam Jackson
2019-01-16 20:32               ` Keith Packard
2019-01-17  9:28                 ` Daniel Vetter [this message]
2019-01-17 19:45                   ` Keith Packard
2019-01-17 19:59             ` Alex Deucher
2019-01-17 20:33               ` Daniel Vetter
2019-01-17 21:23           ` Stéphane Marchesin
2019-01-17 21:36             ` Keith Packard

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=20190117092816.GC3271@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=contact@emersion.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=nd@arm.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