mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-03-01 03:21:21 +00:00
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 569efb24817177301f4789a8b45df8d389df97a7 Mon Sep 17 00:00:00 2001
|
|
From: Qinglang Miao <miaoqinglang@huawei.com>
|
|
Date: Sat, 28 Nov 2020 16:10:04 +0000
|
|
Subject: [PATCH 29/88] FROMLIST(v1): drm/panfrost: fix reference leak in
|
|
panfrost_job_hw_submit
|
|
|
|
pm_runtime_get_sync will increment pm usage counter even it
|
|
failed. Forgetting to putting operation will result in a
|
|
reference leak here.
|
|
|
|
A new function pm_runtime_resume_and_get is introduced in
|
|
[0] to keep usage counter balanced. So We fix the reference
|
|
leak by replacing it with new funtion.
|
|
|
|
[0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
|
|
|
|
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
|
|
Reported-by: Hulk Robot <hulkci@huawei.com>
|
|
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
|
|
---
|
|
drivers/gpu/drm/panfrost/panfrost_job.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
|
|
index 04e6f6f9b742..d6d5c15184f9 100644
|
|
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
|
|
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
|
|
@@ -157,7 +157,7 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js)
|
|
|
|
panfrost_devfreq_record_busy(&pfdev->pfdevfreq);
|
|
|
|
- ret = pm_runtime_get_sync(pfdev->dev);
|
|
+ ret = pm_runtime_resume_and_get(pfdev->dev);
|
|
if (ret < 0)
|
|
return;
|
|
|
|
--
|
|
2.17.1
|
|
|