aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brost <[email protected]>2024-06-13 23:13:43 -0700
committerMatthew Brost <[email protected]>2024-06-20 15:33:14 -0700
commit0d39640ace670bccb7f03b2a9e5463ec0885a9ca (patch)
tree0c28c1a284fb557928d28622b8eb70d378288a57
parent2b79878b0784ba7253ad9b8dee66495b288272c9 (diff)
drm/xe: Invert runnable_state / pending enable check and assert
Rather than checking for pending enable and asserting runnable_state == 1 in sched done handler, invert these. This is more robust code taking action based on the G2H message and asserting KMD tracking state is correct. Suggested-by: John Harrison <[email protected]> Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/xe/xe_guc_submit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 74552391dc5a..373447758a60 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1782,8 +1782,8 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
{
trace_xe_exec_queue_scheduling_done(q);
- if (exec_queue_pending_enable(q)) {
- xe_gt_assert(guc_to_gt(guc), runnable_state == 1);
+ if (runnable_state == 1) {
+ xe_gt_assert(guc_to_gt(guc), exec_queue_pending_enable(q));
q->guc->resume_time = ktime_get();
clear_exec_queue_pending_enable(q);