diff mbox series

[v3,1/2] media: add support for the D3DFMT_R5G6B5 pixmap type

Message ID 20240918180540.10830-1-dg@cowlark.com
State Accepted
Commit a7e742e416bc331c0f409d6a3630471896e696d3
Headers show
Series [v3,1/2] media: add support for the D3DFMT_R5G6B5 pixmap type | expand

Commit Message

David Given Sept. 18, 2024, 6:05 p.m. UTC
This media format is used by the NXP Semiconductors 1fc9:009b chipset,
used by the Kaiweets KTI-W02 infrared camera.

Signed-off-by: David Given <dg@cowlark.com>

---
 drivers/media/common/uvc.c | 4 ++++
 include/linux/usb/uvc.h    | 3 +++
 2 files changed, 7 insertions(+)

Comments

Ricardo Ribalda Sept. 18, 2024, 8:41 p.m. UTC | #1
On Wed, 18 Sept 2024 at 20:06, David Given <dg@cowlark.com> wrote:
>
> This media format is used by the NXP Semiconductors 1fc9:009b chipset,
> used by the Kaiweets KTI-W02 infrared camera.
>
> Signed-off-by: David Given <dg@cowlark.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
>
> ---
>  drivers/media/common/uvc.c | 4 ++++
>  include/linux/usb/uvc.h    | 3 +++
>  2 files changed, 7 insertions(+)
>
> diff --git a/drivers/media/common/uvc.c b/drivers/media/common/uvc.c
> index c54c2268f..c12d58932 100644
> --- a/drivers/media/common/uvc.c
> +++ b/drivers/media/common/uvc.c
> @@ -96,6 +96,10 @@ static const struct uvc_format_desc uvc_fmts[] = {
>                 .guid           = UVC_GUID_FORMAT_RGBP,
>                 .fcc            = V4L2_PIX_FMT_RGB565,
>         },
> +       {
> +               .guid           = UVC_GUID_FORMAT_D3DFMT_R5G6B5,
> +               .fcc            = V4L2_PIX_FMT_RGB565,
> +       },
>         {
>                 .guid           = UVC_GUID_FORMAT_BGR3,
>                 .fcc            = V4L2_PIX_FMT_BGR24,
> diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
> index 88d96095b..01c3b2f45 100644
> --- a/include/linux/usb/uvc.h
> +++ b/include/linux/usb/uvc.h
> @@ -140,6 +140,9 @@
>  #define UVC_GUID_FORMAT_D3DFMT_L8 \
>         {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
>          0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_D3DFMT_R5G6B5 \
> +       {0x7b, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \
> +        0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}
>  #define UVC_GUID_FORMAT_KSMEDIA_L8_IR \
>         {0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \
>          0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> --
> 2.45.2
>
>
David Given Sept. 19, 2024, 11:48 a.m. UTC | #2
On Wed, 18 Sept 2024 at 22:41, Ricardo Ribalda <ribalda@chromium.org> wrote:
[...]
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>

Thanks very much!

No further action is required by me, right? The patch will get
automatically applied?
Laurent Pinchart Sept. 19, 2024, 10:30 p.m. UTC | #3
Hi David,

Thank you for the patch.

On Wed, Sep 18, 2024 at 08:05:39PM +0200, David Given wrote:
> This media format is used by the NXP Semiconductors 1fc9:009b chipset,
> used by the Kaiweets KTI-W02 infrared camera.
> 
> Signed-off-by: David Given <dg@cowlark.com>

The subject line should start with "media: uvcvideo: ". I'll change then
when applying the patch to my tree. No further action is needed from
you.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/common/uvc.c | 4 ++++
>  include/linux/usb/uvc.h    | 3 +++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/media/common/uvc.c b/drivers/media/common/uvc.c
> index c54c2268f..c12d58932 100644
> --- a/drivers/media/common/uvc.c
> +++ b/drivers/media/common/uvc.c
> @@ -96,6 +96,10 @@ static const struct uvc_format_desc uvc_fmts[] = {
>  		.guid		= UVC_GUID_FORMAT_RGBP,
>  		.fcc		= V4L2_PIX_FMT_RGB565,
>  	},
> +	{
> +		.guid		= UVC_GUID_FORMAT_D3DFMT_R5G6B5,
> +		.fcc		= V4L2_PIX_FMT_RGB565,
> +	},
>  	{
>  		.guid		= UVC_GUID_FORMAT_BGR3,
>  		.fcc		= V4L2_PIX_FMT_BGR24,
> diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
> index 88d96095b..01c3b2f45 100644
> --- a/include/linux/usb/uvc.h
> +++ b/include/linux/usb/uvc.h
> @@ -140,6 +140,9 @@
>  #define UVC_GUID_FORMAT_D3DFMT_L8 \
>  	{0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
>  	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_D3DFMT_R5G6B5 \
> +	{0x7b, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \
> +	 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}
>  #define UVC_GUID_FORMAT_KSMEDIA_L8_IR \
>  	{0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \
>  	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
David Given Sept. 19, 2024, 10:59 p.m. UTC | #4
On Fri, 20 Sept 2024 at 00:30, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
[...]
> The subject line should start with "media: uvcvideo: ". I'll change then
> when applying the patch to my tree. No further action is needed from
> you.

Thanks very much!
diff mbox series

Patch

diff --git a/drivers/media/common/uvc.c b/drivers/media/common/uvc.c
index c54c2268f..c12d58932 100644
--- a/drivers/media/common/uvc.c
+++ b/drivers/media/common/uvc.c
@@ -96,6 +96,10 @@  static const struct uvc_format_desc uvc_fmts[] = {
 		.guid		= UVC_GUID_FORMAT_RGBP,
 		.fcc		= V4L2_PIX_FMT_RGB565,
 	},
+	{
+		.guid		= UVC_GUID_FORMAT_D3DFMT_R5G6B5,
+		.fcc		= V4L2_PIX_FMT_RGB565,
+	},
 	{
 		.guid		= UVC_GUID_FORMAT_BGR3,
 		.fcc		= V4L2_PIX_FMT_BGR24,
diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
index 88d96095b..01c3b2f45 100644
--- a/include/linux/usb/uvc.h
+++ b/include/linux/usb/uvc.h
@@ -140,6 +140,9 @@ 
 #define UVC_GUID_FORMAT_D3DFMT_L8 \
 	{0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_D3DFMT_R5G6B5 \
+	{0x7b, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \
+	 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}
 #define UVC_GUID_FORMAT_KSMEDIA_L8_IR \
 	{0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}