From: Sasha Levin Date: Sat, 8 Nov 2025 02:25:53 +0000 (-0500) Subject: Drop media-adv7180-add-missing-lock-in-suspend-callback.patch from 5.15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=thirdparty%2Fkernel%2Fstable-queue.git Drop media-adv7180-add-missing-lock-in-suspend-callback.patch from 5.15 Signed-off-by: Sasha Levin --- diff --git a/queue-5.15/media-adv7180-add-missing-lock-in-suspend-callback.patch b/queue-5.15/media-adv7180-add-missing-lock-in-suspend-callback.patch deleted file mode 100644 index cb4c15099c..0000000000 --- a/queue-5.15/media-adv7180-add-missing-lock-in-suspend-callback.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 3679e26f2f5a27a35f9a46abf0cffb8ae3ca2324 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Aug 2025 18:06:45 +0200 -Subject: media: adv7180: Add missing lock in suspend callback -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Niklas Söderlund - -[ Upstream commit 878c496ac5080f94a93a9216a8f70cfd67ace8c9 ] - -The adv7180_set_power() utilizes adv7180_write() which in turn requires -the state mutex to be held, take it before calling adv7180_set_power() -to avoid tripping a lockdep_assert_held(). - -Signed-off-by: Niklas Söderlund -Signed-off-by: Hans Verkuil -Signed-off-by: Sasha Levin ---- - drivers/media/i2c/adv7180.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c -index d9a99fcfacb17..7aefe72df9605 100644 ---- a/drivers/media/i2c/adv7180.c -+++ b/drivers/media/i2c/adv7180.c -@@ -752,6 +752,8 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd, - - if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) { - if (state->field != format->format.field) { -+ guard(mutex)(&state->mutex); -+ - state->field = format->format.field; - adv7180_set_power(state, false); - adv7180_set_field_mode(state); -@@ -1511,6 +1513,8 @@ static int adv7180_suspend(struct device *dev) - struct v4l2_subdev *sd = dev_get_drvdata(dev); - struct adv7180_state *state = to_state(sd); - -+ guard(mutex)(&state->mutex); -+ - return adv7180_set_power(state, false); - } - -@@ -1524,6 +1528,8 @@ static int adv7180_resume(struct device *dev) - if (ret < 0) - return ret; - -+ guard(mutex)(&state->mutex); -+ - ret = adv7180_set_power(state, state->powered); - if (ret) - return ret; --- -2.51.0 - diff --git a/queue-5.15/media-adv7180-do-not-write-format-to-device-in-set_f.patch b/queue-5.15/media-adv7180-do-not-write-format-to-device-in-set_f.patch deleted file mode 100644 index 0c5bdbfa0d..0000000000 --- a/queue-5.15/media-adv7180-do-not-write-format-to-device-in-set_f.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 37096e135d9b8b077326c40f6b89d9a0327547bd Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Aug 2025 18:06:52 +0200 -Subject: media: adv7180: Do not write format to device in set_fmt -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Niklas Söderlund - -[ Upstream commit 46c1e7814d1c3310ef23c01ed1a582ef0c8ab1d2 ] - -The .set_fmt callback should not write the new format directly do the -device, it should only store it and have it applied by .s_stream. - -The .s_stream callback already calls adv7180_set_field_mode() so it's -safe to remove programming of the device and just store the format and -have .s_stream apply it. - -Signed-off-by: Niklas Söderlund -Reviewed-by: Laurent Pinchart -Signed-off-by: Hans Verkuil -Signed-off-by: Sasha Levin ---- - drivers/media/i2c/adv7180.c | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c -index 7aefe72df9605..bb36f32ac3008 100644 ---- a/drivers/media/i2c/adv7180.c -+++ b/drivers/media/i2c/adv7180.c -@@ -751,14 +751,7 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd, - ret = adv7180_mbus_fmt(sd, &format->format); - - if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) { -- if (state->field != format->format.field) { -- guard(mutex)(&state->mutex); -- -- state->field = format->format.field; -- adv7180_set_power(state, false); -- adv7180_set_field_mode(state); -- adv7180_set_power(state, true); -- } -+ state->field = format->format.field; - } else { - framefmt = v4l2_subdev_get_try_format(sd, sd_state, 0); - *framefmt = format->format; --- -2.51.0 - diff --git a/queue-5.15/media-adv7180-only-validate-format-in-querystd.patch b/queue-5.15/media-adv7180-only-validate-format-in-querystd.patch deleted file mode 100644 index 058a0d5194..0000000000 --- a/queue-5.15/media-adv7180-only-validate-format-in-querystd.patch +++ /dev/null @@ -1,85 +0,0 @@ -From be592bb6a2131d769207f313c59d0c44028146ab Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Aug 2025 18:06:54 +0200 -Subject: media: adv7180: Only validate format in querystd -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Niklas Söderlund - -[ Upstream commit 91c5d7c849273d14bc4bae1b92666bdb5409294a ] - -The .querystd callback should not program the device with the detected -standard, it should only report the standard to user-space. User-space -may then use .s_std to set the standard, if it wants to use it. - -All that is required of .querystd is to setup the auto detection of -standards and report its findings. - -While at it add some documentation on why this can't happen while -streaming and improve the error handling using a scoped guard. - -Signed-off-by: Niklas Söderlund -Signed-off-by: Hans Verkuil -Signed-off-by: Sasha Levin ---- - drivers/media/i2c/adv7180.c | 37 ++++++++++++++++--------------------- - 1 file changed, 16 insertions(+), 21 deletions(-) - -diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c -index bb36f32ac3008..332f83c66c4e6 100644 ---- a/drivers/media/i2c/adv7180.c -+++ b/drivers/media/i2c/adv7180.c -@@ -351,32 +351,27 @@ static inline struct adv7180_state *to_state(struct v4l2_subdev *sd) - static int adv7180_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) - { - struct adv7180_state *state = to_state(sd); -- int err = mutex_lock_interruptible(&state->mutex); -- if (err) -- return err; -- -- if (state->streaming) { -- err = -EBUSY; -- goto unlock; -- } -+ int ret; - -- err = adv7180_set_video_standard(state, -- ADV7180_STD_AD_PAL_BG_NTSC_J_SECAM); -- if (err) -- goto unlock; -+ guard(mutex)(&state->mutex); - -- msleep(100); -- __adv7180_status(state, NULL, std); -+ /* -+ * We can't sample the standard if the device is streaming as that would -+ * interfere with the capture session as the VID_SEL reg is touched. -+ */ -+ if (state->streaming) -+ return -EBUSY; - -- err = v4l2_std_to_adv7180(state->curr_norm); -- if (err < 0) -- goto unlock; -+ /* Set the standard to autodetect PAL B/G/H/I/D, NTSC J or SECAM */ -+ ret = adv7180_set_video_standard(state, -+ ADV7180_STD_AD_PAL_BG_NTSC_J_SECAM); -+ if (ret) -+ return ret; - -- err = adv7180_set_video_standard(state, err); -+ /* Allow some time for the autodetection to run. */ -+ msleep(100); - --unlock: -- mutex_unlock(&state->mutex); -- return err; -+ return __adv7180_status(state, NULL, std); - } - - static int adv7180_s_routing(struct v4l2_subdev *sd, u32 input, --- -2.51.0 - diff --git a/queue-5.15/series b/queue-5.15/series index 038c0f8805..e115c06fe9 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -132,9 +132,6 @@ drm-msm-dsi-phy-toggle-back-buffer-resync-after-prep.patch drm-msm-dsi-phy_7nm-fix-missing-initial-vco-rate.patch ipv6-add-sanity-checks-on-ipv6_devconf.rpl_seg_enabl.patch net-nfc-nci-increase-nci_data_timeout-to-3000-ms.patch -media-adv7180-add-missing-lock-in-suspend-callback.patch -media-adv7180-do-not-write-format-to-device-in-set_f.patch -media-adv7180-only-validate-format-in-querystd.patch net-call-cond_resched-less-often-in-__release_sock.patch iommu-amd-skip-enabling-command-event-buffers-for-kd.patch drm-amd-add-more-cyan-skillfish-pci-ids.patch