Thread (4 messages) 4 messages, 2 authors, 2024-10-12
STALE640d

[PATCH] media: i2c: improve suspend/resume switch performance for GT9769 VCM driver

From: Zhi Mao <zhi.mao@mediatek.com>
Date: 2024-08-31 05:54:14
Also in: linux-media, linux-mediatek, lkml
Subsystem: dongwoon dw9768 lens voice coil driver, media input infrastructure (v4l/dvb), the rest, v4l2 lens drivers · Maintainers: Mauro Carvalho Chehab, Linus Torvalds, Sakari Ailus

Chromebook camera AP can switch between video and photo mode,
the behavior corresponding to VCM is suspend and resume,
it will cause camera preview is not smooth during switching operation.
We use autosuspend function can fix this issue.

Signed-off-by: Zhi Mao <zhi.mao@mediatek.com>
---
 drivers/media/i2c/dw9768.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/dw9768.c b/drivers/media/i2c/dw9768.c
index 18ef2b35c9aa..7449d29df901 100644
--- a/drivers/media/i2c/dw9768.c
+++ b/drivers/media/i2c/dw9768.c
@@ -374,7 +374,7 @@ 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_put(sd->dev);
+	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return 0;
 }
@@ -490,6 +490,7 @@ static int dw9768_probe(struct i2c_client *client)
 		goto err_power_off;
 	}
 
+	pm_runtime_use_autosuspend(dev);
 	pm_runtime_idle(dev);
 
 	return 0;
-- 
2.46.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help