Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1454136 Details for
Bug 1592454
uvcvideo found UVC 1.50 device Integrated Webcam but failed to initialize the device.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to set UVC 1.5 video control at 48
file_1592454.txt (text/plain), 3.23 KB, created by
Rémi Menegon
on 2018-06-24 13:21:51 UTC
(
hide
)
Description:
Patch to set UVC 1.5 video control at 48
Filename:
MIME Type:
Creator:
Rémi Menegon
Created:
2018-06-24 13:21:51 UTC
Size:
3.23 KB
patch
obsolete
>From f620d1d7afc7db57ab59f35000752840c91f67e7 Mon Sep 17 00:00:00 2001 >From: ming_qian <ming_qian@realsil.com.cn> >Date: Tue, 8 May 2018 22:13:08 -0400 >Subject: media: uvcvideo: Support realtek's UVC 1.5 device > >media: uvcvideo: Support UVC 1.5 video probe & commit controls > >The length of UVC 1.5 video control is 48, and it is 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. > >[laurent.pinchart@ideasonboard.com: Factor out code to helper function, update size checks] > >Cc: stable@vger.kernel.org >Signed-off-by: ming_qian <ming_qian@realsil.com.cn> >Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> >Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> >Tested-by: Ana Guerrero Lopez <ana.guerrero@collabora.com> >Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> >--- > drivers/media/usb/uvc/uvc_video.c | 24 ++++++++++++++++++------ > 1 file changed, 18 insertions(+), 6 deletions(-) > >diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c >index aa0082f..b28c997 100644 >--- a/drivers/media/usb/uvc/uvc_video.c >+++ b/drivers/media/usb/uvc/uvc_video.c >@@ -163,14 +163,27 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, > } > } > >+static size_t uvc_video_ctrl_size(struct uvc_streaming *stream) >+{ >+ /* >+ * Return the size of the video probe and commit controls, which depends >+ * on the protocol version. >+ */ >+ if (stream->dev->uvc_version < 0x0110) >+ return 26; >+ else if (stream->dev->uvc_version < 0x0150) >+ return 34; >+ else >+ return 48; >+} >+ > static int uvc_get_video_ctrl(struct uvc_streaming *stream, > struct uvc_streaming_control *ctrl, int probe, u8 query) > { >+ u16 size = uvc_video_ctrl_size(stream); > u8 *data; >- u16 size; > int ret; > >- size = stream->dev->uvc_version >= 0x0110 ? 34 : 26; > if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) && > query == UVC_GET_DEF) > return -EIO; >@@ -225,7 +238,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, > ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]); > ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]); > >- if (size == 34) { >+ if (size >= 34) { > ctrl->dwClockFrequency = get_unaligned_le32(&data[26]); > ctrl->bmFramingInfo = data[30]; > ctrl->bPreferedVersion = data[31]; >@@ -254,11 +267,10 @@ out: > static int uvc_set_video_ctrl(struct uvc_streaming *stream, > struct uvc_streaming_control *ctrl, int probe) > { >+ u16 size = uvc_video_ctrl_size(stream); > u8 *data; >- u16 size; > int ret; > >- size = stream->dev->uvc_version >= 0x0110 ? 34 : 26; > data = kzalloc(size, GFP_KERNEL); > if (data == NULL) > return -ENOMEM; >@@ -275,7 +287,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream, > put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]); > put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]); > >- if (size == 34) { >+ if (size >= 34) { > put_unaligned_le32(ctrl->dwClockFrequency, &data[26]); > data[30] = ctrl->bmFramingInfo; > data[31] = ctrl->bPreferedVersion; >-- >cgit v1.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1592454
: 1454136