From: Yogish Kulkarni <yogishkulkarni@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: Dynamically change enumeration list of DRM enumeration property
Date: Thu, 28 May 2020 12:29:43 +0530 [thread overview]
Message-ID: <CAL3Fm-L-iwGu60Zf15aYf9Xm9201sT2vU888Fv46Tv7x37Aq6Q@mail.gmail.com> (raw)
In-Reply-To: <CAKMK7uHG1P9hwT1CBqWUfL6sBwZwyS7q0scXSUuXNiJMmRz-+g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3556 bytes --]
For creating new source property, is it good to follow
"drm_mode_create_hdmi_colorspace_property()" as an example ? It seems that
currently there is no standard DRM property which allows DRM client to set
a specific output encoding (like YUV420, YUV422 etc). Also, there is no
standard property for letting client select YUV/RGB color range. I see
there are two ways to introduce new properties, 1. do something like
drm_mode_create_hdmi_colorspace_property 2. create custom property similar
to "Broadcast RGB". Is there opinion on which is a preferable way to expose
encoding and color rage selection property ?
Thanks,
-Yogish
On Tue, May 26, 2020 at 5:44 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, May 26, 2020 at 9:39 AM Pekka Paalanen <ppaalanen@gmail.com>
> wrote:
> >
> > On Tue, 26 May 2020 10:01:23 +0530
> > Yogish Kulkarni <yogishkulkarni@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Is it possible to dynamically change enumeration list of DRM
> enumeration
> > > property ? Motivation behind this question is to understand whether it
> is
> > > possible to create connector enum property (e.g a property which will
> list
> > > supported output encodings - like yuv420, yuv422 etc) whose list of
> > > supported enum values could be changed dynamically e.g. based on which
> sink
> > > is connected.
> > >
> > > I think there is existing EDID connector property whose value changes
> based
> > > on connected sink. EDID is a BLOB property, I am trying to understand
> if
> > > this is also possible for ENUM type property. There is
> > > "drm_property_replace_blob" to replace blob but I wasn't able to find
> any
> > > API which could replace list of supported enums. Alternatively, would
> it be
> > > good idea to destroy custom enum property created by a driver and
> create
> > > new enum property with new list of supported enums e.g when there is a
> > > HOTPLUG event.
> >
> > Hi,
> >
> > looking at Weston code, it *might* cope with it. A hotplug event does
> > cause Weston to re-discover all properties of a connector. This is
> > specific to connectors only.
>
> Currently the kernel doesn't cope with that. Only objects which can be
> added/removed are connectors, blobs and fbs (iow the refcounted ones).
> Adding/removing properties isn't supported, nor is adding/removing
> which properties are attached to which object while that object is
> life.
>
> Also I think the uapi risk for this is way too big, see my other reply
> for what we've done in the past for stuff like this.
> -Daniel
>
> > The race exists though: userspace might be poking at KMS after you
> > changed the property in the kernel but before userspace handles the
> > hotplug event. You'd have to check that does not cause regressions. I
> > guess for a completely new property, the risk seems low, as userspace
> > does not know to poke at it (risk of using outdated property or value
> > IDs causing unexpected atomic commit failure). Also I'm not aware of
> > any KMS program that would yet attempt blind KMS state save & restore
> > to sanitize the KMS state after dropping and re-gaining DRM master.
> >
> > You'd have to check all other KMS using programs too: every Wayland
> > compositor, Xorg, DRM Vulkan WSI(?), ...
> >
> >
> > Thanks,
> > pq
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>
[-- Attachment #1.2: Type: text/html, Size: 4690 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
next prev parent reply other threads:[~2020-05-28 6:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 4:31 Dynamically change enumeration list of DRM enumeration property Yogish Kulkarni
2020-05-26 6:56 ` Daniel Vetter
2020-05-26 7:39 ` Pekka Paalanen
2020-05-26 11:51 ` Yogish Kulkarni
2020-05-26 12:14 ` Daniel Vetter
2020-05-28 6:59 ` Yogish Kulkarni [this message]
2020-05-28 8:24 ` Daniel Vetter
2020-05-28 12:08 ` Yogish Kulkarni
2020-05-28 12:48 ` Pekka Paalanen
2020-06-01 3:52 ` Yogish Kulkarni
2020-06-01 8:49 ` Pekka Paalanen
2020-06-03 5:20 ` Yogish Kulkarni
2020-06-03 9:12 ` Pekka Paalanen
2020-06-03 9:57 ` Ville Syrjälä
2020-06-03 17:12 ` Emil Velikov
2020-06-03 20:20 ` Jonas Karlman
2020-06-05 7:53 ` Pekka Paalanen
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=CAL3Fm-L-iwGu60Zf15aYf9Xm9201sT2vU888Fv46Tv7x37Aq6Q@mail.gmail.com \
--to=yogishkulkarni@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@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;
as well as URLs for NNTP newsgroup(s).