]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2025 15:14:14 +0000 (16:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2025 15:14:14 +0000 (16:14 +0100)
added patches:
media-ov5640-fix-get_light_freq-on-auto.patch
media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch
media-uvcvideo-remove-redundant-null-assignment.patch
soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch

queue-5.4/media-ov5640-fix-get_light_freq-on-auto.patch [new file with mode: 0644]
queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch [new file with mode: 0644]
queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch [new file with mode: 0644]

diff --git a/queue-5.4/media-ov5640-fix-get_light_freq-on-auto.patch b/queue-5.4/media-ov5640-fix-get_light_freq-on-auto.patch
new file mode 100644 (file)
index 0000000..275709d
--- /dev/null
@@ -0,0 +1,33 @@
+From 001d3753538d26ddcbef011f5643cfff58a7f672 Mon Sep 17 00:00:00 2001
+From: Sam Bobrowicz <sam@elite-embedded.com>
+Date: Fri, 22 Nov 2024 09:28:01 +0100
+Subject: media: ov5640: fix get_light_freq on auto
+
+From: Sam Bobrowicz <sam@elite-embedded.com>
+
+commit 001d3753538d26ddcbef011f5643cfff58a7f672 upstream.
+
+Light frequency was not properly returned when in auto
+mode and the detected frequency was 60Hz.
+
+Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
+Signed-off-by: Michal Simek <michal.simek@amd.com>
+Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/i2c/ov5640.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/i2c/ov5640.c
++++ b/drivers/media/i2c/ov5640.c
+@@ -1368,6 +1368,7 @@ static int ov5640_get_light_freq(struct
+                       light_freq = 50;
+               } else {
+                       /* 60Hz */
++                      light_freq = 60;
+               }
+       }
diff --git a/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch b/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch
new file mode 100644 (file)
index 0000000..eeeb385
--- /dev/null
@@ -0,0 +1,46 @@
+From c31cffd5ae2c3d7ef21d9008977a9d117ce7a64e Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Thu, 14 Nov 2024 19:10:30 +0000
+Subject: media: uvcvideo: Fix event flags in uvc_ctrl_send_events
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+commit c31cffd5ae2c3d7ef21d9008977a9d117ce7a64e upstream.
+
+If there is an event that needs the V4L2_EVENT_CTRL_CH_FLAGS flag, all
+the following events will have that flag, regardless if they need it or
+not.
+
+This is because we keep using the same variable all the time and we do
+not reset its original value.
+
+Cc: stable@vger.kernel.org
+Fixes: 805e9b4a06bf ("[media] uvcvideo: Send control change events for slave ctrls when the master changes")
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Link: https://lore.kernel.org/r/20241114-uvc-roi-v15-1-64cfeb56b6f8@chromium.org
+Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/uvc/uvc_ctrl.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/usb/uvc/uvc_ctrl.c
++++ b/drivers/media/usb/uvc/uvc_ctrl.c
+@@ -1400,13 +1400,13 @@ static void uvc_ctrl_send_events(struct
+ {
+       struct uvc_control_mapping *mapping;
+       struct uvc_control *ctrl;
+-      u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
+       unsigned int i;
+       unsigned int j;
+       for (i = 0; i < xctrls_count; ++i) {
+-              ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
++              u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
++              ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
+               if (ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
+                       /* Notification will be sent from an Interrupt event. */
+                       continue;
diff --git a/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch b/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch
new file mode 100644 (file)
index 0000000..29e9a94
--- /dev/null
@@ -0,0 +1,40 @@
+From 04d3398f66d2d31c4b8caea88f051a4257b7a161 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ribalda@chromium.org>
+Date: Tue, 3 Dec 2024 21:20:09 +0000
+Subject: media: uvcvideo: Remove redundant NULL assignment
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+commit 04d3398f66d2d31c4b8caea88f051a4257b7a161 upstream.
+
+ctrl->handle will only be different than NULL for controls that have
+mappings. This is because that assignment is only done inside
+uvc_ctrl_set() for mapped controls.
+
+Cc: stable@vger.kernel.org
+Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives")
+Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-2-26c867231118@chromium.org
+Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/uvc/uvc_ctrl.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/media/usb/uvc/uvc_ctrl.c
++++ b/drivers/media/usb/uvc/uvc_ctrl.c
+@@ -1367,10 +1367,8 @@ bool uvc_ctrl_status_event_async(struct
+       struct uvc_device *dev = chain->dev;
+       struct uvc_ctrl_work *w = &dev->async_ctrl;
+-      if (list_empty(&ctrl->info.mappings)) {
+-              ctrl->handle = NULL;
++      if (list_empty(&ctrl->info.mappings))
+               return false;
+-      }
+       w->data = data;
+       w->urb = urb;
index d380caae51b0c8deb0815c35fb700184e8c4fb4f..acfe76e6bd2e2dae2b904d3524e2d0ebbdf31c9a 100644 (file)
@@ -136,3 +136,7 @@ serial-sh-sci-do-not-probe-the-serial-port-if-its-slot-in-sci_ports-is-in-use.pa
 powerpc-pseries-eeh-fix-get-pe-state-translation.patch
 alsa-hda-fix-headset-detection-failure-due-to-unstable-sort.patch
 kbuild-move-wenum-enum-conversion-to-w-2.patch
+soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch
+media-ov5640-fix-get_light_freq-on-auto.patch
+media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch
+media-uvcvideo-remove-redundant-null-assignment.patch
diff --git a/queue-5.4/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch b/queue-5.4/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch
new file mode 100644 (file)
index 0000000..51767bb
--- /dev/null
@@ -0,0 +1,35 @@
+From 70096b4990848229d0784c5e51dc3c7c072f1111 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Thu, 22 Aug 2024 18:48:51 +0200
+Subject: soc: qcom: smem_state: fix missing of_node_put in error path
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+commit 70096b4990848229d0784c5e51dc3c7c072f1111 upstream.
+
+If of_parse_phandle_with_args() succeeds, the OF node reference should
+be dropped, regardless of number of phandle arguments.
+
+Cc: stable@vger.kernel.org
+Fixes: 9460ae2ff308 ("soc: qcom: Introduce common SMEM state machine code")
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20240822164853.231087-2-krzysztof.kozlowski@linaro.org
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/soc/qcom/smem_state.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/soc/qcom/smem_state.c
++++ b/drivers/soc/qcom/smem_state.c
+@@ -116,7 +116,8 @@ struct qcom_smem_state *qcom_smem_state_
+       if (args.args_count != 1) {
+               dev_err(dev, "invalid #qcom,smem-state-cells\n");
+-              return ERR_PTR(-EINVAL);
++              state = ERR_PTR(-EINVAL);
++              goto put;
+       }
+       state = of_node_to_state(args.np);