]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jan 2022 18:59:41 +0000 (19:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jan 2022 18:59:41 +0000 (19:59 +0100)
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

queue-5.15/media-revert-media-uvcvideo-set-unique-vdev-name-based-in-type.patch [new file with mode: 0644]
queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch [new file with mode: 0644]
queue-5.15/series

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 (file)
index 0000000..9016ece
--- /dev/null
@@ -0,0 +1,60 @@
+From f66dcb32af19faf49cc4a9222c3152b10c6ec84a Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Tue, 7 Dec 2021 01:38:37 +0100
+Subject: media: Revert "media: uvcvideo: Set unique vdev name based in type"
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+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: <stable@vger.kernel.org>
+Fixes: e3f60e7e1a2b ("media: uvcvideo: Set unique vdev name based in type")
+Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca>
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..23fbacf
--- /dev/null
@@ -0,0 +1,39 @@
+From 01e16cb67cce68afaeb9c7bed72299036dbb0bc1 Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@canonical.com>
+Date: Fri, 3 Dec 2021 14:28:10 -0700
+Subject: platform/x86/intel: hid: add quirk to support Surface Go 3
+
+From: Alex Hung <alex.hung@canonical.com>
+
+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 <alex.hung@canonical.com>
+Link: https://lore.kernel.org/r/20211203212810.2666508-1-alex.hung@canonical.com
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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"),
++              },
++      },
+       { }
+ };
index faf8bcb9733818bba6c629bec4e893969da7f400..e57d11119a6f154eac36d6f7ac3cf73e3ad7e99d 100644 (file)
@@ -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