summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2023-11-20 16:38:49 -0800
committerRob Clark <robdclark@chromium.org>2023-12-10 10:23:14 -0800
commit3a48a40387e73e1a37428b11cb3ba56d4c108571 (patch)
treee451b1a415c8461f82a786a751e80ddb6ce9abb7
parent2d7d2c4e84802485a1e765bd0732d41526dcf25c (diff)
downloadlinux-3a48a40387e73e1a37428b11cb3ba56d4c108571.tar.gz
linux-3a48a40387e73e1a37428b11cb3ba56d4c108571.tar.bz2
linux-3a48a40387e73e1a37428b11cb3ba56d4c108571.zip
drm/msm/gem: Cleanup submit_cleanup_bo()
Now that it only handles unlock duty, drop the superfluous arg and rename it. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/568333/
-rw-r--r--drivers/gpu/drm/msm/msm_gem_submit.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index 208fad42f784..2bb5d13726d5 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -248,14 +248,10 @@ out:
return ret;
}
-/* Unwind bo state, according to cleanup_flags. In the success case, only
- * the lock is dropped at the end of the submit (and active/pin ref is dropped
- * later when the submit is retired).
- */
-static void submit_cleanup_bo(struct msm_gem_submit *submit, int i,
- unsigned cleanup_flags)
+static void submit_unlock_bo(struct msm_gem_submit *submit, int i)
{
struct drm_gem_object *obj = submit->bos[i].obj;
+ unsigned cleanup_flags = BO_LOCKED;
unsigned flags = submit->bos[i].flags & cleanup_flags;
/*
@@ -304,10 +300,10 @@ fail:
}
for (; i >= 0; i--)
- submit_cleanup_bo(submit, i, BO_LOCKED);
+ submit_unlock_bo(submit, i);
if (slow_locked > 0)
- submit_cleanup_bo(submit, slow_locked, BO_LOCKED);
+ submit_unlock_bo(submit, slow_locked);
if (ret == -EDEADLK) {
struct drm_gem_object *obj = submit->bos[contended].obj;
@@ -533,7 +529,6 @@ out:
*/
static void submit_cleanup(struct msm_gem_submit *submit, bool error)
{
- unsigned cleanup_flags = BO_LOCKED;
unsigned i;
if (error)
@@ -541,7 +536,7 @@ static void submit_cleanup(struct msm_gem_submit *submit, bool error)
for (i = 0; i < submit->nr_bos; i++) {
struct drm_gem_object *obj = submit->bos[i].obj;
- submit_cleanup_bo(submit, i, cleanup_flags);
+ submit_unlock_bo(submit, i);
if (error)
drm_gem_object_put(obj);
}