* [PATCH] media: Fix P010 tiled format description
@ 2022-10-15 8:56 Jernej Skrabec
2022-10-15 8:59 ` Hans Verkuil
0 siblings, 1 reply; 3+ messages in thread
From: Jernej Skrabec @ 2022-10-15 8:56 UTC (permalink / raw)
To: mchehab, hverkuil-cisco
Cc: ezequiel, benjamin.gaignard, linux-media, linux-kernel,
Jernej Skrabec
There is only 31 bytes of space (without null character) for format
description. P010 tiled format description overflows that for 1
character and warning is generated when used. Fix that by changing Cb to
U and Cr to V, which is also consistent with some other descriptions.
Fixes: 3c8e19d3d3f9 ("media: Add P010 tiled format")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index e6fd355a2e92..5e5616d5915a 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1357,7 +1357,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_PIX_FMT_NV12_4L4: descr = "Y/CbCr 4:2:0 (4x4 Linear)"; break;
case V4L2_PIX_FMT_NV12_16L16: descr = "Y/CbCr 4:2:0 (16x16 Linear)"; break;
case V4L2_PIX_FMT_NV12_32L32: descr = "Y/CbCr 4:2:0 (32x32 Linear)"; break;
- case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/CbCr 4:2:0 (4x4 Linear)"; break;
+ case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/UV 4:2:0 (4x4 Linear)"; break;
case V4L2_PIX_FMT_NV12M: descr = "Y/CbCr 4:2:0 (N-C)"; break;
case V4L2_PIX_FMT_NV21M: descr = "Y/CrCb 4:2:0 (N-C)"; break;
case V4L2_PIX_FMT_NV16M: descr = "Y/CbCr 4:2:2 (N-C)"; break;
--
2.38.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: Fix P010 tiled format description
2022-10-15 8:56 [PATCH] media: Fix P010 tiled format description Jernej Skrabec
@ 2022-10-15 8:59 ` Hans Verkuil
2022-10-15 9:01 ` Jernej Škrabec
0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2022-10-15 8:59 UTC (permalink / raw)
To: Jernej Skrabec, mchehab
Cc: ezequiel, benjamin.gaignard, linux-media, linux-kernel
Hi Jernej,
On 10/15/22 10:56, Jernej Skrabec wrote:
> There is only 31 bytes of space (without null character) for format
> description. P010 tiled format description overflows that for 1
> character and warning is generated when used. Fix that by changing Cb to
> U and Cr to V, which is also consistent with some other descriptions.
>
> Fixes: 3c8e19d3d3f9 ("media: Add P010 tiled format")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
> drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index e6fd355a2e92..5e5616d5915a 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1357,7 +1357,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
> case V4L2_PIX_FMT_NV12_4L4: descr = "Y/CbCr 4:2:0 (4x4 Linear)"; break;
> case V4L2_PIX_FMT_NV12_16L16: descr = "Y/CbCr 4:2:0 (16x16 Linear)"; break;
> case V4L2_PIX_FMT_NV12_32L32: descr = "Y/CbCr 4:2:0 (32x32 Linear)"; break;
> - case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/CbCr 4:2:0 (4x4 Linear)"; break;
> + case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/UV 4:2:0 (4x4 Linear)"; break;
> case V4L2_PIX_FMT_NV12M: descr = "Y/CbCr 4:2:0 (N-C)"; break;
> case V4L2_PIX_FMT_NV21M: descr = "Y/CrCb 4:2:0 (N-C)"; break;
> case V4L2_PIX_FMT_NV16M: descr = "Y/CbCr 4:2:2 (N-C)"; break;
Sorry, I wasn't clear on irc: you should replace Cb and Cr with UV for ALL these
descriptions.
That way all the pixelformat descriptions use the same terminology and it fixes your
issue as well.
Regards,
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] media: Fix P010 tiled format description
2022-10-15 8:59 ` Hans Verkuil
@ 2022-10-15 9:01 ` Jernej Škrabec
0 siblings, 0 replies; 3+ messages in thread
From: Jernej Škrabec @ 2022-10-15 9:01 UTC (permalink / raw)
To: mchehab, Hans Verkuil
Cc: ezequiel, benjamin.gaignard, linux-media, linux-kernel
Dne sobota, 15. oktober 2022 ob 10:59:28 CEST je Hans Verkuil napisal(a):
> Hi Jernej,
>
> On 10/15/22 10:56, Jernej Skrabec wrote:
> > There is only 31 bytes of space (without null character) for format
> > description. P010 tiled format description overflows that for 1
> > character and warning is generated when used. Fix that by changing Cb to
> > U and Cr to V, which is also consistent with some other descriptions.
> >
> > Fixes: 3c8e19d3d3f9 ("media: Add P010 tiled format")
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> > ---
> >
> > drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
> > b/drivers/media/v4l2-core/v4l2-ioctl.c index e6fd355a2e92..5e5616d5915a
> > 100644
> > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> > @@ -1357,7 +1357,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc
> > *fmt)>
> > case V4L2_PIX_FMT_NV12_4L4: descr = "Y/CbCr 4:2:0 (4x4
Linear)"; break;
> > case V4L2_PIX_FMT_NV12_16L16: descr = "Y/CbCr 4:2:0 (16x16
Linear)";
> > break;
> > case V4L2_PIX_FMT_NV12_32L32: descr = "Y/CbCr 4:2:0 (32x32
Linear)";
> > break;>
> > - case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/CbCr 4:2:0
(4x4 Linear)";
> > break; + case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/UV 4:2:0
(4x4
> > Linear)"; break;>
> > case V4L2_PIX_FMT_NV12M: descr = "Y/CbCr 4:2:0 (N-C)";
break;
> > case V4L2_PIX_FMT_NV21M: descr = "Y/CrCb 4:2:0 (N-C)";
break;
> > case V4L2_PIX_FMT_NV16M: descr = "Y/CbCr 4:2:2 (N-C)";
break;
>
> Sorry, I wasn't clear on irc: you should replace Cb and Cr with UV for ALL
> these descriptions.
>
> That way all the pixelformat descriptions use the same terminology and it
> fixes your issue as well.
Ok, will do.
Best regards,
Jernej
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-15 9:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-15 8:56 [PATCH] media: Fix P010 tiled format description Jernej Skrabec
2022-10-15 8:59 ` Hans Verkuil
2022-10-15 9:01 ` Jernej Škrabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox