On Mon, 2026-02-02 at 13:46 +0100, Louis Chauvet wrote:
> 
> 
> On 2/2/26 13:14, Louis Chauvet wrote:
> > 
> > 
> > On 2/1/26 15:02, Renjun Wang wrote:
> > > Add support for the following planar YUV formats:
> > > - DRM_FORMAT_YUV410
> > > - DRM_FORMAT_YUV411
> > > - DRM_FORMAT_YVU410
> > > - DRM_FORMAT_YVU411
> > > 
> > > These formats are handled by the existing planar_yuv_read_line()
> > > function, which correctly handles the subsampling defined in each
> > > format's drm_format_info.
> > > 
> > > The YVU variants (YVU410, YVU411) are also added to
> > > get_conversion_matrix_to_argb_u16() to ensure the U and V columns
> > > are swapped correctly in the conversion matrix.
> > > 
> > > Signed-off-by: Renjun Wang <[email protected]>
> > 
> > This patch seems correct, so you can add my:
> > 
> > Acked-by: Louis Chauvet <[email protected]>
>  >
> > But how did you test it? I don't see the support in IGT. You have
> > an 
> > other application / use-case?
> 
> I revert my Acked-by for this patch. It looks like the list in 
> vkms_config.c wasn’t updated, which means the format won’t be usable
> by 
> userspace.
> 
> Could you also add support in IGT so that kms_plane can test it? From
> what I recall, this shouldn’t be much more complex than the VKMS 
> implementation—just a few switches to handle the proper conversions.
> 
> Thanks,
> Louis Chauvet
> 
> > Thanks,
> > Louis Chauvet
> > 
> > > ---
> > >   drivers/gpu/drm/vkms/vkms_formats.c | 6 ++++++
> > >   1 file changed, 6 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c
> > > b/drivers/gpu/drm/ 
> > > vkms/vkms_formats.c
> > > index dfb8e13cba87..5ef5d49a44ef 100644
> > > --- a/drivers/gpu/drm/vkms/vkms_formats.c
> > > +++ b/drivers/gpu/drm/vkms/vkms_formats.c
> > > @@ -730,9 +730,13 @@ pixel_read_line_t 
> > > get_pixel_read_line_function(u32 format)
> > >       case DRM_FORMAT_P012:
> > >       case DRM_FORMAT_P016:
> > >           return &YUV161616_semiplanar_read_line;
> > > +    case DRM_FORMAT_YUV410:
> > > +    case DRM_FORMAT_YUV411:
> > >       case DRM_FORMAT_YUV420:
> > >       case DRM_FORMAT_YUV422:
> > >       case DRM_FORMAT_YUV444:
> > > +    case DRM_FORMAT_YVU410:
> > > +    case DRM_FORMAT_YVU411:
> > >       case DRM_FORMAT_YVU420:
> > >       case DRM_FORMAT_YVU422:
> > >       case DRM_FORMAT_YVU444:
> > > @@ -921,6 +925,8 @@ void get_conversion_matrix_to_argb_u16(u32
> > > format,
> > >       memcpy(matrix, matrix_to_copy, sizeof(*matrix_to_copy));
> > >       switch (format) {
> > > +    case DRM_FORMAT_YVU410:
> > > +    case DRM_FORMAT_YVU411:
> > >       case DRM_FORMAT_YVU420:
> > >       case DRM_FORMAT_YVU422:
> > >       case DRM_FORMAT_YVU444:
> > 

Hi Louis,

Sorry for missing vkms_formats[] update for YUV410, YUV411, YVU410 and
YVU411 foramts, I will fix it in version 2 patch.

I sent one igt-gpu-tool patch to [email protected]  for
supporting YUV410, YUV411, YVU410 and YVU411 formats about one day ago.
But the patch did not appeared in the https://lore.kernel.org/igt-dev/.
I have no idea why, maybe I will check it later. With this patch, I
tested VKMS YUV410, YUV411, YVU410 and YVU411 formats supporting using
kms_plane pixel-format subtest. There is the output on my local
machine:

renjun@vm:~/code_step/igt-gpu-tools/build/tests$ sudo
IGT_FORCE_DRIVER=vkms ./kms_plane --run-subtest pixel-format
IGT-Version: 2.3-ge7c61ef99 (x86_64) (Linux: 6.17.13+deb13-amd64
x86_64)
Using IGT_SRANDOM=1770042302 for randomisation
Opened device: /dev/dri/card1
Starting subtest: pixel-format
Using (pipe A + Virtual-2) to run the subtest.
Starting dynamic subtest: pipe-A-plane-0
...
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr limited range) on A.0
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr full range) on A.0
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr limited range) on A.0
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr full range) on A.0
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr limited range) on A.0
Testing format YUV9(0x39565559) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr full range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr limited range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr full range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr limited range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr full range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr limited range) on A.0
Testing format YU11(0x31315559) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr full range) on A.0
...
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr limited range) on A.0
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr full range) on A.0
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr limited range) on A.0
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr full range) on A.0
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr limited range) on A.0
Testing format YVU9(0x39555659) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr full range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr limited range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.601
YCbCr, YCbCr full range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr limited range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.709
YCbCr, YCbCr full range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr limited range) on A.0
Testing format YV11(0x31315659) / modifier linear(0x0) (ITU-R BT.2020
YCbCr, YCbCr full range) on A.0
...
Dynamic subtest pipe-A-plane-0: SUCCESS (53.322s)

Reply via email to