]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/panthor: Interrupt group start/resumption if group_bind_locked() fails
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 25 Jun 2026 12:40:36 +0000 (14:40 +0200)
committerLiviu Dudau <liviu.dudau@arm.com>
Tue, 30 Jun 2026 14:26:55 +0000 (15:26 +0100)
group_bind_locked() can fail if the MMU block is stuck. This is normally
a reset situation, but by the time we reset the GPU, we might have
tried to resume a group that's not resident, which will probably trip
out the FW. So let's avoid that by bailing out when group_bind_locked()
returns an error. We don't even try to start more groups because the
GPU will be reset anyway.

Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260623-panthor-signal-from-irq-v3-0-2ece396f8ee0@collabora.com?part=7
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260625-panthor-misc-fixes-v1-10-b67ed973fea6@collabora.com
drivers/gpu/drm/panthor/panthor_sched.c

index 5fe95d03f23eff26905be2e888982d0f8916bd69..298b046c95edb8184f2a22c8ec0b7b8f52fcb489 100644 (file)
@@ -2368,7 +2368,13 @@ tick_ctx_apply(struct panthor_scheduler *sched, struct panthor_sched_tick_ctx *c
 
                        csg_iface = panthor_fw_get_csg_iface(ptdev, csg_id);
                        csg_slot = &sched->csg_slots[csg_id];
-                       group_bind_locked(group, csg_id);
+                       ret = group_bind_locked(group, csg_id);
+                       if (ret) {
+                               panthor_device_schedule_reset(ptdev);
+                               ctx->csg_upd_failed_mask |= BIT(csg_id);
+                               return;
+                       }
+
                        csg_slot_prog_locked(ptdev, csg_id, new_csg_prio--);
                        csgs_upd_ctx_queue_reqs(ptdev, &upd_ctx, csg_id,
                                                group->state == PANTHOR_CS_GROUP_SUSPENDED ?