All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keith Packard" <keithp@keithp.com>
To: Adam Jackson <ajax@redhat.com>,
	Pekka Paalanen <ppaalanen@gmail.com>,
	Brian Starkey <Brian.Starkey@arm.com>
Cc: Simon Ser <contact@emersion.fr>, nd <nd@arm.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: Expose more EDID fields to userspace
Date: Wed, 16 Jan 2019 12:32:58 -0800	[thread overview]
Message-ID: <874la8xs05.fsf@keithp.com> (raw)
In-Reply-To: <c0c5f431bd64f19fa8c7e532db57ac3156feb4e6.camel@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2725 bytes --]

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

 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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  reply	other threads:[~2019-01-16 20:33 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 [this message]
2019-01-17  9:28                 ` Daniel Vetter
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=874la8xs05.fsf@keithp.com \
    --to=keithp@keithp.com \
    --cc=Brian.Starkey@arm.com \
    --cc=ajax@redhat.com \
    --cc=contact@emersion.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nd@arm.com \
    --cc=ppaalanen@gmail.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.