aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2024-10-29 16:29:10 +0100
committerBoris Brezillon <boris.brezillon@collabora.com>2024-10-30 16:37:09 +0100
commit412a2a8fdd4eb89b263623c7a59b77dbfcf8f215 (patch)
tree96fce260a0480239f28b74a1ec5fcfe49bac4e7d /drivers
parent5d01b56f0518d80211812420a8907ca0b6c6e4e3 (diff)
drm/panthor: Fail job creation when the group is dead
Userspace can use GROUP_SUBMIT errors as a trigger to check the group state and recreate the group if it became unusable. Make sure we report an error when the group became unusable. Changes in v3: - None Changes in v2: - Add R-bs Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029152912.270346-2-boris.brezillon@collabora.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/panthor/panthor_sched.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index aee362abb710..05119d9bb279 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -3409,6 +3409,11 @@ panthor_job_create(struct panthor_file *pfile,
goto err_put_job;
}
+ if (!group_can_run(job->group)) {
+ ret = -EINVAL;
+ goto err_put_job;
+ }
+
if (job->queue_idx >= job->group->queue_count ||
!job->group->queues[job->queue_idx]) {
ret = -EINVAL;