mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
media: qcom: iris: handle runtime PM resume failure in core deinit
Check the return value of pm_runtime_resume_and_get() in
iris_core_deinit().
If runtime PM resume fails, skip hardware power-off operations but
still perform software teardown and state transition. Also skip the
corresponding pm_runtime_put_sync() call to avoid unbalanced runtime
PM references.
Fixes: bb8a95aa03 ("media: iris: implement power management")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
This commit is contained in:
committed by
Bryan O'Donoghue
parent
14634f3161
commit
75d79879ec
@@ -12,18 +12,24 @@
|
||||
|
||||
void iris_core_deinit(struct iris_core *core)
|
||||
{
|
||||
pm_runtime_resume_and_get(core->dev);
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_resume_and_get(core->dev);
|
||||
|
||||
mutex_lock(&core->lock);
|
||||
if (core->state != IRIS_CORE_DEINIT) {
|
||||
iris_fw_unload(core);
|
||||
iris_vpu_power_off(core);
|
||||
|
||||
if (!ret)
|
||||
iris_vpu_power_off(core);
|
||||
|
||||
iris_hfi_queues_deinit(core);
|
||||
core->state = IRIS_CORE_DEINIT;
|
||||
}
|
||||
mutex_unlock(&core->lock);
|
||||
|
||||
pm_runtime_put_sync(core->dev);
|
||||
if (!ret)
|
||||
pm_runtime_put_sync(core->dev);
|
||||
}
|
||||
|
||||
static int iris_wait_for_system_response(struct iris_core *core)
|
||||
|
||||
Reference in New Issue
Block a user