[SRU] [X/A/B/OEM-A/OEM-B] [PATCH 0/1] Fix Non-working UVC 1.5 Webcam on XPS 9370

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [X/A/B/OEM-A/OEM-B] [PATCH 0/1] Fix Non-working UVC 1.5 Webcam on XPS 9370

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1763748

[Impact]
UVC1.5 Realtek webcam on XPS 9370 does not work.

[Test]
Both the bug reporter and I can confirm the patch from Realtek works.

[Fix]
Use correct version control length for UVC1.5.

[Regression Potential]
Low. This only affects UVC1.5 webcams, which is quite rare in the wild.

ming_qian (1):
  media: uvcvideo: Support realtek's UVC 1.5 device

 drivers/media/usb/uvc/uvc_video.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU] [X/A/B/OEM-A/OEM-B] [PATCH 1/1] UBUNTU: SAUCE: media: uvcvideo: Support realtek's UVC 1.5 device

Kai-Heng Feng
From: ming_qian <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1763748

The length of UVC 1.5 video control is 48, and it id 34 for UVC 1.1.
Change it to 48 for UVC 1.5 device,
and the UVC 1.5 device can be recognized.

More changes to the driver are needed for full UVC 1.5 compatibility.
However, at least the UVC 1.5 Realtek RTS5847/RTS5852 cameras have
been reported to work well.

Signed-off-by: ming_qian <[hidden email]>
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/media/usb/uvc/uvc_video.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index fb86d6af398d..4114915f1171 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -171,6 +171,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
  int ret;
 
  size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
+ if (stream->dev->uvc_version >= 0x0150)
+ size = 48;
  if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
  query == UVC_GET_DEF)
  return -EIO;
@@ -259,6 +261,8 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,
  int ret;
 
  size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
+ if (stream->dev->uvc_version >= 0x0150)
+ size = 48;
  data = kzalloc(size, GFP_KERNEL);
  if (data == NULL)
  return -ENOMEM;
--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU] [X/A/B/OEM-A/OEM-B] [PATCH 1/1] UBUNTU: SAUCE: media: uvcvideo: Support realtek's UVC 1.5 device

AceLan Kao-3
Reply | Threaded
Open this post in threaded view
|

[Acked] [SRU] [X/A/B/OEM-A/OEM-B] [PATCH 1/1] UBUNTU: SAUCE: media: uvcvideo: Support realtek's UVC 1.5 device

Andy Whitcroft-3
In reply to this post by Kai-Heng Feng
On Mon, May 14, 2018 at 01:37:09PM +0800, Kai-Heng Feng wrote:

> From: ming_qian <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1763748
>
> The length of UVC 1.5 video control is 48, and it id 34 for UVC 1.1.
> Change it to 48 for UVC 1.5 device,
> and the UVC 1.5 device can be recognized.
>
> More changes to the driver are needed for full UVC 1.5 compatibility.
> However, at least the UVC 1.5 Realtek RTS5847/RTS5852 cameras have
> been reported to work well.
>
> Signed-off-by: ming_qian <[hidden email]>
> Signed-off-by: Kai-Heng Feng <[hidden email]>
> ---
>  drivers/media/usb/uvc/uvc_video.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index fb86d6af398d..4114915f1171 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -171,6 +171,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
>   int ret;
>  
>   size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
> + if (stream->dev->uvc_version >= 0x0150)
> + size = 48;
>   if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
>   query == UVC_GET_DEF)
>   return -EIO;
> @@ -259,6 +261,8 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,
>   int ret;
>  
>   size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
> + if (stream->dev->uvc_version >= 0x0150)
> + size = 48;
>   data = kzalloc(size, GFP_KERNEL);
>   if (data == NULL)
>   return -ENOMEM;
> --
> 2.17.0
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Seems to do what is claimed and is easily testable.

Acked-by: Andy Whitcroft <[hidden email]>

-apw

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[X/A/B]: [SRU] [X/A/B/OEM-A/OEM-B] [PATCH 0/1] Fix Non-working UVC 1.5 Webcam on XPS 9370

Kleber Souza
In reply to this post by Kai-Heng Feng
On 05/14/18 07:37, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1763748
>
> [Impact]
> UVC1.5 Realtek webcam on XPS 9370 does not work.
>
> [Test]
> Both the bug reporter and I can confirm the patch from Realtek works.
>
> [Fix]
> Use correct version control length for UVC1.5.
>
> [Regression Potential]
> Low. This only affects UVC1.5 webcams, which is quite rare in the wild.
>
> ming_qian (1):
>   media: uvcvideo: Support realtek's UVC 1.5 device
>
>  drivers/media/usb/uvc/uvc_video.c | 4 ++++
>  1 file changed, 4 insertions(+)
>

Applied to xenial/master-next, artful/master-next and bionic/master-next
branches.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[unstable]: [SRU] [X/A/B/OEM-A/OEM-B] [PATCH 0/1] Fix Non-working UVC 1.5 Webcam on XPS 9370

Seth Forshee
In reply to this post by Kai-Heng Feng
On Mon, May 14, 2018 at 01:37:08PM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1763748
>
> [Impact]
> UVC1.5 Realtek webcam on XPS 9370 does not work.
>
> [Test]
> Both the bug reporter and I can confirm the patch from Realtek works.
>
> [Fix]
> Use correct version control length for UVC1.5.
>
> [Regression Potential]
> Low. This only affects UVC1.5 webcams, which is quite rare in the wild.

Applied to unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team