* [PATCH] uvc: Add D3DFMT_L8 support
@ 2017-11-03 17:57 Nicolas Dufresne
2017-11-04 7:11 ` Laurent Pinchart
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dufresne @ 2017-11-03 17:57 UTC (permalink / raw)
To: laurent.pinchart; +Cc: mchehab, linux-media, linux-kernel, Nicolas Dufresne
Microsoft HoloLense UVC sensor uses D3DFMT instead of FOURCC when
exposing formats. This add support for D3DFMT_L8 as exposed from
the Acer Windows Mixed Reality Headset.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
drivers/media/usb/uvc/uvc_driver.c | 5 +++++
drivers/media/usb/uvc/uvcvideo.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 6d22b22cb35b..56f70851f88b 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -203,6 +203,11 @@ static struct uvc_format_desc uvc_fmts[] = {
.guid = UVC_GUID_FORMAT_INZI,
.fcc = V4L2_PIX_FMT_INZI,
},
+ {
+ .name = "Greyscale 8-bit (D3DFMT_L8)",
+ .guid = UVC_GUID_FORMAT_D3DFMT_L8,
+ .fcc = V4L2_PIX_FMT_GREY,
+ },
};
/* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 34c7ee6cc9e5..fbc1f433ff05 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -153,6 +153,11 @@
{ 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
+#define UVC_GUID_FORMAT_D3DFMT_L8 \
+ {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
+ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+
+
/* ------------------------------------------------------------------------
* Driver specific constants.
*/
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] uvc: Add D3DFMT_L8 support
2017-11-03 17:57 [PATCH] uvc: Add D3DFMT_L8 support Nicolas Dufresne
@ 2017-11-04 7:11 ` Laurent Pinchart
2017-11-06 20:13 ` [PATCH v2] " Nicolas Dufresne
0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2017-11-04 7:11 UTC (permalink / raw)
To: Nicolas Dufresne; +Cc: mchehab, linux-media, linux-kernel
Hi Nicolas,
Thank you for the patch.
On Friday, 3 November 2017 19:57:46 EET Nicolas Dufresne wrote:
> Microsoft HoloLense UVC sensor uses D3DFMT instead of FOURCC when
> exposing formats. This add support for D3DFMT_L8 as exposed from
s/add/adds/
> the Acer Windows Mixed Reality Headset.
>
> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> drivers/media/usb/uvc/uvc_driver.c | 5 +++++
> drivers/media/usb/uvc/uvcvideo.h | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c
> b/drivers/media/usb/uvc/uvc_driver.c index 6d22b22cb35b..56f70851f88b
> 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -203,6 +203,11 @@ static struct uvc_format_desc uvc_fmts[] = {
> .guid = UVC_GUID_FORMAT_INZI,
> .fcc = V4L2_PIX_FMT_INZI,
> },
> + {
> + .name = "Greyscale 8-bit (D3DFMT_L8)",
> + .guid = UVC_GUID_FORMAT_D3DFMT_L8,
> + .fcc = V4L2_PIX_FMT_GREY,
> + },
How about moving this entry just after the two existing GREY entries ?
Apart from this,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
If you're fine with those two minor changes there's no need to resubmit, I'll
fold the changes in when applying the patch.
> };
>
> /* ------------------------------------------------------------------------
> diff --git a/drivers/media/usb/uvc/uvcvideo.h
> b/drivers/media/usb/uvc/uvcvideo.h index 34c7ee6cc9e5..fbc1f433ff05 100644
> --- a/drivers/media/usb/uvc/uvcvideo.h
> +++ b/drivers/media/usb/uvc/uvcvideo.h
> @@ -153,6 +153,11 @@
> { 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
> 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
>
> +#define UVC_GUID_FORMAT_D3DFMT_L8 \
> + {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
> + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +
> +
> /* ------------------------------------------------------------------------
> * Driver specific constants.
> */
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] uvc: Add D3DFMT_L8 support
2017-11-04 7:11 ` Laurent Pinchart
@ 2017-11-06 20:13 ` Nicolas Dufresne
2017-11-07 3:40 ` Laurent Pinchart
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dufresne @ 2017-11-06 20:13 UTC (permalink / raw)
To: laurent.pinchart; +Cc: mchehab, linux-media, linux-kernel, Nicolas Dufresne
Microsoft HoloLense UVC sensor uses D3DFMT instead of FOURCC when
exposing formats. This adds support for D3DFMT_L8 as exposed from
the Acer Windows Mixed Reality Headset.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
drivers/media/usb/uvc/uvc_driver.c | 5 +++++
drivers/media/usb/uvc/uvcvideo.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 6d22b22cb35b..113130b6b2d6 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -94,6 +94,11 @@ static struct uvc_format_desc uvc_fmts[] = {
.fcc = V4L2_PIX_FMT_GREY,
},
{
+ .name = "Greyscale 8-bit (D3DFMT_L8)",
+ .guid = UVC_GUID_FORMAT_D3DFMT_L8,
+ .fcc = V4L2_PIX_FMT_GREY,
+ },
+ {
.name = "Greyscale 10-bit (Y10 )",
.guid = UVC_GUID_FORMAT_Y10,
.fcc = V4L2_PIX_FMT_Y10,
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 34c7ee6cc9e5..fbc1f433ff05 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -153,6 +153,11 @@
{ 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
+#define UVC_GUID_FORMAT_D3DFMT_L8 \
+ {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
+ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+
+
/* ------------------------------------------------------------------------
* Driver specific constants.
*/
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] uvc: Add D3DFMT_L8 support
2017-11-06 20:13 ` [PATCH v2] " Nicolas Dufresne
@ 2017-11-07 3:40 ` Laurent Pinchart
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2017-11-07 3:40 UTC (permalink / raw)
To: Nicolas Dufresne; +Cc: mchehab, linux-media, linux-kernel
Hi Nicolas,
Thank you for the patch.
On Monday, 6 November 2017 22:13:28 EET Nicolas Dufresne wrote:
> Microsoft HoloLense UVC sensor uses D3DFMT instead of FOURCC when
> exposing formats. This adds support for D3DFMT_L8 as exposed from
> the Acer Windows Mixed Reality Headset.
>
> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and applied to my tree with "uvc" replaced by "uvcvideo" in the subject to
match other commits.
> ---
> drivers/media/usb/uvc/uvc_driver.c | 5 +++++
> drivers/media/usb/uvc/uvcvideo.h | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c
> b/drivers/media/usb/uvc/uvc_driver.c index 6d22b22cb35b..113130b6b2d6
> 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -94,6 +94,11 @@ static struct uvc_format_desc uvc_fmts[] = {
> .fcc = V4L2_PIX_FMT_GREY,
> },
> {
> + .name = "Greyscale 8-bit (D3DFMT_L8)",
> + .guid = UVC_GUID_FORMAT_D3DFMT_L8,
> + .fcc = V4L2_PIX_FMT_GREY,
> + },
> + {
> .name = "Greyscale 10-bit (Y10 )",
> .guid = UVC_GUID_FORMAT_Y10,
> .fcc = V4L2_PIX_FMT_Y10,
> diff --git a/drivers/media/usb/uvc/uvcvideo.h
> b/drivers/media/usb/uvc/uvcvideo.h index 34c7ee6cc9e5..fbc1f433ff05 100644
> --- a/drivers/media/usb/uvc/uvcvideo.h
> +++ b/drivers/media/usb/uvc/uvcvideo.h
> @@ -153,6 +153,11 @@
> { 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
> 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
>
> +#define UVC_GUID_FORMAT_D3DFMT_L8 \
> + {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
> + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +
> +
> /* ------------------------------------------------------------------------
> * Driver specific constants.
> */
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 3:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 17:57 [PATCH] uvc: Add D3DFMT_L8 support Nicolas Dufresne
2017-11-04 7:11 ` Laurent Pinchart
2017-11-06 20:13 ` [PATCH v2] " Nicolas Dufresne
2017-11-07 3:40 ` Laurent Pinchart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.