* [PATCH v2] drm: document that user-space should avoid parsing EDIDs
@ 2020-10-22 10:34 Simon Ser
2020-10-22 10:44 ` Brian Starkey
2020-10-26 13:42 ` Pekka Paalanen
0 siblings, 2 replies; 3+ messages in thread
From: Simon Ser @ 2020-10-22 10:34 UTC (permalink / raw)
To: dri-devel; +Cc: Daniel Vetter, Thomas Zimmermann, Pekka Paalanen, Daniel Vetter
User-space should avoid parsing EDIDs for metadata already exposed via
other KMS interfaces and properties. For instance, user-space should not
try to extract a list of modes from the EDID: the kernel might mutate
the mode list (because of link capabilities or quirks for instance).
Other metadata not exposed by KMS can be parsed by user-space. This
includes for instance monitor identification (make/model/serial) and
supported color-spaces.
v2: add short explanation why user-space shouldn't do this (Brian)
Signed-off-by: Simon Ser <contact@emersion.fr>
Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Brian Starkey <brian.starkey@arm.com>
---
drivers/gpu/drm/drm_connector.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 717c4e7271b0..1913d8b4e16a 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -960,6 +960,11 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
* drm_connector_update_edid_property(), usually after having parsed
* the EDID using drm_add_edid_modes(). Userspace cannot change this
* property.
+ *
+ * User-space should not parse the EDID to obtain information exposed via
+ * other KMS properties (because the kernel might apply limits, quirks or
+ * fixups to the EDID). For instance, user-space should not try to parse
+ * mode lists from the EDID.
* DPMS:
* Legacy property for setting the power state of the connector. For atomic
* drivers this is only provided for backwards compatibility with existing
--
2.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm: document that user-space should avoid parsing EDIDs
2020-10-22 10:34 [PATCH v2] drm: document that user-space should avoid parsing EDIDs Simon Ser
@ 2020-10-22 10:44 ` Brian Starkey
2020-10-26 13:42 ` Pekka Paalanen
1 sibling, 0 replies; 3+ messages in thread
From: Brian Starkey @ 2020-10-22 10:44 UTC (permalink / raw)
To: Simon Ser
Cc: Daniel Vetter, dri-devel, Thomas Zimmermann, Pekka Paalanen,
Daniel Vetter, nd
On Thu, Oct 22, 2020 at 10:34:44AM +0000, Simon Ser wrote:
> User-space should avoid parsing EDIDs for metadata already exposed via
> other KMS interfaces and properties. For instance, user-space should not
> try to extract a list of modes from the EDID: the kernel might mutate
> the mode list (because of link capabilities or quirks for instance).
>
> Other metadata not exposed by KMS can be parsed by user-space. This
> includes for instance monitor identification (make/model/serial) and
> supported color-spaces.
>
> v2: add short explanation why user-space shouldn't do this (Brian)
LGTM, thanks.
-Brian
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> Cc: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> ---
> drivers/gpu/drm/drm_connector.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 717c4e7271b0..1913d8b4e16a 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -960,6 +960,11 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
> * drm_connector_update_edid_property(), usually after having parsed
> * the EDID using drm_add_edid_modes(). Userspace cannot change this
> * property.
> + *
> + * User-space should not parse the EDID to obtain information exposed via
> + * other KMS properties (because the kernel might apply limits, quirks or
> + * fixups to the EDID). For instance, user-space should not try to parse
> + * mode lists from the EDID.
> * DPMS:
> * Legacy property for setting the power state of the connector. For atomic
> * drivers this is only provided for backwards compatibility with existing
> --
> 2.28.0
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm: document that user-space should avoid parsing EDIDs
2020-10-22 10:34 [PATCH v2] drm: document that user-space should avoid parsing EDIDs Simon Ser
2020-10-22 10:44 ` Brian Starkey
@ 2020-10-26 13:42 ` Pekka Paalanen
1 sibling, 0 replies; 3+ messages in thread
From: Pekka Paalanen @ 2020-10-26 13:42 UTC (permalink / raw)
To: Simon Ser; +Cc: Daniel Vetter, Thomas Zimmermann, dri-devel, Daniel Vetter
[-- Attachment #1.1: Type: text/plain, Size: 2075 bytes --]
On Thu, 22 Oct 2020 10:34:44 +0000
Simon Ser <contact@emersion.fr> wrote:
> User-space should avoid parsing EDIDs for metadata already exposed via
> other KMS interfaces and properties. For instance, user-space should not
> try to extract a list of modes from the EDID: the kernel might mutate
> the mode list (because of link capabilities or quirks for instance).
>
> Other metadata not exposed by KMS can be parsed by user-space. This
> includes for instance monitor identification (make/model/serial) and
> supported color-spaces.
>
> v2: add short explanation why user-space shouldn't do this (Brian)
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> ---
> drivers/gpu/drm/drm_connector.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 717c4e7271b0..1913d8b4e16a 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -960,6 +960,11 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
> * drm_connector_update_edid_property(), usually after having parsed
> * the EDID using drm_add_edid_modes(). Userspace cannot change this
> * property.
> + *
> + * User-space should not parse the EDID to obtain information exposed via
> + * other KMS properties (because the kernel might apply limits, quirks or
> + * fixups to the EDID). For instance, user-space should not try to parse
> + * mode lists from the EDID.
> * DPMS:
> * Legacy property for setting the power state of the connector. For atomic
> * drivers this is only provided for backwards compatibility with existing
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Thanks,
pq
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-26 13:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-22 10:34 [PATCH v2] drm: document that user-space should avoid parsing EDIDs Simon Ser
2020-10-22 10:44 ` Brian Starkey
2020-10-26 13:42 ` Pekka Paalanen
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.