Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Subject: [PATCH] drm/xe: Skip TLB invalidation time out log if ct is disabled
Date: Tue, 20 Feb 2024 02:13:56 +0000	[thread overview]
Message-ID: <20240220021356.3514454-1-shuicheng.lin@intel.com> (raw)

Suspend may cause the TLB invalidation time out as below log.
Skip the log print if ct is disabled to make log clean.
"
[  228.812266] xe_gt_tlb_invalidation_wait enter
[  228.812311] xe_gt_suspend enter
[  228.812782] xe 0000:03:00.0: [drm] GT0: suspended
[  228.812786] xe_gt_suspend enter
[  228.813508] xe 0000:03:00.0: [drm] GT1: suspended
…
[  229.067007] xe 0000:03:00.0: [drm] *ERROR* TILE0 [GTT] GT0: TLB invalidation time'd out, seqno=321, recv=319
[  229.067099] xe 0000:03:00.0: [drm] *ERROR* GT0: CT disabled
"

Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index 7b3a54748b49..8aac12efea84 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -330,11 +330,18 @@ int xe_gt_tlb_invalidation_wait(struct xe_gt *gt, int seqno)
 	if (!ret) {
 		struct drm_printer p = xe_gt_err_printer(gt);
 
-		xe_tile_report_driver_error(gt_to_tile(gt), XE_TILE_DRV_ERR_GTT,
-					    "GT%u: TLB invalidation time'd out, seqno=%d, recv=%d",
-					    gt->info.id, seqno, gt->tlb_invalidation.seqno_recv);
-		xe_guc_ct_print(&guc->ct, &p, true);
-		return -ETIME;
+		/*
+		 * guc ct may be disabled during the waiting period and lead to the timeout.
+		 * Such as power suspend just after this tlb invalidation wait.
+		 * Skip the error log print if ct is disabled.
+		 */
+		if (xe_guc_ct_enabled(&guc->ct)) {
+			xe_tile_report_driver_error(gt_to_tile(gt), XE_TILE_DRV_ERR_GTT,
+						    "GT%u: TLB invalidation time'd out, seqno=%d, recv=%d",
+						    gt->info.id, seqno, gt->tlb_invalidation.seqno_recv);
+			xe_guc_ct_print(&guc->ct, &p, true);
+			return -ETIME;
+		}
 	}
 
 	return 0;
-- 
2.25.1


             reply	other threads:[~2024-02-20  2:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  2:13 Shuicheng Lin [this message]
2024-02-20  2:19 ` ✗ CI.Patch_applied: failure for drm/xe: Skip TLB invalidation time out log if ct is disabled Patchwork
2024-02-20 15:05 ` [PATCH] " Matthew Brost
2024-02-20 18:07   ` Matthew Auld
2024-02-20 18:35     ` Matthew Brost
2024-02-21  0:43       ` Lin, Shuicheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220021356.3514454-1-shuicheng.lin@intel.com \
    --to=shuicheng.lin@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox