<div dir="ltr"><div>I am trying to find a way through Weston which will allow setting specific encoding at display output. Could you please elaborate on  why it is best to let DRM driver automatically configure which encoding to choose rather than making it selectable by DRM client ? I am not able to find reference to past discussion about this. I was only able to find a proposed change - <a href="https://lists.freedesktop.org/archives/intel-gfx/2017-April/125451.html">https://lists.freedesktop.org/archives/intel-gfx/2017-April/125451.html</a> but am not able to find why it got rejected.</div><div><br></div><div>Alternatively, is there existing way through which DRM clients can specify preference for output encoding ? Or currently it's all up to the DRM driver to choose what output encoding to use.<br></div><div><br></div><div>Thanks,</div><div>-Yogish<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 28, 2020 at 1:54 PM Daniel Vetter <<a href="mailto:daniel@ffwll.ch">daniel@ffwll.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, May 28, 2020 at 12:29:43PM +0530, Yogish Kulkarni wrote:<br>
> For creating new source property, is it good to follow<br>
> "drm_mode_create_hdmi_colorspace_property()"  as an example ? It seems that<br>
> currently there is no standard DRM property which allows DRM client to set<br>
> a specific output encoding (like YUV420, YUV422 etc). Also, there is no<br>
> standard property for letting client select YUV/RGB color range. I see<br>
> there are two ways to introduce new properties, 1. do something like<br>
> drm_mode_create_hdmi_colorspace_property 2. create custom property similar<br>
> to "Broadcast RGB". Is there opinion on which is a preferable way to expose<br>
> encoding and color rage selection property ?<br>
<br>
I guess first question is "why?" Thus far we've gone with the opinion that<br>
automatically configuring output stuff as much as possible is best. What's<br>
the use-case where the driver can't select this?<br>
-Daniel<br>
<br>
> <br>
> Thanks,<br>
> -Yogish<br>
> <br>
> On Tue, May 26, 2020 at 5:44 PM Daniel Vetter <<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>> wrote:<br>
> <br>
> > On Tue, May 26, 2020 at 9:39 AM Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>><br>
> > wrote:<br>
> > ><br>
> > > On Tue, 26 May 2020 10:01:23 +0530<br>
> > > Yogish Kulkarni <<a href="mailto:yogishkulkarni@gmail.com" target="_blank">yogishkulkarni@gmail.com</a>> wrote:<br>
> > ><br>
> > > > Hi,<br>
> > > ><br>
> > > > Is it possible to dynamically change enumeration list of  DRM<br>
> > enumeration<br>
> > > > property ? Motivation behind this question is to understand whether it<br>
> > is<br>
> > > > possible to create connector enum property (e.g a property which will<br>
> > list<br>
> > > > supported output encodings -  like yuv420, yuv422 etc) whose list of<br>
> > > > supported enum values could be changed dynamically e.g. based on which<br>
> > sink<br>
> > > > is connected.<br>
> > > ><br>
> > > > I think there is existing EDID connector property whose value changes<br>
> > based<br>
> > > > on connected sink. EDID is a BLOB property, I am trying to understand<br>
> > if<br>
> > > > this is also possible for ENUM type property. There is<br>
> > > > "drm_property_replace_blob" to replace blob but I wasn't able to find<br>
> > any<br>
> > > > API which could replace list of supported enums. Alternatively, would<br>
> > it be<br>
> > > > good idea to destroy custom enum property created by a driver and<br>
> > create<br>
> > > > new enum property with new list of supported enums e.g when there is a<br>
> > > > HOTPLUG event.<br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > > looking at Weston code, it *might* cope with it. A hotplug event does<br>
> > > cause Weston to re-discover all properties of a connector. This is<br>
> > > specific to connectors only.<br>
> ><br>
> > Currently the kernel doesn't cope with that. Only objects which can be<br>
> > added/removed are connectors, blobs and fbs (iow the refcounted ones).<br>
> > Adding/removing properties isn't supported, nor is adding/removing<br>
> > which properties are attached to which object while that object is<br>
> > life.<br>
> ><br>
> > Also I think the uapi risk for this is way too big, see my other reply<br>
> > for what we've done in the past for stuff like this.<br>
> > -Daniel<br>
> ><br>
> > > The race exists though: userspace might be poking at KMS after you<br>
> > > changed the property in the kernel but before userspace handles the<br>
> > > hotplug event. You'd have to check that does not cause regressions. I<br>
> > > guess for a completely new property, the risk seems low, as userspace<br>
> > > does not know to poke at it (risk of using outdated property or value<br>
> > > IDs causing unexpected atomic commit failure). Also I'm not aware of<br>
> > > any KMS program that would yet attempt blind KMS state save & restore<br>
> > > to sanitize the KMS state after dropping and re-gaining DRM master.<br>
> > ><br>
> > > You'd have to check all other KMS using programs too: every Wayland<br>
> > > compositor, Xorg, DRM Vulkan WSI(?), ...<br>
> > ><br>
> > ><br>
> > > Thanks,<br>
> > > pq<br>
> > > _______________________________________________<br>
> > > dri-devel mailing list<br>
> > > <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Daniel Vetter<br>
> > Software Engineer, Intel Corporation<br>
> > +41 (0) 79 365 57 48 - <a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
> ><br>
<br>
-- <br>
Daniel Vetter<br>
Software Engineer, Intel Corporation<br>
<a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
</blockquote></div>