[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <115564ae-4b61-47be-9a9d-9c27acd4192c@bootlin.com>
Date: Fri, 13 Jun 2025 19:28:49 +0200
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: Maíra Canal <mcanal@...lia.com>,
Melissa Wen <melissa.srw@...il.com>, Maíra Canal
<mairacanal@...eup.net>, Haneen Mohammed <hamohammed.sa@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Rodrigo Siqueira <siqueira@...lia.com>,
Simona Vetter <simona.vetter@...ll.ch>
Cc: dri-devel@...ts.freedesktop.org, arthurgrillo@...eup.net,
linux-kernel@...r.kernel.org, jeremie.dautheribes@...tlin.com,
miquel.raynal@...tlin.com, thomas.petazzoni@...tlin.com,
seanpaul@...gle.com, nicolejadeyee@...gle.com
Subject: Re: [PATCH v4 2/8] drm/vkms: Add support for ARGB8888 formats
Le 11/06/2025 à 21:55, Maíra Canal a écrit :
> Hi Louis,
>
> On 5/30/25 11:05, Louis Chauvet wrote:
>> The formats XRGB8888 and ARGB8888 were already supported.
>> Add the support for:
>> - XBGR8888
>> - RGBX8888
>> - BGRX8888
>> - ABGR8888
>> - RGBA8888
>> - BGRA8888
>>
>> Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>
>> ---
>
> [...]
>
>> +READ_LINE_ARGB8888(RGBX8888_read_line, px, 0xFF, px[3], px[2], px[1])
>> +READ_LINE_ARGB8888(BGRX8888_read_line, px, 0xFF, px[1], px[2], px[3])
>
> How did you test those two formats? I noticed that IGT (kms_plane tests)
> doesn't test them.
Hi Maíra,
Thanks for your review!
I wrote this a long time ago, so I don't remember. I was probably greedy
and added all the "trivial" formats I was able to do and missed that
this format was not tested.
For this revision, I just started kms_plane to check if it was happy
after the rebase, I did not check the formats one by one.
Do you want me to remove those formats? I think it costs nothing to keep
them, especially with the new READ_LINE_ARGB8888 macro, but I will
comply if you think we should only merge tested formats.
Thanks,
Louis Chauvet
> Best Regards,
> - Maíra
>
>>
>> READ_LINE_ARGB8888(ARGB8888_read_line, px, px[3], px[2], px[1], px[0])
>> READ_LINE_ARGB8888(ABGR8888_read_line, px, px[3], px[0], px[1], px[2])
>> +READ_LINE_ARGB8888(RGBA8888_read_line, px, px[0], px[3], px[2], px[1])
>> +READ_LINE_ARGB8888(BGRA8888_read_line, px, px[0], px[1], px[2], px[3])
>>
>> READ_LINE_le16161616(ARGB16161616_read_line, px, px[3], px[2], px[1], px[0])
>> READ_LINE_le16161616(XRGB16161616_read_line, px, cpu_to_le16(0xFFFF), px[2], px[1], px[0])
>> @@ -644,10 +649,20 @@ pixel_read_line_t get_pixel_read_line_function(u32 format)
>> switch (format) {
>> case DRM_FORMAT_ARGB8888:
>> return &ARGB8888_read_line;
>> - case DRM_FORMAT_XRGB8888:
>> - return &XRGB8888_read_line;
>> case DRM_FORMAT_ABGR8888:
>> return &ABGR8888_read_line;
>> + case DRM_FORMAT_BGRA8888:
>> + return &BGRA8888_read_line;
>> + case DRM_FORMAT_RGBA8888:
>> + return &RGBA8888_read_line;
>> + case DRM_FORMAT_XRGB8888:
>> + return &XRGB8888_read_line;
>> + case DRM_FORMAT_XBGR8888:
>> + return &XBGR8888_read_line;
>> + case DRM_FORMAT_RGBX8888:
>> + return &RGBX8888_read_line;
>> + case DRM_FORMAT_BGRX8888:
>> + return &BGRX8888_read_line;
>> case DRM_FORMAT_ARGB16161616:
>> return &ARGB16161616_read_line;
>> case DRM_FORMAT_XRGB16161616:
>> diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
>> index e3fdd161d0f0..b7f498944c50 100644
>> --- a/drivers/gpu/drm/vkms/vkms_plane.c
>> +++ b/drivers/gpu/drm/vkms/vkms_plane.c
>> @@ -14,8 +14,13 @@
>>
>> static const u32 vkms_formats[] = {
>> DRM_FORMAT_ARGB8888,
>> - DRM_FORMAT_XRGB8888,
>> DRM_FORMAT_ABGR8888,
>> + DRM_FORMAT_BGRA8888,
>> + DRM_FORMAT_RGBA8888,
>> + DRM_FORMAT_XRGB8888,
>> + DRM_FORMAT_XBGR8888,
>> + DRM_FORMAT_RGBX8888,
>> + DRM_FORMAT_BGRX8888,
>> DRM_FORMAT_XRGB16161616,
>> DRM_FORMAT_ARGB16161616,
>> DRM_FORMAT_RGB565,
>>
>
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists