intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
	Francois Dugast <francois.dugast@intel.com>
Subject: [PATCH 1/2] drm/xe: Coalesce pagefault logging
Date: Fri,  7 Nov 2025 10:10:24 -0800	[thread overview]
Message-ID: <20251107-pagefault-prefetch-v1-1-93291d619126@intel.com> (raw)
In-Reply-To: <20251107-pagefault-prefetch-v1-0-93291d619126@intel.com>

The page fault is only ever printed on when the fault handling fails.
Use a single dbg with the fault response status and its details.

Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_pagefault.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
index fe3e401450129..68bcc25f27890 100644
--- a/drivers/gpu/drm/xe/xe_pagefault.c
+++ b/drivers/gpu/drm/xe/xe_pagefault.c
@@ -222,15 +222,17 @@ static bool xe_pagefault_queue_pop(struct xe_pagefault_queue *pf_queue,
 	return found_fault;
 }
 
-static void xe_pagefault_print(struct xe_pagefault *pf)
+static void xe_pagefault_print(struct xe_pagefault *pf, int err)
 {
-	xe_gt_dbg(pf->gt, "\n\tASID: %d\n"
+	xe_gt_dbg(pf->gt, "\nFault response: Unsuccessful %pe\n"
+		  "\tASID: %d\n"
 		  "\tFaulted Address: 0x%08x%08x\n"
 		  "\tFaultType: %d\n"
 		  "\tAccessType: %d\n"
 		  "\tFaultLevel: %d\n"
 		  "\tEngineClass: %d %s\n"
 		  "\tEngineInstance: %d\n",
+		  ERR_PTR(err),
 		  pf->consumer.asid,
 		  upper_32_bits(pf->consumer.page_addr),
 		  lower_32_bits(pf->consumer.page_addr),
@@ -259,11 +261,8 @@ static void xe_pagefault_queue_work(struct work_struct *w)
 			continue;
 
 		err = xe_pagefault_service(&pf);
-		if (err) {
-			xe_pagefault_print(&pf);
-			xe_gt_dbg(pf.gt, "Fault response: Unsuccessful %pe\n",
-				  ERR_PTR(err));
-		}
+		if (err)
+			xe_pagefault_print(&pf, err);
 
 		pf.producer.ops->ack_fault(&pf, err);
 

-- 
2.51.2


  reply	other threads:[~2025-11-07 18:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 18:10 [PATCH 0/2] drm/xe/xe3p: Add page fault prefetch bit handling Lucas De Marchi
2025-11-07 18:10 ` Lucas De Marchi [this message]
2025-11-10 23:47   ` [PATCH 1/2] drm/xe: Coalesce pagefault logging Summers, Stuart
2025-11-07 18:10 ` [PATCH 2/2] drm/xe/xe3p: Add support for prefetch page fault Lucas De Marchi
2025-11-07 18:51   ` Matt Roper
2025-11-07 19:16     ` Lucas De Marchi
2025-11-11  0:03   ` Summers, Stuart
2025-11-07 18:18 ` ✓ CI.KUnit: success for drm/xe/xe3p: Add page fault prefetch bit handling Patchwork
2025-11-07 19:17 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-09  3:01 ` ✗ Xe.CI.Full: failure " Patchwork

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=20251107-pagefault-prefetch-v1-1-93291d619126@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=francois.dugast@intel.com \
    --cc=gwan-gyeong.mun@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).