Skip to contentSkip to conversation

media: staging/ipu7: fix isys device runtime PM usage in firmware closing

PATCH Superseded [email protected] 2 participants 2 messages Sep 9, 2025

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: staging/ipu7: fix isys device runtime PM usage in firmware closing

From: Bingbu Cao <[email protected]>

The PM usage counter of isys was bumped up when start camera stream (opening firmware) but it was not dropped after stream stop(closing firmware), it forbids system fail to suspend due to the wrong PM state of ISYS. This patch drop the PM usage counter in firmware close to fix it.

---
 drivers/staging/media/ipu7/ipu7-isys-video.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/media/ipu7/ipu7-isys-video.c +1 -0
index 8756da3a8fb0..173afd405d9b 100644
@@ -946,6 +946,7 @@ void ipu7_isys_fw_close(struct ipu7_isys *isys)
 		ipu7_fw_isys_close(isys);
 
 	mutex_unlock(&isys->mutex);
+	pm_runtime_put(&isys->adev->auxdev.dev);
 }
 
 int ipu7_isys_setup_video(struct ipu7_isys_video *av,
Signature · 1 line
2.34.1
maintainer
#1 lore raw

Hi Bingbu,

Quoted 9 lines · On Tue, Sep 09, 2025 at 11:21:48AM +0800, [email protected] wrote:

From: Bingbu Cao <[email protected]>

The PM usage counter of isys was bumped up when start camera stream (opening firmware) but it was not dropped after stream stop(closing firmware), it forbids system fail to suspend due to the wrong PM state of ISYS. This patch drop the PM usage counter in firmware close to fix it.

Can you provide a Fixes: tag, too?

Quoted 17 lines
---
 drivers/staging/media/ipu7/ipu7-isys-video.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/media/ipu7/ipu7-isys-video.c +1 -0
index 8756da3a8fb0..173afd405d9b 100644
@@ -946,6 +946,7 @@ void ipu7_isys_fw_close(struct ipu7_isys *isys)
 		ipu7_fw_isys_close(isys);
 
 	mutex_unlock(&isys->mutex);
+	pm_runtime_put(&isys->adev->auxdev.dev);
 }
 
 int ipu7_isys_setup_video(struct ipu7_isys_video *av,
Signature · 3 lines
Kind regards,

Sakari Ailus