[PATCH] drm/udl: Add ARGB8888 as a format
Thomas Zimmermann
tzimmermann at suse.de
Wed Mar 6 12:07:02 UTC 2024
Hi,
sorry that I did not see the patch before.
Am 27.02.24 um 23:19 schrieb Douglas Anderson:
> Even though the UDL driver converts to RGB565 internally (see
> pixel32_to_be16() in udl_transfer.c), it advertises XRGB8888 for
> compatibility. Let's add ARGB8888 to that list.
We had a heated discussion about the emulation of color formats. It was
decided that XRGB8888 is the only format to support; and that's only
because legacy userspace sometimes expects it. Adding other formats to
the list should not be done easily.
>
> This makes UDL devices work on ChromeOS again after commit
> c91acda3a380 ("drm/gem: Check for valid formats"). Prior to that
> commit things were "working" because we'd silently treat the ARGB8888
> that ChromeOS wanted as XRGB8888.
This problem has been caused by userspace. Why can it not be fixed there?
And udl is just one driver. Any other driver without ARGB8888, such as
simpledrm or ofdrm, would be affected. Do these work?
Best regards
Thomas
>
> Fixes: c91acda3a380 ("drm/gem: Check for valid formats")
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
> ---
>
> drivers/gpu/drm/udl/udl_modeset.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index 7702359c90c2..0f8d3678770e 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -253,6 +253,7 @@ static int udl_handle_damage(struct drm_framebuffer *fb,
> static const uint32_t udl_primary_plane_formats[] = {
> DRM_FORMAT_RGB565,
> DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_ARGB8888,
> };
>
> static const uint64_t udl_primary_plane_fmtmods[] = {
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
More information about the dri-devel
mailing list