linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
@ 2025-07-04  7:53 ` Sakari Ailus
  2025-07-07  9:35   ` AngeloGioacchino Del Regno
  2025-07-18 10:58   ` Herbert Xu
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 16+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:53 UTC (permalink / raw)
  To: Olivia Mackall, Herbert Xu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Hadar Gat, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Daniel Golle,
	Aurelien Jarno, Nicolas Frattaroli, Heiko Stuebner,
	Maxime Coquelin, Alexandre Torgue, Sakari Ailus,
	Uwe Kleine-König, Marek Vasut, Gatien Chevallier
  Cc: linux-crypto, linux-arm-kernel, linux-kernel, linux-mediatek,
	openbmc, linux-rockchip, linux-stm32

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/char/hw_random/atmel-rng.c     | 1 -
 drivers/char/hw_random/cctrng.c        | 1 -
 drivers/char/hw_random/mtk-rng.c       | 1 -
 drivers/char/hw_random/npcm-rng.c      | 1 -
 drivers/char/hw_random/omap3-rom-rng.c | 1 -
 drivers/char/hw_random/rockchip-rng.c  | 3 ---
 drivers/char/hw_random/stm32-rng.c     | 1 -
 7 files changed, 9 deletions(-)

diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index d2b00458761e..6ed24be3481d 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -80,7 +80,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
 	ret = 4;
 
 out:
-	pm_runtime_mark_last_busy(trng->dev);
 	pm_runtime_put_sync_autosuspend(trng->dev);
 	return ret;
 }
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 4db198849695..a5be9258037f 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -98,7 +98,6 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 {
 	int rc = 0;
 
-	pm_runtime_mark_last_busy(dev);
 	rc = pm_runtime_put_autosuspend(dev);
 	if (rc)
 		dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c
index b7fa1bc1122b..c89171df7635 100644
--- a/drivers/char/hw_random/mtk-rng.c
+++ b/drivers/char/hw_random/mtk-rng.c
@@ -98,7 +98,6 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max -= sizeof(u32);
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
diff --git a/drivers/char/hw_random/npcm-rng.c b/drivers/char/hw_random/npcm-rng.c
index 3e308c890bd2..40d6e29dea03 100644
--- a/drivers/char/hw_random/npcm-rng.c
+++ b/drivers/char/hw_random/npcm-rng.c
@@ -80,7 +80,6 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max--;
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 8064c792caf0..aa71f61c3dc9 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -56,7 +56,6 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 	else
 		r = 4;
 
-	pm_runtime_mark_last_busy(ddata->dev);
 	pm_runtime_put_autosuspend(ddata->dev);
 
 	return r;
diff --git a/drivers/char/hw_random/rockchip-rng.c b/drivers/char/hw_random/rockchip-rng.c
index fb4a30b95507..6e3ed4b85605 100644
--- a/drivers/char/hw_random/rockchip-rng.c
+++ b/drivers/char/hw_random/rockchip-rng.c
@@ -223,7 +223,6 @@ static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* Read random data stored in the registers */
 	memcpy_fromio(buf, rk_rng->base + TRNG_RNG_DOUT, to_read);
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -263,7 +262,6 @@ static int rk3576_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	memcpy_fromio(buf, rk_rng->base + RKRNG_TRNG_DATA0, to_read);
 
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -355,7 +353,6 @@ static int rk3588_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* close the TRNG */
 	rk_rng_writel(rk_rng, TRNG_V1_CTRL_NOP, TRNG_V1_CTRL);
 
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index 98edbe796bc5..9a8c00586ab0 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -255,7 +255,6 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
 	}
 
 exit_rpm:
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
-- 
2.39.5


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
  2025-07-04  7:53 ` [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  8:56   ` Laurent Pinchart
                     ` (6 more replies)
  2025-07-04  7:54 ` [PATCH 61/80] spi: " Sakari Ailus
  2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
  3 siblings, 7 replies; 16+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sakari Ailus, Sebastian Reichel, Alain Volmat, Dave Stevenson,
	Kieran Bingham, Umang Jain, Manivannan Sadhasivam,
	Laurent Pinchart, Michael Riesch, Mikhail Rudenko,
	Steve Longerbeam, Jacopo Mondi, Nicholas Roth, Benjamin Mugnier,
	Sylvain Petinot, Paul Elder, Matt Ranostay, Nas Chung,
	Jackson Lee, Dmitry Osipenko, Thierry Reding, Jonathan Hunter,
	Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Raspberry Pi Kernel Maintenance,
	Florian Fainelli, Broadcom internal kernel review list,
	Nicolas Dufresne, Benjamin Gaignard, Philipp Zabel, Sean Young,
	Hans Verkuil, Matthias Fend, Marco Felsch, Tomi Valkeinen,
	Ricardo Ribalda
  Cc: linux-media, linux-kernel, linux-tegra, linux-arm-msm,
	linux-rpi-kernel, linux-arm-kernel, linux-rockchip

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/media/i2c/alvium-csi2.c                          | 1 -
 drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
 drivers/media/i2c/dw9768.c                               | 1 -
 drivers/media/i2c/gc0308.c                               | 3 ---
 drivers/media/i2c/gc2145.c                               | 3 ---
 drivers/media/i2c/imx219.c                               | 2 --
 drivers/media/i2c/imx283.c                               | 3 ---
 drivers/media/i2c/imx290.c                               | 3 ---
 drivers/media/i2c/imx296.c                               | 1 -
 drivers/media/i2c/imx415.c                               | 1 -
 drivers/media/i2c/mt9m114.c                              | 6 ------
 drivers/media/i2c/ov4689.c                               | 3 ---
 drivers/media/i2c/ov5640.c                               | 4 ----
 drivers/media/i2c/ov5645.c                               | 3 ---
 drivers/media/i2c/ov64a40.c                              | 4 ----
 drivers/media/i2c/ov8858.c                               | 2 --
 drivers/media/i2c/st-mipid02.c                           | 2 --
 drivers/media/i2c/tc358746.c                             | 5 -----
 drivers/media/i2c/thp7312.c                              | 4 ----
 drivers/media/i2c/vd55g1.c                               | 4 ----
 drivers/media/i2c/vd56g3.c                               | 4 ----
 drivers/media/i2c/video-i2c.c                            | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
 drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
 drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
 drivers/media/rc/gpio-ir-recv.c                          | 1 -
 29 files changed, 83 deletions(-)

diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
index 05b708bd0a64..1f088acecf36 100644
--- a/drivers/media/i2c/alvium-csi2.c
+++ b/drivers/media/i2c/alvium-csi2.c
@@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 
 	} else {
 		alvium_set_stream_mipi(alvium, enable);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 487bcabb4a19..3316639b695e 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	if (!enable) {
 		ccs_stop_streaming(sensor);
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 
 		return 0;
@@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	rval = ccs_start_streaming(sensor);
 	if (rval < 0) {
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
 		return -ENODEV;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	/*
diff --git a/drivers/media/i2c/dw9768.c b/drivers/media/i2c/dw9768.c
index 3a4d100b9199..d434721ba8ed 100644
--- a/drivers/media/i2c/dw9768.c
+++ b/drivers/media/i2c/dw9768.c
@@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 
 static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_autosuspend(sd->dev);
 
 	return 0;
diff --git a/drivers/media/i2c/gc0308.c b/drivers/media/i2c/gc0308.c
index 069f42785b3c..cbcda0e18ff1 100644
--- a/drivers/media/i2c/gc0308.c
+++ b/drivers/media/i2c/gc0308.c
@@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
 	if (ret)
 		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 
 	return ret;
@@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
 	return 0;
 
 disable_pm:
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return 0;
 }
diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c
index ba02161d46e7..559a851669aa 100644
--- a/drivers/media/i2c/gc2145.c
+++ b/drivers/media/i2c/gc2145.c
@@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
@@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 3b4f68543342..3faf48f34af4 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(imx219->vflip, false);
 	__v4l2_ctrl_grab(imx219->hflip, false);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c
index da618c8cbadc..67e8bb432d10 100644
--- a/drivers/media/i2c/imx283.c
+++ b/drivers/media/i2c/imx283.c
@@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(imx283->dev, "Failed to stop stream\n");
 
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return 0;
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index fbf7eba3d71d..970a8d89a3e7 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	return ret;
@@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
 		}
 	} else {
 		imx290_stop_streaming(imx290);
-		pm_runtime_mark_last_busy(imx290->dev);
 		pm_runtime_put_autosuspend(imx290->dev);
 	}
 
@@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
 	 */
 	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
 	imx290->sd.dev = imx290->dev;
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	imx290->sd.internal_ops = &imx290_internal_ops;
diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
index f3bec16b527c..61116f4e3f76 100644
--- a/drivers/media/i2c/imx296.c
+++ b/drivers/media/i2c/imx296.c
@@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx296_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index 278e743646ea..276bf4d6f39d 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx415_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
index 3f540ca40f3c..aa3fd6c6c76c 100644
--- a/drivers/media/i2c/mt9m114.c
+++ b/drivers/media/i2c/mt9m114.c
@@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
 	return 0;
 
 error:
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 
 	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
index 1c3a449f9354..7d740ad3926f 100644
--- a/drivers/media/i2c/ov4689.c
+++ b/drivers/media/i2c/ov4689.c
@@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 	} else {
 		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
 			  OV4689_MODE_SW_STANDBY, NULL);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
@@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
 		goto err_clean_subdev_pm;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 0dae0438aa80..84198613381d 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return 0;
@@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return ret;
@@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
 	mutex_unlock(&sensor->lock);
 
 	if (!enable || ret) {
-		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 	}
 
@@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index 004d0ee5c3f5..58c846a44376 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
 			       OV5645_SYSTEM_CTRL0_STOP);
 
 rpm_put:
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
index a5da4fe47e0b..15912ecb8d26 100644
--- a/drivers/media/i2c/ov64a40.c
+++ b/drivers/media/i2c/ov64a40.c
@@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
 	return 0;
 
 error_power_off:
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	return ret;
@@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
 				  struct v4l2_subdev_state *state)
 {
 	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	__v4l2_ctrl_grab(ov64a40->link_freq, false);
@@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(ov64a40->dev);
 		pm_runtime_put_autosuspend(ov64a40->dev);
 	}
 
@@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
 		goto error_subdev_cleanup;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 95f9ae794846..6b7193eaea1f 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
 		}
 	} else {
 		ov8858_stop_stream(ov8858);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
 		goto err_power_off;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
index f4568e87f018..41ae25b0911f 100644
--- a/drivers/media/i2c/st-mipid02.c
+++ b/drivers/media/i2c/st-mipid02.c
@@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		goto error;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 error:
@@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
 	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
 	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index 143aa1359aba..bcfc274cf891 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 		return 0;
 
 err_out:
-		pm_runtime_mark_last_busy(sd->dev);
 		pm_runtime_put_sync_autosuspend(sd->dev);
 
 		return err;
@@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return v4l2_subdev_call(src, video, s_stream, 0);
@@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 	err = tc358746_read(tc358746, reg->reg, &val);
 	reg->val = val;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return err;
@@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 
 	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return 0;
@@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
 	}
 
 	err = tc358746_read(tc358746, CHIPID_REG, &val);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_sync_autosuspend(dev);
 	if (err)
 		return -ENODEV;
diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c
index 8852c56431fe..775cfba188d8 100644
--- a/drivers/media/i2c/thp7312.c
+++ b/drivers/media/i2c/thp7312.c
@@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		thp7312_stream_enable(thp7312, false);
 
-		pm_runtime_mark_last_busy(thp7312->dev);
 		pm_runtime_put_autosuspend(thp7312->dev);
 
 		v4l2_subdev_unlock_state(sd_state);
@@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	goto finish_unlock;
 
 finish_pm:
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
 	v4l2_subdev_unlock_state(sd_state);
@@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 
 	return ret;
@@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
index c0754fd03b1d..7c39183dd44b 100644
--- a/drivers/media/i2c/vd55g1.c
+++ b/drivers/media/i2c/vd55g1.c
@@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
 
 	vd55g1_grab_ctrls(sensor, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
 	pm_runtime_enable(dev);
 	pm_runtime_set_autosuspend_delay(dev, 4000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	ret = vd55g1_subdev_init(sensor);
diff --git a/drivers/media/i2c/vd56g3.c b/drivers/media/i2c/vd56g3.c
index 5d951ad0b478..d66e21ba4498 100644
--- a/drivers/media/i2c/vd56g3.c
+++ b/drivers/media/i2c/vd56g3.c
@@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
 	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
 	}
 
 	/* Sensor could now be powered off (after the autosuspend delay) */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_dbg(dev, "Successfully probe %s sensor\n",
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 0dd991d70d53..1eee2d4f5b40 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
 		return tmp;
 
 	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 	if (tmp)
 		return tmp;
@@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 		return 0;
 
 error_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 error_del_list:
 	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
@@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
 
 	kthread_stop(data->kthread_vid_cap);
 	data->kthread_vid_cap = NULL;
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
 	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
@@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
 	if (ret < 0)
 		goto error_pm_disable;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index fd71f0c43ac3..a9ce032cc5a2 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
 	if (q_status.report_queue_count == 0 &&
 	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
 		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 	}
@@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
 		}
 
 	}
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 
@@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
 
 finish_job_and_return:
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 1e5fc5f8b856..35913a7de834 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
 	if (ret)
 		goto return_buffers;
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return 0;
 return_buffers:
 	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 }
@@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(inst, q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 			break;
 		}
 		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		return;
 	default:
@@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 		break;
 	}
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
diff --git a/drivers/media/platform/nvidia/tegra-vde/h264.c b/drivers/media/platform/nvidia/tegra-vde/h264.c
index 0e56a4331b0d..45f8f6904867 100644
--- a/drivers/media/platform/nvidia/tegra-vde/h264.c
+++ b/drivers/media/platform/nvidia/tegra-vde/h264.c
@@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
 	return 0;
 
 put_runtime_pm:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 unlock:
@@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
 	if (err)
 		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	mutex_unlock(&vde->lock);
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
index fac7df0c4d1a..0b37f9b76da5 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
 	}
 	mutex_unlock(&core->lock);
 
-	pm_runtime_mark_last_busy(core->dev);
 	pm_runtime_put_autosuspend(core->dev);
 
 	return 0;
diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
index 7596ae1f7de6..8a10a36abbc2 100644
--- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
+++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
@@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
 	pispbe->streaming_map &= ~BIT(node->id);
 	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
@@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
 	if (ret)
 		goto disable_devs_err;
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	return 0;
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index 8542238e0fb1..fa972effd4a2 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
 			      struct hantro_ctx *ctx,
 			      enum vb2_buffer_state result)
 {
-	pm_runtime_mark_last_busy(vpu->dev);
 	pm_runtime_put_autosuspend(vpu->dev);
 
 	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index bf6d8fa983bf..161f8919022c 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
 	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
 		pm_runtime_put_autosuspend(pmdev);
 	}
 
-- 
2.39.5


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 61/80] spi: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
  2025-07-04  7:53 ` [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-07  9:35   ` AngeloGioacchino Del Regno
  2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
  3 siblings, 1 reply; 16+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Mark Brown, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
	Frank Li, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Matthias Brugger, AngeloGioacchino Del Regno,
	Han Xu, Haibo Chen, Yogesh Gaur, Heiko Stuebner, Andi Shyti,
	Tudor Ambarus, Krzysztof Kozlowski, Alim Akhtar, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Maxime Coquelin, Alexandre Torgue,
	Alain Volmat, Michal Simek
  Cc: linux-spi, linux-arm-kernel, linux-kernel, imx, linux-mediatek,
	linux-rockchip, linux-samsung-soc, linux-stm32

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/spi/atmel-quadspi.c       | 5 -----
 drivers/spi/spi-cadence-quadspi.c | 2 --
 drivers/spi/spi-cadence.c         | 1 -
 drivers/spi/spi-fsl-espi.c        | 2 --
 drivers/spi/spi-fsl-lpspi.c       | 2 --
 drivers/spi/spi-imx.c             | 3 ---
 drivers/spi/spi-mtk-nor.c         | 1 -
 drivers/spi/spi-nxp-fspi.c        | 1 -
 drivers/spi/spi-omap2-mcspi.c     | 3 ---
 drivers/spi/spi-rockchip-sfc.c    | 3 ---
 drivers/spi/spi-s3c64xx.c         | 3 ---
 drivers/spi/spi-sprd.c            | 1 -
 drivers/spi/spi-stm32-ospi.c      | 7 -------
 drivers/spi/spi-stm32-qspi.c      | 7 -------
 drivers/spi/spi-stm32.c           | 2 --
 drivers/spi/spi-ti-qspi.c         | 2 --
 drivers/spi/spi-zynqmp-gqspi.c    | 1 -
 drivers/spi/spi.c                 | 3 ---
 18 files changed, 49 deletions(-)

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index fc555c0ce52e..4e9bfd26aa80 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -965,7 +965,6 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	err = aq->ops->transfer(mem, op, offset);
 
 pm_runtime_put:
-	pm_runtime_mark_last_busy(&aq->pdev->dev);
 	pm_runtime_put_autosuspend(&aq->pdev->dev);
 	return err;
 }
@@ -1168,7 +1167,6 @@ static int atmel_qspi_setup(struct spi_device *spi)
 	aq->scr |= QSPI_SCR_SCBR(scbr);
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
-	pm_runtime_mark_last_busy(ctrl->dev.parent);
 	pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
@@ -1230,7 +1228,6 @@ static int atmel_qspi_set_cs_timing(struct spi_device *spi)
 	aq->mr |= QSPI_MR_DLYBCT(cs_hold) | QSPI_MR_DLYCS(cs_inactive);
 	atmel_qspi_write(aq->mr, aq, QSPI_MR);
 
-	pm_runtime_mark_last_busy(ctrl->dev.parent);
 	pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
@@ -1435,7 +1432,6 @@ static int atmel_qspi_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
@@ -1560,7 +1556,6 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
 
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index aa1932ba17cb..82f1c4d59af8 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1469,7 +1469,6 @@ static int cqspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
 
 	ret = cqspi_mem_process(mem, op);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (ret)
@@ -1975,7 +1974,6 @@ static int cqspi_probe(struct platform_device *pdev)
 		goto probe_setup_failed;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 9e56bde87768..5ae09b21d23a 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -662,7 +662,6 @@ static int cdns_spi_probe(struct platform_device *pdev)
 		/* Set to default valid value */
 		ctlr->max_speed_hz = xspi->clk_rate / 4;
 		xspi->speed_hz = ctlr->max_speed_hz;
-		pm_runtime_mark_last_busy(&pdev->dev);
 		pm_runtime_put_autosuspend(&pdev->dev);
 	} else {
 		ctlr->mode_bits |= SPI_NO_CS;
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 6a73eaa34cf7..f2f1d3298e6c 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -513,7 +513,6 @@ static int fsl_espi_setup(struct spi_device *spi)
 
 	fsl_espi_setup_transfer(spi, NULL);
 
-	pm_runtime_mark_last_busy(espi->dev);
 	pm_runtime_put_autosuspend(espi->dev);
 
 	return 0;
@@ -726,7 +725,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
 
 	dev_info(dev, "irq = %u\n", irq);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 5e3818445234..67d4000c3cef 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -233,7 +233,6 @@ static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller)
 	struct fsl_lpspi_data *fsl_lpspi =
 				spi_controller_get_devdata(controller);
 
-	pm_runtime_mark_last_busy(fsl_lpspi->dev);
 	pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
@@ -966,7 +965,6 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 		goto free_dma;
 	}
 
-	pm_runtime_mark_last_busy(fsl_lpspi->dev);
 	pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index c93d80a4d734..155ddeb8fcd4 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1748,7 +1748,6 @@ spi_imx_prepare_message(struct spi_controller *controller, struct spi_message *m
 
 	ret = spi_imx->devtype_data->prepare_message(spi_imx, msg);
 	if (ret) {
-		pm_runtime_mark_last_busy(spi_imx->dev);
 		pm_runtime_put_autosuspend(spi_imx->dev);
 	}
 
@@ -1760,7 +1759,6 @@ spi_imx_unprepare_message(struct spi_controller *controller, struct spi_message
 {
 	struct spi_imx_data *spi_imx = spi_controller_get_devdata(controller);
 
-	pm_runtime_mark_last_busy(spi_imx->dev);
 	pm_runtime_put_autosuspend(spi_imx->dev);
 	return 0;
 }
@@ -1933,7 +1931,6 @@ static int spi_imx_probe(struct platform_device *pdev)
 		goto out_register_controller;
 	}
 
-	pm_runtime_mark_last_busy(spi_imx->dev);
 	pm_runtime_put_autosuspend(spi_imx->dev);
 
 	return ret;
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index 85ab5ce96c4d..5cc4632e13d7 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -918,7 +918,6 @@ static int mtk_nor_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto err_probe;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);
diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
index e63c77e41823..c7d4827f1bf1 100644
--- a/drivers/spi/spi-nxp-fspi.c
+++ b/drivers/spi/spi-nxp-fspi.c
@@ -968,7 +968,6 @@ static int nxp_fspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	/* Invalidate the data in the AHB buffer. */
 	nxp_fspi_invalid(f);
 
-	pm_runtime_mark_last_busy(f->dev);
 	pm_runtime_put_autosuspend(f->dev);
 
 	return err;
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 70bb74b3bd9c..6dc58a30804a 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -272,7 +272,6 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
 
 		mcspi_write_chconf0(spi, l);
 
-		pm_runtime_mark_last_busy(mcspi->dev);
 		pm_runtime_put_autosuspend(mcspi->dev);
 	}
 }
@@ -1102,7 +1101,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
 	if (ret && initial_setup)
 		omap2_mcspi_cleanup(spi);
 
-	pm_runtime_mark_last_busy(mcspi->dev);
 	pm_runtime_put_autosuspend(mcspi->dev);
 
 	return ret;
@@ -1379,7 +1377,6 @@ static int omap2_mcspi_controller_setup(struct omap2_mcspi *mcspi)
 	ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
 
 	omap2_mcspi_set_mode(ctlr);
-	pm_runtime_mark_last_busy(mcspi->dev);
 	pm_runtime_put_autosuspend(mcspi->dev);
 	return 0;
 }
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index f3fe10eddb6a..9eba5c0a60f2 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -565,7 +565,6 @@ static int rockchip_sfc_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op
 
 	ret = rockchip_sfc_xfer_done(sfc, 100000);
 out:
-	pm_runtime_mark_last_busy(sfc->dev);
 	pm_runtime_put_autosuspend(sfc->dev);
 
 	return ret;
@@ -712,7 +711,6 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_register;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -799,7 +797,6 @@ static int rockchip_sfc_resume(struct device *dev)
 
 	rockchip_sfc_init(sfc);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 9c47f5741c5f..b1567243ae19 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1045,14 +1045,12 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
 		}
 	}
 
-	pm_runtime_mark_last_busy(&sdd->pdev->dev);
 	pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	s3c64xx_spi_set_cs(spi, false);
 
 	return 0;
 
 setup_exit:
-	pm_runtime_mark_last_busy(&sdd->pdev->dev);
 	pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	/* setup() returns with device de-selected */
 	s3c64xx_spi_set_cs(spi, false);
@@ -1384,7 +1382,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 	dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\n",
 		mem_res, sdd->fifo_depth);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c
index ae794058b381..ad75f5f0f2bf 100644
--- a/drivers/spi/spi-sprd.c
+++ b/drivers/spi/spi-sprd.c
@@ -982,7 +982,6 @@ static int sprd_spi_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_rpm_put;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-stm32-ospi.c b/drivers/spi/spi-stm32-ospi.c
index 4ab7e86f4bd5..2829535e5cd4 100644
--- a/drivers/spi/spi-stm32-ospi.c
+++ b/drivers/spi/spi-stm32-ospi.c
@@ -547,7 +547,6 @@ static int stm32_ospi_poll_status(struct spi_mem *mem,
 	ret = stm32_ospi_send(mem->spi, op);
 	mutex_unlock(&ospi->lock);
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return ret;
@@ -571,7 +570,6 @@ static int stm32_ospi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	ret = stm32_ospi_send(mem->spi, op);
 	mutex_unlock(&ospi->lock);
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return ret;
@@ -628,7 +626,6 @@ static ssize_t stm32_ospi_dirmap_read(struct spi_mem_dirmap_desc *desc,
 	ret = stm32_ospi_send(desc->mem->spi, &op);
 	mutex_unlock(&ospi->lock);
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return ret ?: len;
@@ -713,7 +710,6 @@ static int stm32_ospi_transfer_one_message(struct spi_controller *ctrl,
 	msg->status = ret;
 	spi_finalize_current_message(ctrl);
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return ret;
@@ -750,7 +746,6 @@ static int stm32_ospi_setup(struct spi_device *spi)
 
 	mutex_unlock(&ospi->lock);
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return 0;
@@ -953,7 +948,6 @@ static int stm32_ospi_probe(struct platform_device *pdev)
 		goto err_pm_resume;
 	}
 
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return 0;
@@ -1032,7 +1026,6 @@ static int __maybe_unused stm32_ospi_resume(struct device *dev)
 
 	writel_relaxed(ospi->cr_reg, regs_base + OSPI_CR);
 	writel_relaxed(ospi->dcr_reg, regs_base + OSPI_DCR1);
-	pm_runtime_mark_last_busy(ospi->dev);
 	pm_runtime_put_autosuspend(ospi->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c
index 9691197bbf5a..f2d19f1c5ab1 100644
--- a/drivers/spi/spi-stm32-qspi.c
+++ b/drivers/spi/spi-stm32-qspi.c
@@ -463,7 +463,6 @@ static int stm32_qspi_poll_status(struct spi_mem *mem, const struct spi_mem_op *
 	ret = stm32_qspi_send(mem->spi, op);
 	mutex_unlock(&qspi->lock);
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
@@ -487,7 +486,6 @@ static int stm32_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	ret = stm32_qspi_send(mem->spi, op);
 	mutex_unlock(&qspi->lock);
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
@@ -543,7 +541,6 @@ static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc,
 	ret = stm32_qspi_send(desc->mem->spi, &op);
 	mutex_unlock(&qspi->lock);
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret ?: len;
@@ -627,7 +624,6 @@ static int stm32_qspi_transfer_one_message(struct spi_controller *ctrl,
 	msg->status = ret;
 	spi_finalize_current_message(ctrl);
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
@@ -684,7 +680,6 @@ static int stm32_qspi_setup(struct spi_device *spi)
 	writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
 	mutex_unlock(&qspi->lock);
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 
 	return 0;
@@ -858,7 +853,6 @@ static int stm32_qspi_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_pm_runtime_free;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -938,7 +932,6 @@ static int __maybe_unused stm32_qspi_resume(struct device *dev)
 	writel_relaxed(qspi->cr_reg, qspi->io_base + QSPI_CR);
 	writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 3d20f09f1ae7..e8f3eff71b0e 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -2469,7 +2469,6 @@ static int stm32_spi_probe(struct platform_device *pdev)
 		goto err_pm_disable;
 	}
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "driver initialized (%s mode)\n",
@@ -2588,7 +2587,6 @@ static int __maybe_unused stm32_spi_resume(struct device *dev)
 
 	spi->cfg->config(spi);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index a284d2794586..0b7eaccbc797 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -158,7 +158,6 @@ static int ti_qspi_setup(struct spi_device *spi)
 		return ret;
 	}
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	ret = pm_runtime_put_autosuspend(qspi->dev);
 	if (ret < 0) {
 		dev_err(qspi->dev, "pm_runtime_put_autosuspend() failed\n");
@@ -195,7 +194,6 @@ static void ti_qspi_setup_clk(struct ti_qspi *qspi, u32 speed_hz)
 		ctx_reg->clkctrl = clk_ctrl_new;
 	}
 
-	pm_runtime_mark_last_busy(qspi->dev);
 	pm_runtime_put_autosuspend(qspi->dev);
 }
 
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 595b6dc10845..502fd5eccc83 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1330,7 +1330,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 		goto clk_dis_all;
 	}
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 1bc0fdbb1bd7..91413cc0936a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1723,7 +1723,6 @@ EXPORT_SYMBOL_GPL(spi_finalize_current_transfer);
 static void spi_idle_runtime_pm(struct spi_controller *ctlr)
 {
 	if (ctlr->auto_runtime_pm) {
-		pm_runtime_mark_last_busy(ctlr->dev.parent);
 		pm_runtime_put_autosuspend(ctlr->dev.parent);
 	}
 }
@@ -3856,7 +3855,6 @@ static int spi_set_cs_timing(struct spi_device *spi)
 			}
 
 			status = spi->controller->set_cs_timing(spi);
-			pm_runtime_mark_last_busy(parent);
 			pm_runtime_put_autosuspend(parent);
 		} else {
 			status = spi->controller->set_cs_timing(spi);
@@ -3991,7 +3989,6 @@ int spi_setup(struct spi_device *spi)
 		status = 0;
 
 		spi_set_cs(spi, false, true);
-		pm_runtime_mark_last_busy(spi->controller->dev.parent);
 		pm_runtime_put_autosuspend(spi->controller->dev.parent);
 	} else {
 		spi_set_cs(spi, false, true);
-- 
2.39.5


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 64/80] media: rkvdec: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
                   ` (2 preceding siblings ...)
  2025-07-04  7:54 ` [PATCH 61/80] spi: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04 13:05   ` Nicolas Dufresne
  2025-08-11 13:48   ` Nicolas Dufresne
  3 siblings, 2 replies; 16+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Ezequiel Garcia, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/staging/media/rkvdec/rkvdec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index d707088ec0dc..445f7c92eee3 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -765,7 +765,6 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
 {
 	struct rkvdec_dev *rkvdec = ctx->dev;
 
-	pm_runtime_mark_last_busy(rkvdec->dev);
 	pm_runtime_put_autosuspend(rkvdec->dev);
 	rkvdec_job_finish_no_pm(ctx, result);
 }
-- 
2.39.5


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
@ 2025-07-04  8:56   ` Laurent Pinchart
  2025-07-04  9:07   ` Thierry Reding
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2025-07-04  8:56 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sebastian Reichel, Alain Volmat, Dave Stevenson, Kieran Bingham,
	Umang Jain, Manivannan Sadhasivam, Michael Riesch,
	Mikhail Rudenko, Steve Longerbeam, Jacopo Mondi, Nicholas Roth,
	Benjamin Mugnier, Sylvain Petinot, Paul Elder, Matt Ranostay,
	Nas Chung, Jackson Lee, Dmitry Osipenko, Thierry Reding,
	Jonathan Hunter, Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Raspberry Pi Kernel Maintenance,
	Florian Fainelli, Broadcom internal kernel review list,
	Nicolas Dufresne, Benjamin Gaignard, Philipp Zabel, Sean Young,
	Hans Verkuil, Matthias Fend, Marco Felsch, Tomi Valkeinen,
	Ricardo Ribalda, linux-media, linux-kernel, linux-tegra,
	linux-arm-msm, linux-rpi-kernel, linux-arm-kernel, linux-rockchip

Hi Sakari,

On Fri, Jul 04, 2025 at 10:54:31AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/media/i2c/alvium-csi2.c                          | 1 -
>  drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
>  drivers/media/i2c/dw9768.c                               | 1 -
>  drivers/media/i2c/gc0308.c                               | 3 ---
>  drivers/media/i2c/gc2145.c                               | 3 ---
>  drivers/media/i2c/imx219.c                               | 2 --
>  drivers/media/i2c/imx283.c                               | 3 ---
>  drivers/media/i2c/imx290.c                               | 3 ---
>  drivers/media/i2c/imx296.c                               | 1 -
>  drivers/media/i2c/imx415.c                               | 1 -
>  drivers/media/i2c/mt9m114.c                              | 6 ------
>  drivers/media/i2c/ov4689.c                               | 3 ---
>  drivers/media/i2c/ov5640.c                               | 4 ----
>  drivers/media/i2c/ov5645.c                               | 3 ---
>  drivers/media/i2c/ov64a40.c                              | 4 ----
>  drivers/media/i2c/ov8858.c                               | 2 --
>  drivers/media/i2c/st-mipid02.c                           | 2 --
>  drivers/media/i2c/tc358746.c                             | 5 -----
>  drivers/media/i2c/thp7312.c                              | 4 ----
>  drivers/media/i2c/vd55g1.c                               | 4 ----
>  drivers/media/i2c/vd56g3.c                               | 4 ----
>  drivers/media/i2c/video-i2c.c                            | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
>  drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
>  drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
>  drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
>  drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
>  drivers/media/rc/gpio-ir-recv.c                          | 1 -
>  29 files changed, 83 deletions(-)

[snip]

> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index 487bcabb4a19..3316639b695e 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
>  	}
>  
>  	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  	}

You can now drop the curly braces.

>  

[snip]

> diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
> index a5da4fe47e0b..15912ecb8d26 100644
> --- a/drivers/media/i2c/ov64a40.c
> +++ b/drivers/media/i2c/ov64a40.c

[snip]

> @@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
>  	}
>  
>  	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(ov64a40->dev);
>  		pm_runtime_put_autosuspend(ov64a40->dev);
>  	}

Same here.

>  

[snip]

> diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
> index bf6d8fa983bf..161f8919022c 100644
> --- a/drivers/media/rc/gpio-ir-recv.c
> +++ b/drivers/media/rc/gpio-ir-recv.c
> @@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
>  		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
>  
>  	if (pmdev) {
> -		pm_runtime_mark_last_busy(pmdev);
>  		pm_runtime_put_autosuspend(pmdev);
>  	}

And here too.

With that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  

-- 
Regards,

Laurent Pinchart

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
  2025-07-04  8:56   ` Laurent Pinchart
@ 2025-07-04  9:07   ` Thierry Reding
  2025-07-04  9:32   ` Tommaso Merciai
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Thierry Reding @ 2025-07-04  9:07 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sebastian Reichel, Alain Volmat, Dave Stevenson, Kieran Bingham,
	Umang Jain, Manivannan Sadhasivam, Laurent Pinchart,
	Michael Riesch, Mikhail Rudenko, Steve Longerbeam, Jacopo Mondi,
	Nicholas Roth, Benjamin Mugnier, Sylvain Petinot, Paul Elder,
	Matt Ranostay, Nas Chung, Jackson Lee, Dmitry Osipenko,
	Jonathan Hunter, Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Raspberry Pi Kernel Maintenance,
	Florian Fainelli, Broadcom internal kernel review list,
	Nicolas Dufresne, Benjamin Gaignard, Philipp Zabel, Sean Young,
	Hans Verkuil, Matthias Fend, Marco Felsch, Tomi Valkeinen,
	Ricardo Ribalda, linux-media, linux-kernel, linux-tegra,
	linux-arm-msm, linux-rpi-kernel, linux-arm-kernel, linux-rockchip


[-- Attachment #1.1: Type: text/plain, Size: 513 bytes --]

On Fri, Jul 04, 2025 at 10:54:31AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[...]
>  drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
[...]

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
  2025-07-04  8:56   ` Laurent Pinchart
  2025-07-04  9:07   ` Thierry Reding
@ 2025-07-04  9:32   ` Tommaso Merciai
  2025-07-04 11:30   ` Dikshita Agarwal
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Tommaso Merciai @ 2025-07-04  9:32 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sebastian Reichel, Alain Volmat, Dave Stevenson, Kieran Bingham,
	Umang Jain, Manivannan Sadhasivam, Laurent Pinchart,
	Michael Riesch, Mikhail Rudenko, Steve Longerbeam, Jacopo Mondi,
	Nicholas Roth, Benjamin Mugnier, Sylvain Petinot, Paul Elder,
	Matt Ranostay, Nas Chung, Jackson Lee, Dmitry Osipenko,
	Thierry Reding, Jonathan Hunter, Vikash Garodia, Dikshita Agarwal,
	Abhinav Kumar, Bryan O'Donoghue,
	Raspberry Pi Kernel Maintenance, Florian Fainelli,
	Broadcom internal kernel review list, Nicolas Dufresne,
	Benjamin Gaignard, Philipp Zabel, Sean Young, Hans Verkuil,
	Matthias Fend, Marco Felsch, Tomi Valkeinen, Ricardo Ribalda,
	linux-media, linux-kernel, linux-tegra, linux-arm-msm,
	linux-rpi-kernel, linux-arm-kernel, linux-rockchip

Hi Sakari,
Thanks for your patch!

On Fri, Jul 04, 2025 at 10:54:31AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/media/i2c/alvium-csi2.c                          | 1 -

Acked-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

Thanks & Regards,
Tommaso

>  drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
>  drivers/media/i2c/dw9768.c                               | 1 -
>  drivers/media/i2c/gc0308.c                               | 3 ---
>  drivers/media/i2c/gc2145.c                               | 3 ---
>  drivers/media/i2c/imx219.c                               | 2 --
>  drivers/media/i2c/imx283.c                               | 3 ---
>  drivers/media/i2c/imx290.c                               | 3 ---
>  drivers/media/i2c/imx296.c                               | 1 -
>  drivers/media/i2c/imx415.c                               | 1 -
>  drivers/media/i2c/mt9m114.c                              | 6 ------
>  drivers/media/i2c/ov4689.c                               | 3 ---
>  drivers/media/i2c/ov5640.c                               | 4 ----
>  drivers/media/i2c/ov5645.c                               | 3 ---
>  drivers/media/i2c/ov64a40.c                              | 4 ----
>  drivers/media/i2c/ov8858.c                               | 2 --
>  drivers/media/i2c/st-mipid02.c                           | 2 --
>  drivers/media/i2c/tc358746.c                             | 5 -----
>  drivers/media/i2c/thp7312.c                              | 4 ----
>  drivers/media/i2c/vd55g1.c                               | 4 ----
>  drivers/media/i2c/vd56g3.c                               | 4 ----
>  drivers/media/i2c/video-i2c.c                            | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
>  drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
>  drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
>  drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
>  drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
>  drivers/media/rc/gpio-ir-recv.c                          | 1 -
>  29 files changed, 83 deletions(-)
> 
> diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
> index 05b708bd0a64..1f088acecf36 100644
> --- a/drivers/media/i2c/alvium-csi2.c
> +++ b/drivers/media/i2c/alvium-csi2.c
> @@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
>  
>  	} else {
>  		alvium_set_stream_mipi(alvium, enable);
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index 487bcabb4a19..3316639b695e 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
>  	}
>  
>  	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> @@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
>  	if (!enable) {
>  		ccs_stop_streaming(sensor);
>  		sensor->streaming = false;
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  
>  		return 0;
> @@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
>  	rval = ccs_start_streaming(sensor);
>  	if (rval < 0) {
>  		sensor->streaming = false;
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> @@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
>  		return -ENODEV;
>  	}
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	/*
> diff --git a/drivers/media/i2c/dw9768.c b/drivers/media/i2c/dw9768.c
> index 3a4d100b9199..d434721ba8ed 100644
> --- a/drivers/media/i2c/dw9768.c
> +++ b/drivers/media/i2c/dw9768.c
> @@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
>  
>  static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
>  {
> -	pm_runtime_mark_last_busy(sd->dev);
>  	pm_runtime_put_autosuspend(sd->dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/gc0308.c b/drivers/media/i2c/gc0308.c
> index 069f42785b3c..cbcda0e18ff1 100644
> --- a/drivers/media/i2c/gc0308.c
> +++ b/drivers/media/i2c/gc0308.c
> @@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
>  	if (ret)
>  		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
>  
> -	pm_runtime_mark_last_busy(gc0308->dev);
>  	pm_runtime_put_autosuspend(gc0308->dev);
>  
>  	return ret;
> @@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
>  	return 0;
>  
>  disable_pm:
> -	pm_runtime_mark_last_busy(gc0308->dev);
>  	pm_runtime_put_autosuspend(gc0308->dev);
>  	return ret;
>  }
>  
>  static int gc0308_stop_stream(struct gc0308 *gc0308)
>  {
> -	pm_runtime_mark_last_busy(gc0308->dev);
>  	pm_runtime_put_autosuspend(gc0308->dev);
>  	return 0;
>  }
> diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c
> index ba02161d46e7..559a851669aa 100644
> --- a/drivers/media/i2c/gc2145.c
> +++ b/drivers/media/i2c/gc2145.c
> @@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
>  	return 0;
>  
>  err_rpm_put:
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  	return ret;
>  }
> @@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
>  	if (ret)
>  		dev_err(&client->dev, "%s failed to write regs\n", __func__);
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	return ret;
> @@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	return ret;
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index 3b4f68543342..3faf48f34af4 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
>  	return 0;
>  
>  err_rpm_put:
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  	return ret;
>  }
> @@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
>  	__v4l2_ctrl_grab(imx219->vflip, false);
>  	__v4l2_ctrl_grab(imx219->hflip, false);
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	return ret;
> diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c
> index da618c8cbadc..67e8bb432d10 100644
> --- a/drivers/media/i2c/imx283.c
> +++ b/drivers/media/i2c/imx283.c
> @@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
>  	return 0;
>  
>  err_rpm_put:
> -	pm_runtime_mark_last_busy(imx283->dev);
>  	pm_runtime_put_autosuspend(imx283->dev);
>  
>  	return ret;
> @@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
>  	if (ret)
>  		dev_err(imx283->dev, "Failed to stop stream\n");
>  
> -	pm_runtime_mark_last_busy(imx283->dev);
>  	pm_runtime_put_autosuspend(imx283->dev);
>  
>  	return ret;
> @@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
>  	 * Decrease the PM usage count. The device will get suspended after the
>  	 * autosuspend delay, turning the power off.
>  	 */
> -	pm_runtime_mark_last_busy(imx283->dev);
>  	pm_runtime_put_autosuspend(imx283->dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index fbf7eba3d71d..970a8d89a3e7 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(imx290->dev);
>  	pm_runtime_put_autosuspend(imx290->dev);
>  
>  	return ret;
> @@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
>  		}
>  	} else {
>  		imx290_stop_streaming(imx290);
> -		pm_runtime_mark_last_busy(imx290->dev);
>  		pm_runtime_put_autosuspend(imx290->dev);
>  	}
>  
> @@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
>  	 */
>  	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
>  	imx290->sd.dev = imx290->dev;
> -	pm_runtime_mark_last_busy(imx290->dev);
>  	pm_runtime_put_autosuspend(imx290->dev);
>  
>  	imx290->sd.internal_ops = &imx290_internal_ops;
> diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
> index f3bec16b527c..61116f4e3f76 100644
> --- a/drivers/media/i2c/imx296.c
> +++ b/drivers/media/i2c/imx296.c
> @@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
>  	if (!enable) {
>  		ret = imx296_stream_off(sensor);
>  
> -		pm_runtime_mark_last_busy(sensor->dev);
>  		pm_runtime_put_autosuspend(sensor->dev);
>  
>  		goto unlock;
> diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
> index 278e743646ea..276bf4d6f39d 100644
> --- a/drivers/media/i2c/imx415.c
> +++ b/drivers/media/i2c/imx415.c
> @@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
>  	if (!enable) {
>  		ret = imx415_stream_off(sensor);
>  
> -		pm_runtime_mark_last_busy(sensor->dev);
>  		pm_runtime_put_autosuspend(sensor->dev);
>  
>  		goto unlock;
> diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
> index 3f540ca40f3c..aa3fd6c6c76c 100644
> --- a/drivers/media/i2c/mt9m114.c
> +++ b/drivers/media/i2c/mt9m114.c
> @@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
>  	return 0;
>  
>  error:
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>  	pm_runtime_put_autosuspend(&sensor->client->dev);
>  
>  	return ret;
> @@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
>  
>  	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
>  
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>  	pm_runtime_put_autosuspend(&sensor->client->dev);
>  
>  	return ret;
> @@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>  	pm_runtime_put_autosuspend(&sensor->client->dev);
>  
>  	return ret;
> @@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>  	pm_runtime_put_autosuspend(&sensor->client->dev);
>  
>  	return ret;
> @@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>  	pm_runtime_put_autosuspend(&sensor->client->dev);
>  
>  	return ret;
> @@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
>  	 * Decrease the PM usage count. The device will get suspended after the
>  	 * autosuspend delay, turning the power off.
>  	 */
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
> index 1c3a449f9354..7d740ad3926f 100644
> --- a/drivers/media/i2c/ov4689.c
> +++ b/drivers/media/i2c/ov4689.c
> @@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
>  	} else {
>  		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
>  			  OV4689_MODE_SW_STANDBY, NULL);
> -		pm_runtime_mark_last_busy(dev);
>  		pm_runtime_put_autosuspend(dev);
>  	}
>  
> @@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
> @@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
>  		goto err_clean_subdev_pm;
>  	}
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 0dae0438aa80..84198613381d 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>  	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>  
>  	return 0;
> @@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>  	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>  
>  	return ret;
> @@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
>  	mutex_unlock(&sensor->lock);
>  
>  	if (!enable || ret) {
> -		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>  		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>  	}
>  
> @@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
>  
>  	pm_runtime_set_autosuspend_delay(dev, 1000);
>  	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
> index 004d0ee5c3f5..58c846a44376 100644
> --- a/drivers/media/i2c/ov5645.c
> +++ b/drivers/media/i2c/ov5645.c
> @@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(ov5645->dev);
>  	pm_runtime_put_autosuspend(ov5645->dev);
>  
>  	return ret;
> @@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
>  			       OV5645_SYSTEM_CTRL0_STOP);
>  
>  rpm_put:
> -	pm_runtime_mark_last_busy(ov5645->dev);
>  	pm_runtime_put_autosuspend(ov5645->dev);
>  
>  	return ret;
> @@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
>  
>  	pm_runtime_set_autosuspend_delay(dev, 1000);
>  	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
> index a5da4fe47e0b..15912ecb8d26 100644
> --- a/drivers/media/i2c/ov64a40.c
> +++ b/drivers/media/i2c/ov64a40.c
> @@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
>  	return 0;
>  
>  error_power_off:
> -	pm_runtime_mark_last_busy(ov64a40->dev);
>  	pm_runtime_put_autosuspend(ov64a40->dev);
>  
>  	return ret;
> @@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
>  				  struct v4l2_subdev_state *state)
>  {
>  	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
> -	pm_runtime_mark_last_busy(ov64a40->dev);
>  	pm_runtime_put_autosuspend(ov64a40->dev);
>  
>  	__v4l2_ctrl_grab(ov64a40->link_freq, false);
> @@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
>  	}
>  
>  	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(ov64a40->dev);
>  		pm_runtime_put_autosuspend(ov64a40->dev);
>  	}
>  
> @@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
>  		goto error_subdev_cleanup;
>  	}
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
> index 95f9ae794846..6b7193eaea1f 100644
> --- a/drivers/media/i2c/ov8858.c
> +++ b/drivers/media/i2c/ov8858.c
> @@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
>  		}
>  	} else {
>  		ov8858_stop_stream(ov8858);
> -		pm_runtime_mark_last_busy(&client->dev);
>  		pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> @@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
>  		goto err_power_off;
>  	}
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
> diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
> index f4568e87f018..41ae25b0911f 100644
> --- a/drivers/media/i2c/st-mipid02.c
> +++ b/drivers/media/i2c/st-mipid02.c
> @@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
>  	if (ret)
>  		goto error;
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  error:
> @@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
>  	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
>  	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  	return ret;
>  }
> diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
> index 143aa1359aba..bcfc274cf891 100644
> --- a/drivers/media/i2c/tc358746.c
> +++ b/drivers/media/i2c/tc358746.c
> @@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
>  		return 0;
>  
>  err_out:
> -		pm_runtime_mark_last_busy(sd->dev);
>  		pm_runtime_put_sync_autosuspend(sd->dev);
>  
>  		return err;
> @@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
>  	if (err)
>  		return err;
>  
> -	pm_runtime_mark_last_busy(sd->dev);
>  	pm_runtime_put_sync_autosuspend(sd->dev);
>  
>  	return v4l2_subdev_call(src, video, s_stream, 0);
> @@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
>  	err = tc358746_read(tc358746, reg->reg, &val);
>  	reg->val = val;
>  
> -	pm_runtime_mark_last_busy(sd->dev);
>  	pm_runtime_put_sync_autosuspend(sd->dev);
>  
>  	return err;
> @@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
>  
>  	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
>  
> -	pm_runtime_mark_last_busy(sd->dev);
>  	pm_runtime_put_sync_autosuspend(sd->dev);
>  
>  	return 0;
> @@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
>  	}
>  
>  	err = tc358746_read(tc358746, CHIPID_REG, &val);
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_sync_autosuspend(dev);
>  	if (err)
>  		return -ENODEV;
> diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c
> index 8852c56431fe..775cfba188d8 100644
> --- a/drivers/media/i2c/thp7312.c
> +++ b/drivers/media/i2c/thp7312.c
> @@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
>  	if (!enable) {
>  		thp7312_stream_enable(thp7312, false);
>  
> -		pm_runtime_mark_last_busy(thp7312->dev);
>  		pm_runtime_put_autosuspend(thp7312->dev);
>  
>  		v4l2_subdev_unlock_state(sd_state);
> @@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
>  	goto finish_unlock;
>  
>  finish_pm:
> -	pm_runtime_mark_last_busy(thp7312->dev);
>  	pm_runtime_put_autosuspend(thp7312->dev);
>  finish_unlock:
>  	v4l2_subdev_unlock_state(sd_state);
> @@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(thp7312->dev);
>  	pm_runtime_put_autosuspend(thp7312->dev);
>  
>  	return ret;
> @@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
>  	 * Decrease the PM usage count. The device will get suspended after the
>  	 * autosuspend delay, turning the power off.
>  	 */
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
> diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
> index c0754fd03b1d..7c39183dd44b 100644
> --- a/drivers/media/i2c/vd55g1.c
> +++ b/drivers/media/i2c/vd55g1.c
> @@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
>  
>  	vd55g1_grab_ctrls(sensor, false);
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
>  	pm_runtime_enable(dev);
>  	pm_runtime_set_autosuspend_delay(dev, 4000);
>  	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	ret = vd55g1_subdev_init(sensor);
> diff --git a/drivers/media/i2c/vd56g3.c b/drivers/media/i2c/vd56g3.c
> index 5d951ad0b478..d66e21ba4498 100644
> --- a/drivers/media/i2c/vd56g3.c
> +++ b/drivers/media/i2c/vd56g3.c
> @@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
>  		break;
>  	}
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
>  	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
>  	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
>  
> -	pm_runtime_mark_last_busy(sensor->dev);
>  	pm_runtime_put_autosuspend(sensor->dev);
>  
>  	return ret;
> @@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
>  	}
>  
>  	/* Sensor could now be powered off (after the autosuspend delay) */
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	dev_dbg(dev, "Successfully probe %s sensor\n",
> diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
> index 0dd991d70d53..1eee2d4f5b40 100644
> --- a/drivers/media/i2c/video-i2c.c
> +++ b/drivers/media/i2c/video-i2c.c
> @@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
>  		return tmp;
>  
>  	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
> -	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
>  	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
>  	if (tmp)
>  		return tmp;
> @@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
>  		return 0;
>  
>  error_rpm_put:
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  error_del_list:
>  	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
> @@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
>  
>  	kthread_stop(data->kthread_vid_cap);
>  	data->kthread_vid_cap = NULL;
> -	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
>  	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
>  
>  	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
> @@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
>  	if (ret < 0)
>  		goto error_pm_disable;
>  
> -	pm_runtime_mark_last_busy(&client->dev);
>  	pm_runtime_put_autosuspend(&client->dev);
>  
>  	return 0;
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> index fd71f0c43ac3..a9ce032cc5a2 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> @@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
>  	if (q_status.report_queue_count == 0 &&
>  	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
>  		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
> -		pm_runtime_mark_last_busy(inst->dev->dev);
>  		pm_runtime_put_autosuspend(inst->dev->dev);
>  		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>  	}
> @@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
>  		}
>  
>  	}
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  	return ret;
>  
> @@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
>  	else
>  		streamoff_capture(q);
>  
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  }
>  
> @@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
>  
>  finish_job_and_return:
>  	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>  }
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> index 1e5fc5f8b856..35913a7de834 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> @@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
>  	if (ret)
>  		goto return_buffers;
>  
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  	return 0;
>  return_buffers:
>  	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  	return ret;
>  }
> @@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
>  	else
>  		streamoff_capture(inst, q);
>  
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  }
>  
> @@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
>  			break;
>  		}
>  		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
> -		pm_runtime_mark_last_busy(inst->dev->dev);
>  		pm_runtime_put_autosuspend(inst->dev->dev);
>  		return;
>  	default:
> @@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
>  		break;
>  	}
>  	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>  	pm_runtime_put_autosuspend(inst->dev->dev);
>  	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>  }
> diff --git a/drivers/media/platform/nvidia/tegra-vde/h264.c b/drivers/media/platform/nvidia/tegra-vde/h264.c
> index 0e56a4331b0d..45f8f6904867 100644
> --- a/drivers/media/platform/nvidia/tegra-vde/h264.c
> +++ b/drivers/media/platform/nvidia/tegra-vde/h264.c
> @@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
>  	return 0;
>  
>  put_runtime_pm:
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  unlock:
> @@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
>  	if (err)
>  		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	mutex_unlock(&vde->lock);
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> index fac7df0c4d1a..0b37f9b76da5 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> @@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
>  	}
>  	mutex_unlock(&core->lock);
>  
> -	pm_runtime_mark_last_busy(core->dev);
>  	pm_runtime_put_autosuspend(core->dev);
>  
>  	return 0;
> diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> index 7596ae1f7de6..8a10a36abbc2 100644
> --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> @@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
>  	pispbe->streaming_map &= ~BIT(node->id);
>  	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
>  
> -	pm_runtime_mark_last_busy(pispbe->dev);
>  	pm_runtime_put_autosuspend(pispbe->dev);
>  
>  	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
> @@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto disable_devs_err;
>  
> -	pm_runtime_mark_last_busy(pispbe->dev);
>  	pm_runtime_put_autosuspend(pispbe->dev);
>  
>  	return 0;
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index 8542238e0fb1..fa972effd4a2 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
>  			      struct hantro_ctx *ctx,
>  			      enum vb2_buffer_state result)
>  {
> -	pm_runtime_mark_last_busy(vpu->dev);
>  	pm_runtime_put_autosuspend(vpu->dev);
>  
>  	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
> diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
> index bf6d8fa983bf..161f8919022c 100644
> --- a/drivers/media/rc/gpio-ir-recv.c
> +++ b/drivers/media/rc/gpio-ir-recv.c
> @@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
>  		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
>  
>  	if (pmdev) {
> -		pm_runtime_mark_last_busy(pmdev);
>  		pm_runtime_put_autosuspend(pmdev);
>  	}
>  
> -- 
> 2.39.5
> 

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
                     ` (2 preceding siblings ...)
  2025-07-04  9:32   ` Tommaso Merciai
@ 2025-07-04 11:30   ` Dikshita Agarwal
  2025-07-04 15:16   ` Sean Young
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Dikshita Agarwal @ 2025-07-04 11:30 UTC (permalink / raw)
  To: Sakari Ailus, Tommaso Merciai, Martin Hecht,
	Mauro Carvalho Chehab, Sebastian Reichel, Alain Volmat,
	Dave Stevenson, Kieran Bingham, Umang Jain, Manivannan Sadhasivam,
	Laurent Pinchart, Michael Riesch, Mikhail Rudenko,
	Steve Longerbeam, Jacopo Mondi, Nicholas Roth, Benjamin Mugnier,
	Sylvain Petinot, Paul Elder, Matt Ranostay, Nas Chung,
	Jackson Lee, Dmitry Osipenko, Thierry Reding, Jonathan Hunter,
	Vikash Garodia, Abhinav Kumar, Bryan O'Donoghue,
	Raspberry Pi Kernel Maintenance, Florian Fainelli,
	Broadcom internal kernel review list, Nicolas Dufresne,
	Benjamin Gaignard, Philipp Zabel, Sean Young, Hans Verkuil,
	Matthias Fend, Marco Felsch, Tomi Valkeinen, Ricardo Ribalda
  Cc: linux-media, linux-kernel, linux-tegra, linux-arm-msm,
	linux-rpi-kernel, linux-arm-kernel, linux-rockchip



On 7/4/2025 1:24 PM, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/media/i2c/alvium-csi2.c                          | 1 -
>  drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
>  drivers/media/i2c/dw9768.c                               | 1 -
>  drivers/media/i2c/gc0308.c                               | 3 ---
>  drivers/media/i2c/gc2145.c                               | 3 ---
>  drivers/media/i2c/imx219.c                               | 2 --
>  drivers/media/i2c/imx283.c                               | 3 ---
>  drivers/media/i2c/imx290.c                               | 3 ---
>  drivers/media/i2c/imx296.c                               | 1 -
>  drivers/media/i2c/imx415.c                               | 1 -
>  drivers/media/i2c/mt9m114.c                              | 6 ------
>  drivers/media/i2c/ov4689.c                               | 3 ---
>  drivers/media/i2c/ov5640.c                               | 4 ----
>  drivers/media/i2c/ov5645.c                               | 3 ---
>  drivers/media/i2c/ov64a40.c                              | 4 ----
>  drivers/media/i2c/ov8858.c                               | 2 --
>  drivers/media/i2c/st-mipid02.c                           | 2 --
>  drivers/media/i2c/tc358746.c                             | 5 -----
>  drivers/media/i2c/thp7312.c                              | 4 ----
>  drivers/media/i2c/vd55g1.c                               | 4 ----
>  drivers/media/i2c/vd56g3.c                               | 4 ----
>  drivers/media/i2c/video-i2c.c                            | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
>  drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
>  drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
>  drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
>  drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
>  drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
>  drivers/media/rc/gpio-ir-recv.c                          | 1 -
>  29 files changed, 83 deletions(-)
> 
[snip]> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> index fac7df0c4d1a..0b37f9b76da5 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> @@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
>  	}
>  	mutex_unlock(&core->lock);
>  
> -	pm_runtime_mark_last_busy(core->dev);
>  	pm_runtime_put_autosuspend(core->dev);
>  
>  	return 0;
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>

Thanks,
Dikshita

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 64/80] media: rkvdec: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
@ 2025-07-04 13:05   ` Nicolas Dufresne
  2025-08-11 13:48   ` Nicolas Dufresne
  1 sibling, 0 replies; 16+ messages in thread
From: Nicolas Dufresne @ 2025-07-04 13:05 UTC (permalink / raw)
  To: Sakari Ailus, Ezequiel Garcia, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel

Le vendredi 04 juillet 2025 à 10:54 +0300, Sakari Ailus a écrit :
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
> The cover letter of the set can be found here
> <URL:
> https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.i
> ntel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/staging/media/rkvdec/rkvdec.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c
> b/drivers/staging/media/rkvdec/rkvdec.c
> index d707088ec0dc..445f7c92eee3 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
> @@ -765,7 +765,6 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
>  {
>  	struct rkvdec_dev *rkvdec = ctx->dev;
>  
> -	pm_runtime_mark_last_busy(rkvdec->dev);
>  	pm_runtime_put_autosuspend(rkvdec->dev);
>  	rkvdec_job_finish_no_pm(ctx, result);
>  }

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
                     ` (3 preceding siblings ...)
  2025-07-04 11:30   ` Dikshita Agarwal
@ 2025-07-04 15:16   ` Sean Young
  2025-07-07 15:57   ` Dave Stevenson
  2025-07-09  8:43   ` Benjamin Gaignard
  6 siblings, 0 replies; 16+ messages in thread
From: Sean Young @ 2025-07-04 15:16 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sebastian Reichel, Alain Volmat, Dave Stevenson, Kieran Bingham,
	Umang Jain, Manivannan Sadhasivam, Laurent Pinchart,
	Michael Riesch, Mikhail Rudenko, Steve Longerbeam, Jacopo Mondi,
	Nicholas Roth, Benjamin Mugnier, Sylvain Petinot, Paul Elder,
	Matt Ranostay, Nas Chung, Jackson Lee, Dmitry Osipenko,
	Thierry Reding, Jonathan Hunter, Vikash Garodia, Dikshita Agarwal,
	Abhinav Kumar, Bryan O'Donoghue,
	Raspberry Pi Kernel Maintenance, Florian Fainelli,
	Broadcom internal kernel review list, Nicolas Dufresne,
	Benjamin Gaignard, Philipp Zabel, Hans Verkuil, Matthias Fend,
	Marco Felsch, Tomi Valkeinen, Ricardo Ribalda, linux-media,
	linux-kernel, linux-tegra, linux-arm-msm, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip

On Fri, Jul 04, 2025 at 10:54:31AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
 
...

>  diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
> index bf6d8fa983bf..161f8919022c 100644
> --- a/drivers/media/rc/gpio-ir-recv.c
> +++ b/drivers/media/rc/gpio-ir-recv.c
> @@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
>  		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
>  
>  	if (pmdev) {
> -		pm_runtime_mark_last_busy(pmdev);
>  		pm_runtime_put_autosuspend(pmdev);
>  	}

No need for braces any more - as Laurent already pointed out.

Reviewed-by: Sean Young <sean@mess.org>


Sean

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 61/80] spi: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 61/80] spi: " Sakari Ailus
@ 2025-07-07  9:35   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-07-07  9:35 UTC (permalink / raw)
  To: Sakari Ailus, Mark Brown, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Frank Li, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Matthias Brugger, Han Xu,
	Haibo Chen, Yogesh Gaur, Heiko Stuebner, Andi Shyti,
	Tudor Ambarus, Krzysztof Kozlowski, Alim Akhtar, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Maxime Coquelin, Alexandre Torgue,
	Alain Volmat, Michal Simek
  Cc: linux-spi, linux-arm-kernel, linux-kernel, imx, linux-mediatek,
	linux-rockchip, linux-samsung-soc, linux-stm32

Il 04/07/25 09:54, Sakari Ailus ha scritto:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>


For MediaTek:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:53 ` [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
@ 2025-07-07  9:35   ` AngeloGioacchino Del Regno
  2025-07-18 10:58   ` Herbert Xu
  1 sibling, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-07-07  9:35 UTC (permalink / raw)
  To: Sakari Ailus, Olivia Mackall, Herbert Xu, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Hadar Gat, Sean Wang,
	Matthias Brugger, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Daniel Golle,
	Aurelien Jarno, Nicolas Frattaroli, Heiko Stuebner,
	Maxime Coquelin, Alexandre Torgue, Uwe Kleine-König,
	Marek Vasut, Gatien Chevallier
  Cc: linux-crypto, linux-arm-kernel, linux-kernel, linux-mediatek,
	openbmc, linux-rockchip, linux-stm32

Il 04/07/25 09:53, Sakari Ailus ha scritto:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

For MediaTek:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
                     ` (4 preceding siblings ...)
  2025-07-04 15:16   ` Sean Young
@ 2025-07-07 15:57   ` Dave Stevenson
  2025-07-09  8:43   ` Benjamin Gaignard
  6 siblings, 0 replies; 16+ messages in thread
From: Dave Stevenson @ 2025-07-07 15:57 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Tommaso Merciai, Martin Hecht, Mauro Carvalho Chehab,
	Sebastian Reichel, Alain Volmat, Kieran Bingham, Umang Jain,
	Manivannan Sadhasivam, Laurent Pinchart, Michael Riesch,
	Mikhail Rudenko, Steve Longerbeam, Jacopo Mondi, Nicholas Roth,
	Benjamin Mugnier, Sylvain Petinot, Paul Elder, Matt Ranostay,
	Nas Chung, Jackson Lee, Dmitry Osipenko, Thierry Reding,
	Jonathan Hunter, Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Raspberry Pi Kernel Maintenance,
	Florian Fainelli, Broadcom internal kernel review list,
	Nicolas Dufresne, Benjamin Gaignard, Philipp Zabel, Sean Young,
	Hans Verkuil, Matthias Fend, Marco Felsch, Tomi Valkeinen,
	Ricardo Ribalda, linux-media, linux-kernel, linux-tegra,
	linux-arm-msm, linux-rpi-kernel, linux-arm-kernel, linux-rockchip

Hi Sakari

On Fri, 4 Jul 2025 at 08:54, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
[...]
>  drivers/media/i2c/imx219.c                               | 2 --

Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
                     ` (5 preceding siblings ...)
  2025-07-07 15:57   ` Dave Stevenson
@ 2025-07-09  8:43   ` Benjamin Gaignard
  6 siblings, 0 replies; 16+ messages in thread
From: Benjamin Gaignard @ 2025-07-09  8:43 UTC (permalink / raw)
  To: Sakari Ailus, Tommaso Merciai, Martin Hecht,
	Mauro Carvalho Chehab, Sebastian Reichel, Alain Volmat,
	Dave Stevenson, Kieran Bingham, Umang Jain, Manivannan Sadhasivam,
	Laurent Pinchart, Michael Riesch, Mikhail Rudenko,
	Steve Longerbeam, Jacopo Mondi, Nicholas Roth, Benjamin Mugnier,
	Sylvain Petinot, Paul Elder, Matt Ranostay, Nas Chung,
	Jackson Lee, Dmitry Osipenko, Thierry Reding, Jonathan Hunter,
	Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Raspberry Pi Kernel Maintenance,
	Florian Fainelli, Broadcom internal kernel review list,
	Nicolas Dufresne, Philipp Zabel, Sean Young, Hans Verkuil,
	Matthias Fend, Marco Felsch, Tomi Valkeinen, Ricardo Ribalda
  Cc: linux-media, linux-kernel, linux-tegra, linux-arm-msm,
	linux-rpi-kernel, linux-arm-kernel, linux-rockchip


Le 04/07/2025 à 09:54, Sakari Ailus a écrit :
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
>
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
>
>          git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                  pm-runtime-6.17-rc1
>
>   drivers/media/i2c/alvium-csi2.c                          | 1 -
>   drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
>   drivers/media/i2c/dw9768.c                               | 1 -
>   drivers/media/i2c/gc0308.c                               | 3 ---
>   drivers/media/i2c/gc2145.c                               | 3 ---
>   drivers/media/i2c/imx219.c                               | 2 --
>   drivers/media/i2c/imx283.c                               | 3 ---
>   drivers/media/i2c/imx290.c                               | 3 ---
>   drivers/media/i2c/imx296.c                               | 1 -
>   drivers/media/i2c/imx415.c                               | 1 -
>   drivers/media/i2c/mt9m114.c                              | 6 ------
>   drivers/media/i2c/ov4689.c                               | 3 ---
>   drivers/media/i2c/ov5640.c                               | 4 ----
>   drivers/media/i2c/ov5645.c                               | 3 ---
>   drivers/media/i2c/ov64a40.c                              | 4 ----
>   drivers/media/i2c/ov8858.c                               | 2 --
>   drivers/media/i2c/st-mipid02.c                           | 2 --
>   drivers/media/i2c/tc358746.c                             | 5 -----
>   drivers/media/i2c/thp7312.c                              | 4 ----
>   drivers/media/i2c/vd55g1.c                               | 4 ----
>   drivers/media/i2c/vd56g3.c                               | 4 ----
>   drivers/media/i2c/video-i2c.c                            | 4 ----
>   drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
>   drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
>   drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
>   drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
>   drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
>   drivers/media/platform/verisilicon/hantro_drv.c          | 1 -

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

>   drivers/media/rc/gpio-ir-recv.c                          | 1 -
>   29 files changed, 83 deletions(-)
>
> diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
> index 05b708bd0a64..1f088acecf36 100644
> --- a/drivers/media/i2c/alvium-csi2.c
> +++ b/drivers/media/i2c/alvium-csi2.c
> @@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
>   
>   	} else {
>   		alvium_set_stream_mipi(alvium, enable);
> -		pm_runtime_mark_last_busy(&client->dev);
>   		pm_runtime_put_autosuspend(&client->dev);
>   	}
>   
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index 487bcabb4a19..3316639b695e 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
>   	}
>   
>   	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(&client->dev);
>   		pm_runtime_put_autosuspend(&client->dev);
>   	}
>   
> @@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
>   	if (!enable) {
>   		ccs_stop_streaming(sensor);
>   		sensor->streaming = false;
> -		pm_runtime_mark_last_busy(&client->dev);
>   		pm_runtime_put_autosuspend(&client->dev);
>   
>   		return 0;
> @@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
>   	rval = ccs_start_streaming(sensor);
>   	if (rval < 0) {
>   		sensor->streaming = false;
> -		pm_runtime_mark_last_busy(&client->dev);
>   		pm_runtime_put_autosuspend(&client->dev);
>   	}
>   
> @@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
>   		return -ENODEV;
>   	}
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	/*
> diff --git a/drivers/media/i2c/dw9768.c b/drivers/media/i2c/dw9768.c
> index 3a4d100b9199..d434721ba8ed 100644
> --- a/drivers/media/i2c/dw9768.c
> +++ b/drivers/media/i2c/dw9768.c
> @@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
>   
>   static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
>   {
> -	pm_runtime_mark_last_busy(sd->dev);
>   	pm_runtime_put_autosuspend(sd->dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/gc0308.c b/drivers/media/i2c/gc0308.c
> index 069f42785b3c..cbcda0e18ff1 100644
> --- a/drivers/media/i2c/gc0308.c
> +++ b/drivers/media/i2c/gc0308.c
> @@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
>   	if (ret)
>   		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
>   
> -	pm_runtime_mark_last_busy(gc0308->dev);
>   	pm_runtime_put_autosuspend(gc0308->dev);
>   
>   	return ret;
> @@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
>   	return 0;
>   
>   disable_pm:
> -	pm_runtime_mark_last_busy(gc0308->dev);
>   	pm_runtime_put_autosuspend(gc0308->dev);
>   	return ret;
>   }
>   
>   static int gc0308_stop_stream(struct gc0308 *gc0308)
>   {
> -	pm_runtime_mark_last_busy(gc0308->dev);
>   	pm_runtime_put_autosuspend(gc0308->dev);
>   	return 0;
>   }
> diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c
> index ba02161d46e7..559a851669aa 100644
> --- a/drivers/media/i2c/gc2145.c
> +++ b/drivers/media/i2c/gc2145.c
> @@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
>   	return 0;
>   
>   err_rpm_put:
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   	return ret;
>   }
> @@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
>   	if (ret)
>   		dev_err(&client->dev, "%s failed to write regs\n", __func__);
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	return ret;
> @@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	return ret;
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index 3b4f68543342..3faf48f34af4 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
>   	return 0;
>   
>   err_rpm_put:
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   	return ret;
>   }
> @@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
>   	__v4l2_ctrl_grab(imx219->vflip, false);
>   	__v4l2_ctrl_grab(imx219->hflip, false);
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	return ret;
> diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c
> index da618c8cbadc..67e8bb432d10 100644
> --- a/drivers/media/i2c/imx283.c
> +++ b/drivers/media/i2c/imx283.c
> @@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
>   	return 0;
>   
>   err_rpm_put:
> -	pm_runtime_mark_last_busy(imx283->dev);
>   	pm_runtime_put_autosuspend(imx283->dev);
>   
>   	return ret;
> @@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
>   	if (ret)
>   		dev_err(imx283->dev, "Failed to stop stream\n");
>   
> -	pm_runtime_mark_last_busy(imx283->dev);
>   	pm_runtime_put_autosuspend(imx283->dev);
>   
>   	return ret;
> @@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
>   	 * Decrease the PM usage count. The device will get suspended after the
>   	 * autosuspend delay, turning the power off.
>   	 */
> -	pm_runtime_mark_last_busy(imx283->dev);
>   	pm_runtime_put_autosuspend(imx283->dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index fbf7eba3d71d..970a8d89a3e7 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(imx290->dev);
>   	pm_runtime_put_autosuspend(imx290->dev);
>   
>   	return ret;
> @@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
>   		}
>   	} else {
>   		imx290_stop_streaming(imx290);
> -		pm_runtime_mark_last_busy(imx290->dev);
>   		pm_runtime_put_autosuspend(imx290->dev);
>   	}
>   
> @@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
>   	 */
>   	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
>   	imx290->sd.dev = imx290->dev;
> -	pm_runtime_mark_last_busy(imx290->dev);
>   	pm_runtime_put_autosuspend(imx290->dev);
>   
>   	imx290->sd.internal_ops = &imx290_internal_ops;
> diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
> index f3bec16b527c..61116f4e3f76 100644
> --- a/drivers/media/i2c/imx296.c
> +++ b/drivers/media/i2c/imx296.c
> @@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
>   	if (!enable) {
>   		ret = imx296_stream_off(sensor);
>   
> -		pm_runtime_mark_last_busy(sensor->dev);
>   		pm_runtime_put_autosuspend(sensor->dev);
>   
>   		goto unlock;
> diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
> index 278e743646ea..276bf4d6f39d 100644
> --- a/drivers/media/i2c/imx415.c
> +++ b/drivers/media/i2c/imx415.c
> @@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
>   	if (!enable) {
>   		ret = imx415_stream_off(sensor);
>   
> -		pm_runtime_mark_last_busy(sensor->dev);
>   		pm_runtime_put_autosuspend(sensor->dev);
>   
>   		goto unlock;
> diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
> index 3f540ca40f3c..aa3fd6c6c76c 100644
> --- a/drivers/media/i2c/mt9m114.c
> +++ b/drivers/media/i2c/mt9m114.c
> @@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
>   	return 0;
>   
>   error:
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>   	pm_runtime_put_autosuspend(&sensor->client->dev);
>   
>   	return ret;
> @@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
>   
>   	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
>   
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>   	pm_runtime_put_autosuspend(&sensor->client->dev);
>   
>   	return ret;
> @@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>   	pm_runtime_put_autosuspend(&sensor->client->dev);
>   
>   	return ret;
> @@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>   	pm_runtime_put_autosuspend(&sensor->client->dev);
>   
>   	return ret;
> @@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&sensor->client->dev);
>   	pm_runtime_put_autosuspend(&sensor->client->dev);
>   
>   	return ret;
> @@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
>   	 * Decrease the PM usage count. The device will get suspended after the
>   	 * autosuspend delay, turning the power off.
>   	 */
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
> index 1c3a449f9354..7d740ad3926f 100644
> --- a/drivers/media/i2c/ov4689.c
> +++ b/drivers/media/i2c/ov4689.c
> @@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
>   	} else {
>   		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
>   			  OV4689_MODE_SW_STANDBY, NULL);
> -		pm_runtime_mark_last_busy(dev);
>   		pm_runtime_put_autosuspend(dev);
>   	}
>   
> @@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return ret;
> @@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
>   		goto err_clean_subdev_pm;
>   	}
>   
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 0dae0438aa80..84198613381d 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>   	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>   
>   	return 0;
> @@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>   	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>   
>   	return ret;
> @@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
>   	mutex_unlock(&sensor->lock);
>   
>   	if (!enable || ret) {
> -		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>   		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
>   	}
>   
> @@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
>   
>   	pm_runtime_set_autosuspend_delay(dev, 1000);
>   	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
> index 004d0ee5c3f5..58c846a44376 100644
> --- a/drivers/media/i2c/ov5645.c
> +++ b/drivers/media/i2c/ov5645.c
> @@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(ov5645->dev);
>   	pm_runtime_put_autosuspend(ov5645->dev);
>   
>   	return ret;
> @@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
>   			       OV5645_SYSTEM_CTRL0_STOP);
>   
>   rpm_put:
> -	pm_runtime_mark_last_busy(ov5645->dev);
>   	pm_runtime_put_autosuspend(ov5645->dev);
>   
>   	return ret;
> @@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
>   
>   	pm_runtime_set_autosuspend_delay(dev, 1000);
>   	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
> index a5da4fe47e0b..15912ecb8d26 100644
> --- a/drivers/media/i2c/ov64a40.c
> +++ b/drivers/media/i2c/ov64a40.c
> @@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
>   	return 0;
>   
>   error_power_off:
> -	pm_runtime_mark_last_busy(ov64a40->dev);
>   	pm_runtime_put_autosuspend(ov64a40->dev);
>   
>   	return ret;
> @@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
>   				  struct v4l2_subdev_state *state)
>   {
>   	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
> -	pm_runtime_mark_last_busy(ov64a40->dev);
>   	pm_runtime_put_autosuspend(ov64a40->dev);
>   
>   	__v4l2_ctrl_grab(ov64a40->link_freq, false);
> @@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
>   	}
>   
>   	if (pm_status > 0) {
> -		pm_runtime_mark_last_busy(ov64a40->dev);
>   		pm_runtime_put_autosuspend(ov64a40->dev);
>   	}
>   
> @@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
>   		goto error_subdev_cleanup;
>   	}
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
> index 95f9ae794846..6b7193eaea1f 100644
> --- a/drivers/media/i2c/ov8858.c
> +++ b/drivers/media/i2c/ov8858.c
> @@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
>   		}
>   	} else {
>   		ov8858_stop_stream(ov8858);
> -		pm_runtime_mark_last_busy(&client->dev);
>   		pm_runtime_put_autosuspend(&client->dev);
>   	}
>   
> @@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
>   		goto err_power_off;
>   	}
>   
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	return 0;
> diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
> index f4568e87f018..41ae25b0911f 100644
> --- a/drivers/media/i2c/st-mipid02.c
> +++ b/drivers/media/i2c/st-mipid02.c
> @@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
>   	if (ret)
>   		goto error;
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   error:
> @@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
>   	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
>   	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   	return ret;
>   }
> diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
> index 143aa1359aba..bcfc274cf891 100644
> --- a/drivers/media/i2c/tc358746.c
> +++ b/drivers/media/i2c/tc358746.c
> @@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
>   		return 0;
>   
>   err_out:
> -		pm_runtime_mark_last_busy(sd->dev);
>   		pm_runtime_put_sync_autosuspend(sd->dev);
>   
>   		return err;
> @@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
>   	if (err)
>   		return err;
>   
> -	pm_runtime_mark_last_busy(sd->dev);
>   	pm_runtime_put_sync_autosuspend(sd->dev);
>   
>   	return v4l2_subdev_call(src, video, s_stream, 0);
> @@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
>   	err = tc358746_read(tc358746, reg->reg, &val);
>   	reg->val = val;
>   
> -	pm_runtime_mark_last_busy(sd->dev);
>   	pm_runtime_put_sync_autosuspend(sd->dev);
>   
>   	return err;
> @@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
>   
>   	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
>   
> -	pm_runtime_mark_last_busy(sd->dev);
>   	pm_runtime_put_sync_autosuspend(sd->dev);
>   
>   	return 0;
> @@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
>   	}
>   
>   	err = tc358746_read(tc358746, CHIPID_REG, &val);
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_sync_autosuspend(dev);
>   	if (err)
>   		return -ENODEV;
> diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c
> index 8852c56431fe..775cfba188d8 100644
> --- a/drivers/media/i2c/thp7312.c
> +++ b/drivers/media/i2c/thp7312.c
> @@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
>   	if (!enable) {
>   		thp7312_stream_enable(thp7312, false);
>   
> -		pm_runtime_mark_last_busy(thp7312->dev);
>   		pm_runtime_put_autosuspend(thp7312->dev);
>   
>   		v4l2_subdev_unlock_state(sd_state);
> @@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
>   	goto finish_unlock;
>   
>   finish_pm:
> -	pm_runtime_mark_last_busy(thp7312->dev);
>   	pm_runtime_put_autosuspend(thp7312->dev);
>   finish_unlock:
>   	v4l2_subdev_unlock_state(sd_state);
> @@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(thp7312->dev);
>   	pm_runtime_put_autosuspend(thp7312->dev);
>   
>   	return ret;
> @@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
>   	 * Decrease the PM usage count. The device will get suspended after the
>   	 * autosuspend delay, turning the power off.
>   	 */
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
> diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
> index c0754fd03b1d..7c39183dd44b 100644
> --- a/drivers/media/i2c/vd55g1.c
> +++ b/drivers/media/i2c/vd55g1.c
> @@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
>   
>   	vd55g1_grab_ctrls(sensor, false);
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
>   	pm_runtime_enable(dev);
>   	pm_runtime_set_autosuspend_delay(dev, 4000);
>   	pm_runtime_use_autosuspend(dev);
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	ret = vd55g1_subdev_init(sensor);
> diff --git a/drivers/media/i2c/vd56g3.c b/drivers/media/i2c/vd56g3.c
> index 5d951ad0b478..d66e21ba4498 100644
> --- a/drivers/media/i2c/vd56g3.c
> +++ b/drivers/media/i2c/vd56g3.c
> @@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
>   		break;
>   	}
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
>   	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
>   	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
>   
> -	pm_runtime_mark_last_busy(sensor->dev);
>   	pm_runtime_put_autosuspend(sensor->dev);
>   
>   	return ret;
> @@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
>   	}
>   
>   	/* Sensor could now be powered off (after the autosuspend delay) */
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	dev_dbg(dev, "Successfully probe %s sensor\n",
> diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
> index 0dd991d70d53..1eee2d4f5b40 100644
> --- a/drivers/media/i2c/video-i2c.c
> +++ b/drivers/media/i2c/video-i2c.c
> @@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
>   		return tmp;
>   
>   	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
> -	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
>   	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
>   	if (tmp)
>   		return tmp;
> @@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
>   		return 0;
>   
>   error_rpm_put:
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   error_del_list:
>   	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
> @@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
>   
>   	kthread_stop(data->kthread_vid_cap);
>   	data->kthread_vid_cap = NULL;
> -	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
>   	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
>   
>   	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
> @@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
>   	if (ret < 0)
>   		goto error_pm_disable;
>   
> -	pm_runtime_mark_last_busy(&client->dev);
>   	pm_runtime_put_autosuspend(&client->dev);
>   
>   	return 0;
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> index fd71f0c43ac3..a9ce032cc5a2 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> @@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
>   	if (q_status.report_queue_count == 0 &&
>   	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
>   		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
> -		pm_runtime_mark_last_busy(inst->dev->dev);
>   		pm_runtime_put_autosuspend(inst->dev->dev);
>   		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>   	}
> @@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
>   		}
>   
>   	}
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   	return ret;
>   
> @@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
>   	else
>   		streamoff_capture(q);
>   
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   }
>   
> @@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
>   
>   finish_job_and_return:
>   	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>   }
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> index 1e5fc5f8b856..35913a7de834 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> @@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
>   	if (ret)
>   		goto return_buffers;
>   
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   	return 0;
>   return_buffers:
>   	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   	return ret;
>   }
> @@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
>   	else
>   		streamoff_capture(inst, q);
>   
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   }
>   
> @@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
>   			break;
>   		}
>   		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
> -		pm_runtime_mark_last_busy(inst->dev->dev);
>   		pm_runtime_put_autosuspend(inst->dev->dev);
>   		return;
>   	default:
> @@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
>   		break;
>   	}
>   	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
> -	pm_runtime_mark_last_busy(inst->dev->dev);
>   	pm_runtime_put_autosuspend(inst->dev->dev);
>   	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
>   }
> diff --git a/drivers/media/platform/nvidia/tegra-vde/h264.c b/drivers/media/platform/nvidia/tegra-vde/h264.c
> index 0e56a4331b0d..45f8f6904867 100644
> --- a/drivers/media/platform/nvidia/tegra-vde/h264.c
> +++ b/drivers/media/platform/nvidia/tegra-vde/h264.c
> @@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
>   	return 0;
>   
>   put_runtime_pm:
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   unlock:
> @@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
>   	if (err)
>   		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
>   
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   
>   	mutex_unlock(&vde->lock);
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> index fac7df0c4d1a..0b37f9b76da5 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_queue.c
> @@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
>   	}
>   	mutex_unlock(&core->lock);
>   
> -	pm_runtime_mark_last_busy(core->dev);
>   	pm_runtime_put_autosuspend(core->dev);
>   
>   	return 0;
> diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> index 7596ae1f7de6..8a10a36abbc2 100644
> --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
> @@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
>   	pispbe->streaming_map &= ~BIT(node->id);
>   	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
>   
> -	pm_runtime_mark_last_busy(pispbe->dev);
>   	pm_runtime_put_autosuspend(pispbe->dev);
>   
>   	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
> @@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
>   	if (ret)
>   		goto disable_devs_err;
>   
> -	pm_runtime_mark_last_busy(pispbe->dev);
>   	pm_runtime_put_autosuspend(pispbe->dev);
>   
>   	return 0;
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index 8542238e0fb1..fa972effd4a2 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
>   			      struct hantro_ctx *ctx,
>   			      enum vb2_buffer_state result)
>   {
> -	pm_runtime_mark_last_busy(vpu->dev);
>   	pm_runtime_put_autosuspend(vpu->dev);
>   
>   	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
> diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
> index bf6d8fa983bf..161f8919022c 100644
> --- a/drivers/media/rc/gpio-ir-recv.c
> +++ b/drivers/media/rc/gpio-ir-recv.c
> @@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
>   		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
>   
>   	if (pmdev) {
> -		pm_runtime_mark_last_busy(pmdev);
>   		pm_runtime_put_autosuspend(pmdev);
>   	}
>   

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:53 ` [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
  2025-07-07  9:35   ` AngeloGioacchino Del Regno
@ 2025-07-18 10:58   ` Herbert Xu
  1 sibling, 0 replies; 16+ messages in thread
From: Herbert Xu @ 2025-07-18 10:58 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Alexandre Belloni, Tomer Maimon, Alexandre Torgue, Claudiu Beznea,
	Olivia Mackall, linux-stm32, Heiko Stuebner, Marek Vasut,
	Benjamin Fair, linux-rockchip, openbmc, Daniel Golle, Nancy Yuen,
	Hadar Gat, Sean Wang, Uwe Kleine-König, Matthias Brugger,
	Tali Perry, linux-arm-kernel, AngeloGioacchino Del Regno,
	Avi Fishman, Patrick Venture, Nicolas Ferre, linux-kernel,
	linux-crypto, Maxime Coquelin, linux-mediatek, Gatien Chevallier,
	Aurelien Jarno

On Fri, Jul 04, 2025 at 10:53:59AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/char/hw_random/atmel-rng.c     | 1 -
>  drivers/char/hw_random/cctrng.c        | 1 -
>  drivers/char/hw_random/mtk-rng.c       | 1 -
>  drivers/char/hw_random/npcm-rng.c      | 1 -
>  drivers/char/hw_random/omap3-rom-rng.c | 1 -
>  drivers/char/hw_random/rockchip-rng.c  | 3 ---
>  drivers/char/hw_random/stm32-rng.c     | 1 -
>  7 files changed, 9 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 64/80] media: rkvdec: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
  2025-07-04 13:05   ` Nicolas Dufresne
@ 2025-08-11 13:48   ` Nicolas Dufresne
  1 sibling, 0 replies; 16+ messages in thread
From: Nicolas Dufresne @ 2025-08-11 13:48 UTC (permalink / raw)
  To: Sakari Ailus, Ezequiel Garcia, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1568 bytes --]

Hi Sakari,

Le vendredi 04 juillet 2025 à 10:54 +0300, Sakari Ailus a écrit :
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:
> https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.i
> ntel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/staging/media/rkvdec/rkvdec.c | 1 -

This driver was de-stage during 6.17, I will port it, no action required.

Nicolas

>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c
> b/drivers/staging/media/rkvdec/rkvdec.c
> index d707088ec0dc..445f7c92eee3 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
> @@ -765,7 +765,6 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
>  {
>  	struct rkvdec_dev *rkvdec = ctx->dev;
>  
> -	pm_runtime_mark_last_busy(rkvdec->dev);
>  	pm_runtime_put_autosuspend(rkvdec->dev);
>  	rkvdec_job_finish_no_pm(ctx, result);
>  }

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-08-11 13:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
2025-07-04  7:53 ` [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-07  9:35   ` AngeloGioacchino Del Regno
2025-07-18 10:58   ` Herbert Xu
2025-07-04  7:54 ` [PATCH 41/80] media: " Sakari Ailus
2025-07-04  8:56   ` Laurent Pinchart
2025-07-04  9:07   ` Thierry Reding
2025-07-04  9:32   ` Tommaso Merciai
2025-07-04 11:30   ` Dikshita Agarwal
2025-07-04 15:16   ` Sean Young
2025-07-07 15:57   ` Dave Stevenson
2025-07-09  8:43   ` Benjamin Gaignard
2025-07-04  7:54 ` [PATCH 61/80] spi: " Sakari Ailus
2025-07-07  9:35   ` AngeloGioacchino Del Regno
2025-07-04  7:54 ` [PATCH 64/80] media: rkvdec: " Sakari Ailus
2025-07-04 13:05   ` Nicolas Dufresne
2025-08-11 13:48   ` Nicolas Dufresne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).