Skip to content

Commit 7a1f30a

Browse files
committed
drm/panthor: Don't declare a queue blocked if deferred operations are pending
If deferred operations are pending, we want to wait for those to land before declaring the queue blocked on a SYNC_WAIT. We need this to deal with the case where the sync object is signalled through a deferred SYNC_{ADD,SET} from the same queue. If we don't do that and the group gets scheduled out before the deferred SYNC_{SET,ADD} is executed, we'll end up with a timeout, because no external SYNC_{SET,ADD} will make the scheduler reconsider the group for execution. Fixes: de85488 ("drm/panthor: Add the scheduler logical block") Cc: <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 282864c commit 7a1f30a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/gpu/drm/panthor/panthor_sched.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,13 @@ cs_slot_sync_queue_state_locked(struct panthor_device *ptdev, u32 csg_id, u32 cs
11031103
list_move_tail(&group->wait_node,
11041104
&group->ptdev->scheduler->groups.waiting);
11051105
}
1106-
group->blocked_queues |= BIT(cs_id);
1106+
1107+
/* The queue is only blocked if there's no deferred operation
1108+
* pending, which can be checked through the scoreboard status.
1109+
*/
1110+
if (!cs_iface->output->status_scoreboards)
1111+
group->blocked_queues |= BIT(cs_id);
1112+
11071113
queue->syncwait.gpu_va = cs_iface->output->status_wait_sync_ptr;
11081114
queue->syncwait.ref = cs_iface->output->status_wait_sync_value;
11091115
status_wait_cond = cs_iface->output->status_wait & CS_STATUS_WAIT_SYNC_COND_MASK;

0 commit comments

Comments
 (0)