goto exit;
mutex_lock(&core->lock);
- pm_runtime_get_sync(core->dev);
+ pm_runtime_resume_and_get(core->dev);
if (core->state == VPU_CORE_DEINIT) {
ret = vpu_core_boot(core, true);
vpu_iface_set_log_buf(core, &core->log);
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret) {
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
int ret;
vpu_core_remove_dbgfs_file(core);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
WARN_ON(ret < 0);
vpu_core_shutdown(core);
int ret = 0;
mutex_lock(&core->lock);
- pm_runtime_get_sync(dev);
+ pm_runtime_resume_and_get(dev);
vpu_core_get_vpu(core);
if (core->state != VPU_CORE_SNAPSHOT)
goto exit;
struct seq_file *s = file->private_data;
struct vpu_core *core = s->private;
- pm_runtime_get_sync(core->dev);
+ pm_runtime_resume_and_get(core->dev);
mutex_lock(&core->lock);
if (core->state != VPU_CORE_DEINIT && !core->instance_mask) {
dev_info(core->dev, "reset\n");
return -ENODEV;
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
- if (ret)
- goto err_runtime_disable;
-
- pm_runtime_put_sync(dev);
ret = v4l2_device_register(dev, &vpu->v4l2_dev);
if (ret)
vpu_remove_func(&vpu->decoder);
v4l2_device_unregister(&vpu->v4l2_dev);
err_vpu_deinit:
-err_runtime_disable:
pm_runtime_set_suspended(dev);
pm_runtime_disable(dev);