* [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110
@ 2021-03-15 6:59 Pawel Laszczak
2021-03-15 6:59 ` [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
2021-03-16 0:35 ` [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Peter Chen
0 siblings, 2 replies; 6+ messages in thread
From: Pawel Laszczak @ 2021-03-15 6:59 UTC (permalink / raw)
To: balbi, gregkh
Cc: linux-api, laurent.pinchart, linux-usb, linux-kernel, peter.chen,
kurahul, Pawel Laszczak
From: Pawel Laszczak <pawell@cadence.com>
Command Verifier during UVC Descriptor Tests (Class Video Control
Interface Descriptor Test Video) complains about:
Video Control Interface Header bcdUVC is 0x0100. USB Video Class
specification 1.0 has been replaced by 1.1 specification
(UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
---
Changlog:
v2:
- fixed typo in commit message
drivers/usb/gadget/function/uvc_configfs.c | 2 +-
drivers/usb/gadget/legacy/webcam.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 00fb58e50a15..cd28dec837dd 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -231,7 +231,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,
h->desc.bLength = UVC_DT_HEADER_SIZE(1);
h->desc.bDescriptorType = USB_DT_CS_INTERFACE;
h->desc.bDescriptorSubType = UVC_VC_HEADER;
- h->desc.bcdUVC = cpu_to_le16(0x0100);
+ h->desc.bcdUVC = cpu_to_le16(0x0110);
h->desc.dwClockFrequency = cpu_to_le32(48000000);
config_item_init_type_name(&h->item, name, &uvcg_control_header_type);
diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
index a9f8eb8e1c76..3a61de4bb2b1 100644
--- a/drivers/usb/gadget/legacy/webcam.c
+++ b/drivers/usb/gadget/legacy/webcam.c
@@ -90,7 +90,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
.bLength = UVC_DT_HEADER_SIZE(1),
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = UVC_VC_HEADER,
- .bcdUVC = cpu_to_le16(0x0100),
+ .bcdUVC = cpu_to_le16(0x0110),
.wTotalLength = 0, /* dynamic */
.dwClockFrequency = cpu_to_le32(48000000),
.bInCollection = 0, /* dynamic */
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor
2021-03-15 6:59 [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Pawel Laszczak
@ 2021-03-15 6:59 ` Pawel Laszczak
2021-03-15 7:10 ` Pawel Laszczak
2021-03-15 8:07 ` kernel test robot
2021-03-16 0:35 ` [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Peter Chen
1 sibling, 2 replies; 6+ messages in thread
From: Pawel Laszczak @ 2021-03-15 6:59 UTC (permalink / raw)
To: balbi, gregkh
Cc: linux-api, laurent.pinchart, linux-usb, linux-kernel, peter.chen,
kurahul, Pawel Laszczak
From: Pawel Laszczak <pawell@cadence.com>
According with USB Device Class Definition for Video Device the
Processing Unit Descriptor bLength should be 12 (10 + bmControlSize),
but it has 11.
Invalid length caused that Processing Unit Descriptor Test Video form
CV tool failed. To fix this issue patch adds bmVideoStandards into
uvc_processing_unit_descriptor structure.
The bmVideoStandards field was added in UVC 1.1 and it wasn't part of
UVC 1.0a.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
---
Changelog:
v3:
- updated the commit message
- added bmVideoStandard field to UVC gadget driver
v2:
- updated UVC_DT_PROCESSING_UNIT_SIZE macro
drivers/usb/gadget/function/f_uvc.c | 1 +
drivers/usb/gadget/legacy/webcam.c | 1 +
include/uapi/linux/usb/video.h | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 5d62720bb9e1..e3b0a79c8f01 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -823,6 +823,7 @@ static struct usb_function_instance *uvc_alloc_inst(void)
pd->bmControls[0] = 1;
pd->bmControls[1] = 0;
pd->iProcessing = 0;
+ pd->bmVideoStandards = 0;
od = &opts->uvc_output_terminal;
od->bLength = UVC_DT_OUTPUT_TERMINAL_SIZE;
diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
index 3a61de4bb2b1..accb4dacf715 100644
--- a/drivers/usb/gadget/legacy/webcam.c
+++ b/drivers/usb/gadget/legacy/webcam.c
@@ -125,6 +125,7 @@ static const struct uvc_processing_unit_descriptor uvc_processing = {
.bmControls[0] = 1,
.bmControls[1] = 0,
.iProcessing = 0,
+ .bmVideoStandrads = 0,
};
static const struct uvc_output_terminal_descriptor uvc_output_terminal = {
diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
index d854cb19c42c..bfdae12cdacf 100644
--- a/include/uapi/linux/usb/video.h
+++ b/include/uapi/linux/usb/video.h
@@ -302,9 +302,10 @@ struct uvc_processing_unit_descriptor {
__u8 bControlSize;
__u8 bmControls[2];
__u8 iProcessing;
+ __u8 bmVideoStandards;
} __attribute__((__packed__));
-#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))
+#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
/* 3.7.2.6. Extension Unit Descriptor */
struct uvc_extension_unit_descriptor {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor
2021-03-15 6:59 ` [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
@ 2021-03-15 7:10 ` Pawel Laszczak
2021-03-15 8:07 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: Pawel Laszczak @ 2021-03-15 7:10 UTC (permalink / raw)
To: Pawel Laszczak, balbi@kernel.org, gregkh@linuxfoundation.org
Cc: linux-api@vger.kernel.org, laurent.pinchart@ideasonboard.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
peter.chen@kernel.org, Rahul Kumar
Please ignore this one patch. I need to resend it. It causes compilation error.
Sorry for that.
>
>From: Pawel Laszczak <pawell@cadence.com>
>
>According with USB Device Class Definition for Video Device the
>Processing Unit Descriptor bLength should be 12 (10 + bmControlSize),
>but it has 11.
>
>Invalid length caused that Processing Unit Descriptor Test Video form
>CV tool failed. To fix this issue patch adds bmVideoStandards into
>uvc_processing_unit_descriptor structure.
>
>The bmVideoStandards field was added in UVC 1.1 and it wasn't part of
>UVC 1.0a.
>
>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>Signed-off-by: Pawel Laszczak <pawell@cadence.com>
>
>---
>Changelog:
>v3:
>- updated the commit message
>- added bmVideoStandard field to UVC gadget driver
>v2:
>- updated UVC_DT_PROCESSING_UNIT_SIZE macro
>
> drivers/usb/gadget/function/f_uvc.c | 1 +
> drivers/usb/gadget/legacy/webcam.c | 1 +
> include/uapi/linux/usb/video.h | 3 ++-
> 3 files changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
>index 5d62720bb9e1..e3b0a79c8f01 100644
>--- a/drivers/usb/gadget/function/f_uvc.c
>+++ b/drivers/usb/gadget/function/f_uvc.c
>@@ -823,6 +823,7 @@ static struct usb_function_instance *uvc_alloc_inst(void)
> pd->bmControls[0] = 1;
> pd->bmControls[1] = 0;
> pd->iProcessing = 0;
>+ pd->bmVideoStandards = 0;
>
> od = &opts->uvc_output_terminal;
> od->bLength = UVC_DT_OUTPUT_TERMINAL_SIZE;
>diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
>index 3a61de4bb2b1..accb4dacf715 100644
>--- a/drivers/usb/gadget/legacy/webcam.c
>+++ b/drivers/usb/gadget/legacy/webcam.c
>@@ -125,6 +125,7 @@ static const struct uvc_processing_unit_descriptor uvc_processing = {
> .bmControls[0] = 1,
> .bmControls[1] = 0,
> .iProcessing = 0,
>+ .bmVideoStandrads = 0,
> };
>
> static const struct uvc_output_terminal_descriptor uvc_output_terminal = {
>diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
>index d854cb19c42c..bfdae12cdacf 100644
>--- a/include/uapi/linux/usb/video.h
>+++ b/include/uapi/linux/usb/video.h
>@@ -302,9 +302,10 @@ struct uvc_processing_unit_descriptor {
> __u8 bControlSize;
> __u8 bmControls[2];
> __u8 iProcessing;
>+ __u8 bmVideoStandards;
> } __attribute__((__packed__));
>
>-#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))
>+#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
>
> /* 3.7.2.6. Extension Unit Descriptor */
> struct uvc_extension_unit_descriptor {
>--
>2.25.1
Regards,
Pawel Laszczak
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor
2021-03-15 6:59 ` [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
@ 2021-03-15 8:07 ` kernel test robot
2021-03-15 8:07 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-03-15 8:07 UTC (permalink / raw)
To: Pawel Laszczak, balbi, gregkh
Cc: kbuild-all, linux-api, laurent.pinchart, linux-usb, linux-kernel,
peter.chen, kurahul, Pawel Laszczak
[-- Attachment #1: Type: text/plain, Size: 2442 bytes --]
Hi Pawel,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on peter.chen-usb/for-usb-next linus/master balbi-usb/testing/next v5.12-rc3 next-20210315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pawel-Laszczak/usb-gadget-uvc-Updating-bcdUVC-field-to-0x0110/20210315-150207
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: xtensa-randconfig-r004-20210315 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/02bcbb1b029ca0cc6dd33c70363125bc2f3ce0d2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pawel-Laszczak/usb-gadget-uvc-Updating-bcdUVC-field-to-0x0110/20210315-150207
git checkout 02bcbb1b029ca0cc6dd33c70363125bc2f3ce0d2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/usb/gadget/legacy/webcam.c:128:3: error: 'const struct uvc_processing_unit_descriptor' has no member named 'bmVideoStandrads'; did you mean 'bmVideoStandards'?
128 | .bmVideoStandrads = 0,
| ^~~~~~~~~~~~~~~~
| bmVideoStandards
vim +128 drivers/usb/gadget/legacy/webcam.c
116
117 static const struct uvc_processing_unit_descriptor uvc_processing = {
118 .bLength = UVC_DT_PROCESSING_UNIT_SIZE(2),
119 .bDescriptorType = USB_DT_CS_INTERFACE,
120 .bDescriptorSubType = UVC_VC_PROCESSING_UNIT,
121 .bUnitID = 2,
122 .bSourceID = 1,
123 .wMaxMultiplier = cpu_to_le16(16*1024),
124 .bControlSize = 2,
125 .bmControls[0] = 1,
126 .bmControls[1] = 0,
127 .iProcessing = 0,
> 128 .bmVideoStandrads = 0,
129 };
130
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41726 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor
@ 2021-03-15 8:07 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-03-15 8:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2500 bytes --]
Hi Pawel,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on peter.chen-usb/for-usb-next linus/master balbi-usb/testing/next v5.12-rc3 next-20210315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pawel-Laszczak/usb-gadget-uvc-Updating-bcdUVC-field-to-0x0110/20210315-150207
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: xtensa-randconfig-r004-20210315 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/02bcbb1b029ca0cc6dd33c70363125bc2f3ce0d2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pawel-Laszczak/usb-gadget-uvc-Updating-bcdUVC-field-to-0x0110/20210315-150207
git checkout 02bcbb1b029ca0cc6dd33c70363125bc2f3ce0d2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/usb/gadget/legacy/webcam.c:128:3: error: 'const struct uvc_processing_unit_descriptor' has no member named 'bmVideoStandrads'; did you mean 'bmVideoStandards'?
128 | .bmVideoStandrads = 0,
| ^~~~~~~~~~~~~~~~
| bmVideoStandards
vim +128 drivers/usb/gadget/legacy/webcam.c
116
117 static const struct uvc_processing_unit_descriptor uvc_processing = {
118 .bLength = UVC_DT_PROCESSING_UNIT_SIZE(2),
119 .bDescriptorType = USB_DT_CS_INTERFACE,
120 .bDescriptorSubType = UVC_VC_PROCESSING_UNIT,
121 .bUnitID = 2,
122 .bSourceID = 1,
123 .wMaxMultiplier = cpu_to_le16(16*1024),
124 .bControlSize = 2,
125 .bmControls[0] = 1,
126 .bmControls[1] = 0,
127 .iProcessing = 0,
> 128 .bmVideoStandrads = 0,
129 };
130
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41726 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110
2021-03-15 6:59 [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Pawel Laszczak
2021-03-15 6:59 ` [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
@ 2021-03-16 0:35 ` Peter Chen
1 sibling, 0 replies; 6+ messages in thread
From: Peter Chen @ 2021-03-16 0:35 UTC (permalink / raw)
To: Pawel Laszczak
Cc: balbi, gregkh, linux-api, laurent.pinchart, linux-usb,
linux-kernel, kurahul
On 21-03-15 07:59:25, Pawel Laszczak wrote:
> From: Pawel Laszczak <pawell@cadence.com>
>
> Command Verifier during UVC Descriptor Tests (Class Video Control
> Interface Descriptor Test Video) complains about:
>
> Video Control Interface Header bcdUVC is 0x0100. USB Video Class
> specification 1.0 has been replaced by 1.1 specification
> (UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
>
> ---
> Changlog:
> v2:
> - fixed typo in commit message
>
> drivers/usb/gadget/function/uvc_configfs.c | 2 +-
> drivers/usb/gadget/legacy/webcam.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
> index 00fb58e50a15..cd28dec837dd 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -231,7 +231,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,
> h->desc.bLength = UVC_DT_HEADER_SIZE(1);
> h->desc.bDescriptorType = USB_DT_CS_INTERFACE;
> h->desc.bDescriptorSubType = UVC_VC_HEADER;
> - h->desc.bcdUVC = cpu_to_le16(0x0100);
> + h->desc.bcdUVC = cpu_to_le16(0x0110);
> h->desc.dwClockFrequency = cpu_to_le32(48000000);
>
> config_item_init_type_name(&h->item, name, &uvcg_control_header_type);
> diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
> index a9f8eb8e1c76..3a61de4bb2b1 100644
> --- a/drivers/usb/gadget/legacy/webcam.c
> +++ b/drivers/usb/gadget/legacy/webcam.c
> @@ -90,7 +90,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
> .bLength = UVC_DT_HEADER_SIZE(1),
> .bDescriptorType = USB_DT_CS_INTERFACE,
> .bDescriptorSubType = UVC_VC_HEADER,
> - .bcdUVC = cpu_to_le16(0x0100),
> + .bcdUVC = cpu_to_le16(0x0110),
> .wTotalLength = 0, /* dynamic */
> .dwClockFrequency = cpu_to_le32(48000000),
> .bInCollection = 0, /* dynamic */
> --
> 2.25.1
>
--
Thanks,
Peter Chen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-16 0:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-15 6:59 [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Pawel Laszczak
2021-03-15 6:59 ` [PATCH v3 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
2021-03-15 7:10 ` Pawel Laszczak
2021-03-15 8:07 ` kernel test robot
2021-03-15 8:07 ` kernel test robot
2021-03-16 0:35 ` [PATCH v2 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Peter Chen
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.