[PATCH v1 27/27] drm/panthor: Release GPU access immediately for out-of-band grants
From: Karunika Choo
Date: Tue Sep 22 2026 - 16:57:55 EST
A late grant can arrive after the request has timed out and the access
window has returned to READY. Report GPU_STOPPED so the arbiter can
release the unused grant.
Signed-off-by: Karunika Choo <karunika.choo@xxxxxxx>
---
drivers/gpu/drm/panthor/panthor_aw.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panthor/panthor_aw.c b/drivers/gpu/drm/panthor/panthor_aw.c
index 7ef13db4acf50..27787c0b2f3a2 100644
--- a/drivers/gpu/drm/panthor/panthor_aw.c
+++ b/drivers/gpu/drm/panthor/panthor_aw.c
@@ -282,8 +282,13 @@ static void panthor_aw_handle_window_opened(struct panthor_aw *aw)
return;
/* Window opened due to GPU_REQUEST */
- panthor_aw_state_try_set(aw, PANTHOR_AW_STATE_GPU_REQUEST,
- PANTHOR_AW_STATE_GPU_GRANTED);
+ if (panthor_aw_state_try_set(aw, PANTHOR_AW_STATE_GPU_REQUEST,
+ PANTHOR_AW_STATE_GPU_GRANTED))
+ return;
+
+ if (panthor_aw_state_try_set(aw, PANTHOR_AW_STATE_READY,
+ PANTHOR_AW_STATE_STOPPED_IDLE))
+ panthor_aw_send_msg(aw, VM_ARB_GPU_STOPPED);
}
static irqreturn_t panthor_aw_irq_raw_hander(int irq, void *data)
--
2.43.0