Re: [PATCH] drm/simpledrm: Only advertise formats that are supported
From: Michel Dänzer
Date: Fri Oct 28 2022 - 05:19:03 EST
On 2022-10-27 12:53, Hector Martin wrote:
>
> Q: Why not just add a conversion from XRGB2101010 to XRGB8888?
> A: Because that would only fix KDE, and would make it slower vs. not
> advertising XRGB2101010 at all (double conversions, plus kernel
> conversion can be slower). Plus, it doesn't make any sense as it only
> fills in one entry in the conversion matrix. If we wanted to actually
> fill out the conversion matrix, and thus support everything simpledrm
> has advertised to day correctly, we would need helpers for:
>
> rgb565->rgb888
> rgb888->rgb565
> rgb565->xrgb2101010
> rgb888->xrgb2101010
> xrgb2101010->rgb565
> xrgb2101010->rgb888
> xrgb2101010->xrgb8888
>
> That seems like overkill and unlikely to actually help anyone, it'd just
> give userspace more options to shoot itself in the foot with a
> sub-optimal format choice. And it's a pile of code.
In addition to everything you mentioned, converting from XRGB2101010 to XRGB8888 loses the additional information, defeating the only point of using XRGB2101010 instead of XRGB8888 in the first place.
--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and Xwayland developer