<div dir="ltr"><div dir="ltr">Hi Daniel,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">þri., 9. jan. 2024 kl. 22:32 skrifaði Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>>:<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 Tue, 9 Jan 2024 at 18:12, Andri Yngvason <<a href="mailto:andri@yngvason.is" target="_blank">andri@yngvason.is</a>> wrote:<br>
> + * active color format:<br>
> + * This read-only property tells userspace the color format actually used<br>
> + * by the hardware display engine "on the cable" on a connector. The chosen<br>
> + * value depends on hardware capabilities, both display engine and<br>
> + * connected monitor. Drivers shall use<br>
> + * drm_connector_attach_active_color_format_property() to install this<br>
> + * property. Possible values are "not applicable", "rgb", "ycbcr444",<br>
> + * "ycbcr422", and "ycbcr420".<br>
<br>
How does userspace determine what's happened without polling? Will it<br>
only change after an `ALLOW_MODESET` commit, and be guaranteed to be<br>
updated after the commit has completed and the event being sent?<br>
Should it send a HOTPLUG event? Other?<br></blockquote><div><br></div><div>Userspace does not determine what's happened without polling. The purpose of this property is not for programmatic verification that the preferred property was applied. It is my understanding that it's mostly intended for debugging purposes. It should only change as a consequence of modesetting, although I didn't actually look into what happens if you set the "preferred color format" outside of a modeset.</div><div><br></div><div>The way I've implemented things in sway, calling the "preferred_signal_format" command triggers a modeset with the "preferred color format" set and calling "get_outputs", immediately queries the "actual color format" and displays it.</div><div><br></div><div>Regards,</div><div>Andri<br></div></div></div>