media: atomisp: Remove double atomisp_mrfld_power_down()/_up() calls from atomisp_reset()

atomisp_reset() calls atomisp_mrfld_power_down() after calling
atomisp_runtime_suspend(), which already calls
atomisp_mrfld_power_down() itself.

And the some goes for atomisp_runtime_resume() / atomisp_mrfld_power_up().

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Hans de Goede 2022-11-11 17:48:14 +00:00 committed by Mauro Carvalho Chehab
parent f5cb5adaa8
commit 24aba5825c
3 changed files with 7 additions and 15 deletions

View File

@ -311,17 +311,11 @@ int atomisp_reset(struct atomisp_device *isp)
ret = atomisp_runtime_suspend(isp->dev);
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_suspend failed, %d\n", ret);
ret = atomisp_mrfld_power_down(isp);
if (ret < 0) {
dev_err(isp->dev, "can not disable ISP power\n");
} else {
ret = atomisp_mrfld_power_up(isp);
if (ret < 0)
dev_err(isp->dev, "can not enable ISP power\n");
ret = atomisp_runtime_resume(isp->dev);
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_resume failed, %d\n", ret);
}
ret = atomisp_runtime_resume(isp->dev);
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_resume failed, %d\n", ret);
ret = atomisp_css_resume(isp);
if (ret)
isp->isp_fatal_error = true;

View File

@ -341,8 +341,6 @@ int atomisp_inject_a_fake_event(struct atomisp_sub_device *asd, int *event);
int atomisp_get_invalid_frame_num(struct video_device *vdev,
int *invalid_frame_num);
int atomisp_mrfld_power_up(struct atomisp_device *isp);
int atomisp_mrfld_power_down(struct atomisp_device *isp);
int atomisp_runtime_suspend(struct device *dev);
int atomisp_runtime_resume(struct device *dev);
#endif /* __ATOMISP_CMD_H__ */

View File

@ -725,13 +725,13 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
}
/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
int atomisp_mrfld_power_down(struct atomisp_device *isp)
static int atomisp_mrfld_power_down(struct atomisp_device *isp)
{
return atomisp_mrfld_power(isp, false);
}
/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
int atomisp_mrfld_power_up(struct atomisp_device *isp)
static int atomisp_mrfld_power_up(struct atomisp_device *isp)
{
return atomisp_mrfld_power(isp, true);
}