All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Pawel Laszczak <pawell@cadence.com>
Cc: balbi@kernel.org, gregkh@linuxfoundation.org,
	linux-api@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, peter.chen@kernel.org,
	kurahul@cadence.com
Subject: Re: [PATCH 2/2] usb: webcam: Invalid size of Processing Unit Descriptor
Date: Sun, 14 Mar 2021 04:30:06 +0200	[thread overview]
Message-ID: <YE11Lk3XXbB1B+aD@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20210308102735.9251-2-pawell@gli-login.cadence.com>

Hi Pawel,

Thank you for the patch.

On Mon, Mar 08, 2021 at 11:27:35AM +0100, Pawel Laszczak wrote:
> 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, it wasn't part of UVC
1.0a. The commit message should explain this.

This change looks good to me, but could you also update
drivers/usb/gadget/legacy/webcam.c and
drivers/usb/gadget/function/f_uvc.c to explicitly set this field to 0 ?

With that,

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

> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> ---
>  include/uapi/linux/usb/video.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
> index d854cb19c42c..2a54e8fdd341 100644
> --- a/include/uapi/linux/usb/video.h
> +++ b/include/uapi/linux/usb/video.h
> @@ -302,6 +302,7 @@ 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))

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2021-03-14  2:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 10:27 [PATCH 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Pawel Laszczak
2021-03-08 10:27 ` [PATCH 2/2] usb: webcam: Invalid size of Processing Unit Descriptor Pawel Laszczak
2021-03-14  1:46   ` Peter Chen
2021-03-14  2:30   ` Laurent Pinchart [this message]
2021-03-14  1:58 ` [PATCH 1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 Peter Chen
2021-03-14  2:18   ` Laurent Pinchart
2021-03-15  5:10     ` Pawel Laszczak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YE11Lk3XXbB1B+aD@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kurahul@cadence.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.