summaryrefslogtreecommitdiff
path: root/drivers
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-14 19:54:12 +0100
commitbbbc4f745902ed0aa320db47a110a81753a056bb (patch)
treef276105cef5e05ce45310872e12592de9159644f /drivers
parentc72d1cd2bef4943f7fc30b07ef8928de6cc2a26f (diff)
downloadlinux-bbbc4f745902ed0aa320db47a110a81753a056bb.tar.gz
linux-bbbc4f745902ed0aa320db47a110a81753a056bb.tar.bz2
linux-bbbc4f745902ed0aa320db47a110a81753a056bb.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')
-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 6f7ce4f53c90..46277a9be05a 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -405,8 +405,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);