summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunfei Dong <yunfei.dong@mediatek.com>2023-01-14 10:41:12 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-02-08 07:32:54 +0100
commit255a4a5f1d2bc70f95ac03defab39f2a7c1fff42 (patch)
treedcb9980e627e62cce52349bb3fdad1b689632162
parentmedia: amphion: correct the unspecified color space (diff)
downloadlinux-255a4a5f1d2bc70f95ac03defab39f2a7c1fff42.tar.xz
linux-255a4a5f1d2bc70f95ac03defab39f2a7c1fff42.zip
media: mediatek: vcodec: Using pm_runtime_put instead of pm_runtime_put_sync
pm_runtime_put will set RPM_ASYNC flag then queue an idle-notification request again, won't return error immediately until current request is scheduled. But pm_runtime_put_sync run the ->runtime_idle() callback directly, return error immediately no matter whether current request is scheduled. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c
index 4305e4eb9900..777d445999e9 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c
@@ -72,9 +72,9 @@ static void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm)
{
int ret;
- ret = pm_runtime_put_sync(pm->dev);
- if (ret)
- mtk_v4l2_err("pm_runtime_put_sync fail %d", ret);
+ ret = pm_runtime_put(pm->dev);
+ if (ret && ret != -EAGAIN)
+ mtk_v4l2_err("pm_runtime_put fail %d", ret);
}
static void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm)