mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: "Maíra Canal" <mcanal@igalia.com>,
	"Melissa Wen" <melissa.srw@gmail.com>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Haneen Mohammed" <hamohammed.sa@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Rodrigo Siqueira" <siqueira@igalia.com>,
	"Simona Vetter" <simona.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, arthurgrillo@riseup.net,
	linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com,
	miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com,
	seanpaul@google.com, nicolejadeyee@google.com
Subject: Re: [PATCH v4 2/8] drm/vkms: Add support for ARGB8888 formats
Date: Fri, 13 Jun 2025 19:28:49 +0200	[thread overview]
Message-ID: <115564ae-4b61-47be-9a9d-9c27acd4192c@bootlin.com> (raw)
In-Reply-To: <eba688fe-d270-420b-9619-121fb4b8ba1d@igalia.com>



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@bootlin.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


  reply	other threads:[~2025-06-13 17:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30 14:05 [PATCH v4 0/8] drm/vkms: Add support for multiple plane formats Louis Chauvet
2025-05-30 14:05 ` [PATCH v4 1/8] drm/vkms: Create helpers macro to avoid code duplication in format callbacks Louis Chauvet
2025-06-11 19:51   ` Maíra Canal
2025-05-30 14:05 ` [PATCH v4 2/8] drm/vkms: Add support for ARGB8888 formats Louis Chauvet
2025-06-11 19:55   ` Maíra Canal
2025-06-13 17:28     ` Louis Chauvet [this message]
2025-06-21 10:52       ` Maíra Canal
2025-05-30 14:05 ` [PATCH v4 3/8] drm/vkms: Add support for ARGB16161616 formats Louis Chauvet
2025-06-11 19:57   ` Maíra Canal
2025-05-30 14:05 ` [PATCH v4 4/8] drm/vkms: Add support for RGB565 formats Louis Chauvet
2025-06-11 20:02   ` Maíra Canal
2025-06-13 17:38     ` Louis Chauvet
2025-05-30 14:06 ` [PATCH v4 5/8] drm/vkms: Add support for RGB888 formats Louis Chauvet
2025-06-11 20:02   ` Maíra Canal
2025-05-30 14:06 ` [PATCH v4 6/8] drm/vkms: Change YUV helpers to support u16 inputs for conversion Louis Chauvet
2025-06-11 20:24   ` Maíra Canal
2025-06-13 18:44     ` Louis Chauvet
2025-06-11 20:35   ` Maíra Canal
2025-05-30 14:06 ` [PATCH v4 7/8] drm/vkms: Create helper macro for YUV formats Louis Chauvet
2025-06-11 20:32   ` Maíra Canal
2025-05-30 14:06 ` [PATCH v4 8/8] drm/vkms: Add P01* formats Louis Chauvet
2026-08-13 15:19   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=115564ae-4b61-47be-9a9d-9c27acd4192c@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=airlied@gmail.com \
    --cc=arthurgrillo@riseup.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=jeremie.dautheribes@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mairacanal@riseup.net \
    --cc=mcanal@igalia.com \
    --cc=melissa.srw@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mripard@kernel.org \
    --cc=nicolejadeyee@google.com \
    --cc=seanpaul@google.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®