summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-11-01 17:40:50 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-09 10:40:59 +0100
commitb954af359f5dab5d7e7fba062889e011248d867d (patch)
treee367f25a80733c07cb69fad9c1cf98695d87e29d /drivers/media
parent92b1d2a7a110a461905cf94a16171bfe7e9db435 (diff)
downloadlinux-b954af359f5dab5d7e7fba062889e011248d867d.tar.gz
linux-b954af359f5dab5d7e7fba062889e011248d867d.tar.bz2
linux-b954af359f5dab5d7e7fba062889e011248d867d.zip
media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled
commit 2a20869f7d798aa2b69e45b863eaf1b1ecf98278 upstream. It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Cc: stable@vger.kernel.org Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/qcom/venus/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 84e95a46dfc9..cabcf710c046 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -412,8 +412,8 @@ err_of_depopulate:
of_platform_depopulate(dev);
err_runtime_disable:
pm_runtime_put_noidle(dev);
- pm_runtime_set_suspended(dev);
pm_runtime_disable(dev);
+ pm_runtime_set_suspended(dev);
hfi_destroy(core);
err_core_deinit:
hfi_core_deinit(core, false);