Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

Laurent Pinchart
2025-07-04T08:56:37Z

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