drm/xe: Capture GuC CT snapshot when stopped
authorMatthew Brost <matthew.brost@intel.com>
Fri, 5 Apr 2024 21:16:32 +0000 (14:16 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Mon, 8 Apr 2024 21:47:39 +0000 (14:47 -0700)
It is useful capture the GuC CT snapshot if the GuC CT has been
forcefully put into the stopped state. Enable snapshot capture when in
this state.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405211632.223568-3-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_guc_ct.c

index 6c37f4f9bddd45769766645cfb5a6f3cd669a521..0aa3abaca66d9d7eab230c58c6c14d1132b49c0d 100644 (file)
@@ -1403,7 +1403,7 @@ struct xe_guc_ct_snapshot *xe_guc_ct_snapshot_capture(struct xe_guc_ct *ct,
                return NULL;
        }
 
-       if (xe_guc_ct_enabled(ct)) {
+       if (xe_guc_ct_enabled(ct) || ct->state == XE_GUC_CT_STATE_STOPPED) {
                snapshot->ct_enabled = true;
                snapshot->g2h_outstanding = READ_ONCE(ct->g2h_outstanding);
                guc_ctb_snapshot_capture(xe, &ct->ctbs.h2g,