Dynamically change enumeration list of DRM enumeration property

Daniel Vetter daniel at ffwll.ch
Tue May 26 06:56:28 UTC 2020

On Tue, May 26, 2020 at 6:31 AM Yogish Kulkarni
<yogishkulkarni at 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.

Neither works, properties and their value ranges are static. Also
generally the idea is that the properties on the drm_connector reflect
what the source side can do, irrespective of the sink capabilities.
Since a lot of sinks have bad EDID and you might want to overwrite
what the sink claims works.

Usually how we do this is a second property that the kernel sets, and
userspace can only read, which shows what the sink is capable of.
Sometimes we also just let userspace re-decode the EDID and figure
that out itself, but that's kinda a bad interface.

Also for anything new, please keep in mind our rules for new uapi:

Cheers, Daniel

Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

More information about the dri-devel mailing list