<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,<br>
    </p>
    <div class="moz-cite-prefix">Am 10.01.24 um 14:42 schrieb Andri
      Yngvason:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFNQBQxnMh4aPfm+U8vEfxoTdQ+FByfqwUUDnMTzgkrW2+ZZqw@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">mið., 10. jan. 2024 kl. 13:09 skrifaði Werner Sembach <a class="moz-txt-link-rfc2396E" href="mailto:wse@tuxedocomputers.com"><wse@tuxedocomputers.com></a>:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
Hi,

Am 10.01.24 um 11:11 schrieb Andri Yngvason:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Hi,

mið., 10. jan. 2024 kl. 09:27 skrifaði Maxime Ripard <a class="moz-txt-link-rfc2396E" href="mailto:mripard@kernel.org"><mripard@kernel.org></a>:
</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">On Tue, Jan 09, 2024 at 06:11:02PM +0000, Andri Yngvason wrote:
</pre>
            <blockquote type="cite">
              <pre class="moz-quote-pre" wrap="">From: Werner Sembach <a class="moz-txt-link-rfc2396E" href="mailto:wse@tuxedocomputers.com"><wse@tuxedocomputers.com></a>

Add a new general drm property "preferred color format" which can be used
by userspace to tell the graphic drivers to which color format to use.

Possible options are:
     - auto (default/current behaviour)
     - rgb
     - ycbcr444
     - ycbcr422 (not supported by both amdgpu and i915)
     - ycbcr420

In theory the auto option should choose the best available option for the
current setup, but because of bad internal conversion some monitors look
better with rgb and some with ycbcr444.
</pre>
            </blockquote>
            <pre class="moz-quote-pre" wrap="">I looked at the patch and I couldn't find what is supposed to happen if
you set it to something else than auto, and the driver can't match that.
Are we supposed to fallback to the "auto" behaviour, or are we suppose
to reject the mode entirely?

The combination with the active output format property suggests the
former, but we should document it explicitly.
</pre>
          </blockquote>
          <pre class="moz-quote-pre" wrap="">It is also my understanding that it should fall back to the "auto"
behaviour. I will add this to the documentation.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Yes, that was the intention, and then userspace can check, but it wasn't well
received: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/amd/-/issues/476#note_964530">https://gitlab.freedesktop.org/drm/amd/-/issues/476#note_964530</a>

Actually a lot of the thoughts that went into the original patch set can be
found in that topic.

There was another iteration of the patch set that I never finished and sent to
the LKML because I got discouraged by this:
<a class="moz-txt-link-freetext" href="https://lore.kernel.org/dri-devel/20210623102923.70877c1a@eldfell/">https://lore.kernel.org/dri-devel/20210623102923.70877c1a@eldfell/</a>
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Well, I've implemented this for sway and wlroots now and Simon has
reacted positively, so this does appear likely to end up as a feature
in wlroots based compositors.

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
I can try to dig it up, but it is completely untested and I don't think I still
have the respective TODO list anymore, so I don't know if it is a better or
worst starting point than the last iteration I sent to the LKML.

</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
You can send the patches to me if you want and I can see if they're
useful. I'm really only interested in the color format part though.
Alternatively, you can continue your work and post it to LKML and I
can focus on the userspace side and testing. By the way, I have an
HDMI analyzer that can tell me the actual color format.</pre>
    </blockquote>
    <p>Searched for what I still had in my private repo, see
      attachments, filename is the branch name I used and like I said: I
      don't know which state these branches are in.</p>
    <p>The hacking_ branch was based on <span
        style="color:#000000;background-color:#ffffff;">25fe90f43fa312213b653dc1f12fd2d80f855883
        from linux-next and the rejected_ one on
        132b189b72a94328f17fd70321bfe63e5b4208e9 from drm-tip</span>.</p>
    <p>And the rejected_ one is 2 weeks newer.</p>
    <p>To pick it up again I would first need to allocate some time for
      it, ... which could take some time.</p>
    <p>With a HDMI analyzer at hand you are better equipped then me
      already. I was working with printf statements, Monitor OSD's and
      test patterns like
<a class="moz-txt-link-freetext" href="https://media.extron.com/public/technology/landing/vector4k/img/scalfe-444Chroma.png">https://media.extron.com/public/technology/landing/vector4k/img/scalfe-444Chroma.png</a>
      and <a class="moz-txt-link-freetext" href="http://www.lagom.nl/lcd-test/">http://www.lagom.nl/lcd-test/</a> while being red blind xD.<br>
    </p>
    <blockquote type="cite"
cite="mid:CAFNQBQxnMh4aPfm+U8vEfxoTdQ+FByfqwUUDnMTzgkrW2+ZZqw@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">

Thanks,
Andri
</pre>
    </blockquote>
  </body>
</html>