[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220419110518.2574486-1-chi.minghao@zte.com.cn>
Date: Tue, 19 Apr 2022 11:05:18 +0000
From: cgel.zte@...il.com
To: l.stach@...gutronix.de
Cc: linux+etnaviv@...linux.org.uk, etnaviv@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] drm/etnaviv: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
From: Minghao Chi <chi.minghao@....com.cn>
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 37018bc55810..4ac009a1c4c0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1342,11 +1342,9 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)
int ret;
if (!submit->runtime_resumed) {
- ret = pm_runtime_get_sync(gpu->dev);
- if (ret < 0) {
- pm_runtime_put_noidle(gpu->dev);
+ ret = pm_runtime_resume_and_get(gpu->dev);
+ if (ret < 0)
return NULL;
- }
submit->runtime_resumed = true;
}
--
2.25.1
Powered by blists - more mailing lists