Skip to content

Commit 4ecdcf9

Browse files
committed
drm/xe/guc: Move state change logger to helper
In the state change helper we are already doing extra stuff, move debug state logger there to cover all state changes. Signed-off-by: Michal Wajdeczko <[email protected]> Cc: Matthew Brost <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Acked-by: Matthew Brost <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1b822b7 commit 4ecdcf9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/gpu/drm/xe/xe_guc_ct.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ static int guc_ct_control_toggle(struct xe_guc_ct *ct, bool enable)
387387
static void guc_ct_change_state(struct xe_guc_ct *ct,
388388
enum xe_guc_ct_state state)
389389
{
390+
struct xe_gt *gt = ct_to_gt(ct);
391+
390392
mutex_lock(&ct->lock); /* Serialise dequeue_one_g2h() */
391393
spin_lock_irq(&ct->fast_lock); /* Serialise CT fast-path */
392394

@@ -398,6 +400,10 @@ static void guc_ct_change_state(struct xe_guc_ct *ct,
398400
ct->g2h_outstanding = 0;
399401
ct->state = state;
400402

403+
xe_gt_dbg(gt, "GuC CT communication channel %s\n",
404+
state == XE_GUC_CT_STATE_STOPPED ? "stopped" :
405+
str_enabled_disabled(state == XE_GUC_CT_STATE_ENABLED));
406+
401407
spin_unlock_irq(&ct->fast_lock);
402408

403409
/*
@@ -473,7 +479,6 @@ int xe_guc_ct_enable(struct xe_guc_ct *ct)
473479

474480
smp_mb();
475481
wake_up_all(&ct->wq);
476-
xe_gt_dbg(gt, "GuC CT communication channel enabled\n");
477482

478483
if (ct_needs_safe_mode(ct))
479484
ct_enter_safe_mode(ct);

0 commit comments

Comments
 (0)