media: rockchip: isp and ispp sync to power off

Change-Id: Iaaa74ccdc6956458e700fdcf430eba804707c200
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2020-10-14 11:01:02 +08:00
committed by Tao Huang
parent e963ad7f78
commit 9ebe3e376b
4 changed files with 7 additions and 4 deletions

View File

@@ -793,7 +793,7 @@ static int __maybe_unused rkisp_runtime_suspend(struct device *dev)
if (atomic_dec_return(&isp_dev->hw_dev->power_cnt))
return 0;
return pm_runtime_put(isp_dev->hw_dev->dev);
return pm_runtime_put_sync(isp_dev->hw_dev->dev);
}
static int __maybe_unused rkisp_runtime_resume(struct device *dev)

View File

@@ -1619,8 +1619,11 @@ static int rkisp_isp_sd_s_power(struct v4l2_subdev *sd, int on)
kfifo_reset(&isp_dev->csi_dev.rdbk_kfifo);
ret = pm_runtime_get_sync(isp_dev->dev);
} else {
ret = pm_runtime_put(isp_dev->dev);
ret = pm_runtime_put_sync(isp_dev->dev);
}
if (ret < 0)
v4l2_err(sd, "%s on:%d failed:%d\n", __func__, on, ret);
return ret;
}

View File

@@ -305,7 +305,7 @@ static int __maybe_unused rkispp_runtime_suspend(struct device *dev)
if (atomic_dec_return(&ispp_dev->hw_dev->power_cnt))
return 0;
return pm_runtime_put(ispp_dev->hw_dev->dev);
return pm_runtime_put_sync(ispp_dev->hw_dev->dev);
}
static int __maybe_unused rkispp_runtime_resume(struct device *dev)

View File

@@ -351,7 +351,7 @@ static int rkispp_sd_s_power(struct v4l2_subdev *sd, int on)
} else {
if (ispp_dev->inp == INP_ISP)
v4l2_subdev_call(ispp_sdev->remote_sd, core, s_power, 0);
ret = pm_runtime_put(ispp_dev->dev);
ret = pm_runtime_put_sync(ispp_dev->dev);
if (ret < 0)
v4l2_err(&ispp_dev->v4l2_dev,
"%s runtime put failed:%d\n",