Skip to content

Commit

Permalink
drm/panthor: Fail job creation when the group is dead
Browse files Browse the repository at this point in the history
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: de85488 ("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
  • Loading branch information
Boris Brezillon committed Oct 30, 2024
1 parent 5d01b56 commit 412a2a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/panthor/panthor_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 412a2a8

Please sign in to comment.