From 69d0c764e893300d7c2811e91c97cd9170bae7ef Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 13 Jan 2022 19:59:41 +0100 Subject: [PATCH] 5.15-stable patches added patches: media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch --- ...o-set-unique-vdev-name-based-in-type.patch | 60 +++++++++++++++++++ ...id-add-quirk-to-support-surface-go-3.patch | 39 ++++++++++++ queue-5.15/series | 2 + 3 files changed, 101 insertions(+) create mode 100644 queue-5.15/media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch create mode 100644 queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch diff --git a/queue-5.15/media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch b/queue-5.15/media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch new file mode 100644 index 00000000000..9016ece7413 --- /dev/null +++ b/queue-5.15/media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch @@ -0,0 +1,60 @@ +From f66dcb32af19faf49cc4a9222c3152b10c6ec84a Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Tue, 7 Dec 2021 01:38:37 +0100 +Subject: media: Revert "media: uvcvideo: Set unique vdev name based in type" + +From: Ricardo Ribalda + +commit f66dcb32af19faf49cc4a9222c3152b10c6ec84a upstream. + +A lot of userspace depends on a descriptive name for vdev. Without this +patch, users have a hard time figuring out which camera shall they use +for their video conferencing. + +This reverts commit e3f60e7e1a2b451f538f9926763432249bcf39c4. + +Link: https://lore.kernel.org/linux-media/20211207003840.1212374-2-ribalda@chromium.org +Cc: +Fixes: e3f60e7e1a2b ("media: uvcvideo: Set unique vdev name based in type") +Reported-by: Nicolas Dufresne +Signed-off-by: Ricardo Ribalda +Reviewed-by: Laurent Pinchart +Reviewed-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/usb/uvc/uvc_driver.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +--- a/drivers/media/usb/uvc/uvc_driver.c ++++ b/drivers/media/usb/uvc/uvc_driver.c +@@ -2194,7 +2194,6 @@ int uvc_register_video_device(struct uvc + const struct v4l2_file_operations *fops, + const struct v4l2_ioctl_ops *ioctl_ops) + { +- const char *name; + int ret; + + /* Initialize the video buffers queue. */ +@@ -2223,20 +2222,16 @@ int uvc_register_video_device(struct uvc + case V4L2_BUF_TYPE_VIDEO_CAPTURE: + default: + vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; +- name = "Video Capture"; + break; + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + vdev->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; +- name = "Video Output"; + break; + case V4L2_BUF_TYPE_META_CAPTURE: + vdev->device_caps = V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING; +- name = "Metadata"; + break; + } + +- snprintf(vdev->name, sizeof(vdev->name), "%s %u", name, +- stream->header.bTerminalLink); ++ strscpy(vdev->name, dev->name, sizeof(vdev->name)); + + /* + * Set the driver data before calling video_register_device, otherwise diff --git a/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch b/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch new file mode 100644 index 00000000000..23fbacf2d18 --- /dev/null +++ b/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch @@ -0,0 +1,39 @@ +From 01e16cb67cce68afaeb9c7bed72299036dbb0bc1 Mon Sep 17 00:00:00 2001 +From: Alex Hung +Date: Fri, 3 Dec 2021 14:28:10 -0700 +Subject: platform/x86/intel: hid: add quirk to support Surface Go 3 + +From: Alex Hung + +commit 01e16cb67cce68afaeb9c7bed72299036dbb0bc1 upstream. + +Similar to other systems Surface Go 3 requires a DMI quirk to enable +5 button array for power and volume buttons. + +Buglink: https://github.com/linux-surface/linux-surface/issues/595 + +Cc: stable@vger.kernel.org +Signed-off-by: Alex Hung +Link: https://lore.kernel.org/r/20211203212810.2666508-1-alex.hung@canonical.com +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/intel/hid.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/platform/x86/intel/hid.c ++++ b/drivers/platform/x86/intel/hid.c +@@ -106,6 +106,13 @@ static const struct dmi_system_id button + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"), + }, + }, ++ { ++ .ident = "Microsoft Surface Go 3", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"), ++ }, ++ }, + { } + }; + diff --git a/queue-5.15/series b/queue-5.15/series index faf8bcb9733..e57d11119a6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -34,3 +34,5 @@ can-gs_usb-gs_can_start_xmit-zero-initialize-hf-flags-reserved.patch random-fix-data-race-on-crng_node_pool.patch random-fix-data-race-on-crng-init-time.patch random-fix-crash-on-multiple-early-calls-to-add_bootloader_randomness.patch +platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch +media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch -- 2.47.2