From: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: himal.prasad.ghimiray@intel.com,
Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
Subject: [PATCH v2 4/7] drm/xe: dump GAM page fault report registers in devcoredump
Date: Tue, 25 Aug 2026 00:13:53 +0530 [thread overview]
Message-ID: <20260824184356.1960708-5-naresh.kumar.g@intel.com> (raw)
In-Reply-To: <20260824184356.1960708-1-naresh.kumar.g@intel.com>
Add PAGE_FLTRPTQ_HEAD_GAMCTRL and PAGE_FLTRPTQ_TAIL_GAMCTRL to the Xe
register definitions and capture them as part of the devcoredump
snapshot.
Include the register dump in the devcoredump output and release the
snapshot during cleanup so page fault report state is available for
post-mortem debugging.
v2:
- As design change made for previous patches. refactored this patch
as well to accommodate those changes.
- Add PF occurred print when the two register values are not equal
Signed-off-by: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
---
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 3 ++
drivers/gpu/drm/xe/xe_devcoredump.c | 39 +++++++++++++++++++++++
drivers/gpu/drm/xe/xe_devcoredump_types.h | 3 ++
3 files changed, 45 insertions(+)
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 19f0a65cc3d2..05542f20c7b5 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -501,6 +501,9 @@
#define LMEM_EN REG_BIT(31)
#define LMTT_DIR_PTR REG_GENMASK(30, 0) /* in multiples of 64KB */
+#define PAGE_FLTRPTQ_HEAD_GAMCTRL XE_REG(0xcf90)
+#define PAGE_FLTRPTQ_TAIL_GAMCTRL XE_REG(0xcf94)
+
#define HALF_SLICE_CHICKEN5 XE_REG_MCR(0xe188, XE_REG_OPTION_MASKED)
#define DISABLE_SAMPLE_G_PERFORMANCE REG_BIT(0)
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index 62b1158b89a5..37893d09d05e 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -127,6 +127,11 @@ static const struct xe_reg_desc xe3p_media_gt_rpm_reglist[] = {
XE_REG_DESC(RPM_GCD, "RPM_GCD"),
};
+static const struct xe_reg_desc xe3p_gam_pf_reglist[] = {
+ XE_REG_DESC(PAGE_FLTRPTQ_HEAD_GAMCTRL, "PAGE_FLTRPTQ_HEAD_GAMCTRL"),
+ XE_REG_DESC(PAGE_FLTRPTQ_TAIL_GAMCTRL, "PAGE_FLTRPTQ_TAIL_GAMCTRL"),
+};
+
/**
* struct xe_reg_desc_list - Struct for register descriptor list
*
@@ -183,6 +188,13 @@ static const struct xe_gt_regset xe_guc_regset = {
},
};
+static const struct xe_gt_regset xe_gam_pf_regset = {
+ .gt[XE_GT_TYPE_MAIN] = {
+ .regs = xe3p_gam_pf_reglist,
+ .num_regs = ARRAY_SIZE(xe3p_gam_pf_reglist),
+ },
+};
+
#define XE_GT_REG_LIST(_type, _gt_type) \
(&xe_##_type##_regset.gt[XE_GT_TYPE_##_gt_type])
@@ -256,6 +268,16 @@ static void xe_gt_rpm_snapshot_print(struct drm_printer *p,
drm_puts(p, "render is not awake\n");
}
+static void xe_gam_pf_snapshot_print(struct drm_printer *p,
+ const struct xe_dbg_reg_snapshot *snap)
+{
+ xe_dbg_reg_snapshot_print(p, snap);
+
+ if (snap && snap->num_regs >= 2 &&
+ snap->regs[0].value != snap->regs[1].value)
+ drm_printf(p, "PF occurred, refer to dmesg log for PF info\n");
+}
+
static struct xe_dbg_reg_snapshot *
xe_dbg_reg_snapshot_capture_target(struct xe_gt *fault_gt,
struct xe_gt *target_gt,
@@ -341,6 +363,16 @@ xe_media_gt_guc_reg_snapshot_capture(struct xe_gt *gt)
XE_GT_REG_LIST(guc, MEDIA));
}
+static struct xe_dbg_reg_snapshot *xe_gam_pf_report_capture(struct xe_gt *gt)
+{
+ if (!gt || !gt->tile || !gt->tile->primary_gt)
+ return NULL;
+
+ return xe_dbg_reg_snapshot_capture_target(gt,
+ gt->tile->primary_gt,
+ XE_GT_REG_LIST(gam_pf, MAIN));
+}
+
static struct xe_device *coredump_to_xe(const struct xe_devcoredump *coredump)
{
return container_of(coredump, struct xe_device, devcoredump);
@@ -405,6 +437,9 @@ static ssize_t __xe_devcoredump_read(char *buffer, ssize_t count,
drm_puts(&p, "\n**** GuC CT ****\n");
xe_guc_ct_snapshot_print(ss->guc.ct, &p);
+ drm_printf(&p, "\n**** GAM PF Report ****\n");
+ xe_gam_pf_snapshot_print(&p, ss->gam_pf_report);
+
drm_puts(&p, "\n**** Contexts ****\n");
xe_guc_exec_queue_snapshot_print(ss->ge, &p);
@@ -457,6 +492,9 @@ static void xe_devcoredump_snapshot_free(struct xe_devcoredump_snapshot *ss)
xe_guc_capture_put_matched_nodes(&ss->gt->uc.guc);
ss->matched_node = NULL;
+ xe_dbg_reg_snapshot_free(ss->gam_pf_report);
+ ss->gam_pf_report = NULL;
+
xe_guc_exec_queue_snapshot_free(ss->ge);
ss->ge = NULL;
@@ -663,6 +701,7 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump,
ss->guc.log = xe_guc_log_snapshot_capture(&guc->log, true);
ss->guc.ct = xe_guc_ct_snapshot_capture(&guc->ct);
+ ss->gam_pf_report = xe_gam_pf_report_capture(q->gt);
ss->ge = xe_guc_exec_queue_snapshot_capture(q);
if (job)
ss->job = xe_sched_job_snapshot_capture(job);
diff --git a/drivers/gpu/drm/xe/xe_devcoredump_types.h b/drivers/gpu/drm/xe/xe_devcoredump_types.h
index 4671e00558db..ea7638d0a7a2 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump_types.h
+++ b/drivers/gpu/drm/xe/xe_devcoredump_types.h
@@ -90,6 +90,9 @@ struct xe_devcoredump_snapshot {
struct xe_guc_log_snapshot *log;
} guc;
+ /** @gam_pf_report: GAM PF report snapshot */
+ struct xe_dbg_reg_snapshot *gam_pf_report;
+
/** @ge: GuC Submission Engine snapshot */
struct xe_guc_submit_exec_queue_snapshot *ge;
--
2.43.0
next prev parent reply other threads:[~2026-08-24 18:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 18:43 [PATCH v2 0/7] drm/xe: Capture additional HW register state in devcoredump Nareshkumar Gollakoti
2026-08-24 18:43 ` [PATCH v2 1/7] drm/xe/devcoredump: Capture GT fuse registers " Nareshkumar Gollakoti
2026-08-24 18:57 ` sashiko-bot
2026-08-24 18:43 ` [PATCH v2 2/7] drm/xe/devcoredump: Add GuC register snapshot to devcoredump Nareshkumar Gollakoti
2026-08-24 18:43 ` [PATCH v2 3/7] drm/xe/guc: Print register addresses in capture snapshot output Nareshkumar Gollakoti
2026-08-24 19:11 ` sashiko-bot
2026-08-24 18:43 ` Nareshkumar Gollakoti [this message]
2026-08-24 18:43 ` [PATCH v2 5/7] drm/xe/guc: add TDL, SLICE gfx registers to capture list Nareshkumar Gollakoti
2026-08-24 18:43 ` [PATCH v2 6/7] drm/xe: capture L3 node status registers in devcoredump Nareshkumar Gollakoti
2026-08-24 18:43 ` [PATCH v2 7/7] drm/xe/guc: capture additional engine state registers Nareshkumar Gollakoti
2026-08-24 19:35 ` sashiko-bot
2026-08-24 23:50 ` ✓ CI.KUnit: success for drm/xe: Capture additional HW register state in devcoredump (rev2) Patchwork
2026-08-25 0:40 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-25 5:10 ` ✗ 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=20260824184356.1960708-5-naresh.kumar.g@intel.com \
--to=naresh.kumar.g@intel.com \
--cc=himal.prasad.ghimiray@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