summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2023-11-20 16:38:47 -0800
committerRob Clark <robdclark@chromium.org>2023-12-10 10:23:13 -0800
commitceab575cafed594fb3cee1bec01a0e4ed5e2d752 (patch)
tree6719d560e1b8a0e3f7a6ad780c91781c9fed5893
parent202f98c19a11e335867a1906c2fb6c53680e4603 (diff)
downloadlinux-ceab575cafed594fb3cee1bec01a0e4ed5e2d752.tar.gz
linux-ceab575cafed594fb3cee1bec01a0e4ed5e2d752.tar.bz2
linux-ceab575cafed594fb3cee1bec01a0e4ed5e2d752.zip
drm/msm/gem: Don't queue job to sched in error cases
We shouldn't be running the job in error cases. This also avoids having to think too hard about where the objs get unpinned (and if necessary, the resv takes over tracking that the obj is busy).. ie. error cases it always happens synchronously, and normal cases it happens from scheduler job_run() callback. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/568331/
-rw-r--r--drivers/gpu/drm/msm/msm_gem_submit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index 51726c9ddffd..0bcdc589ceea 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -946,6 +946,9 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
}
}
+ if (ret)
+ goto out;
+
submit_attach_object_fences(submit);
/* The scheduler owns a ref now: */