From: Arun R Murthy <arun.r.murthy@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, raag.jadav@intel.com,
Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCHv3] drm/xe: Check for dead config space
Date: Mon, 6 Jul 2026 10:11:12 +0530 [thread overview]
Message-ID: <20260706044112.3225462-1-arun.r.murthy@intel.com> (raw)
In-Reply-To: <20260519033104.480503-1-arun.r.murthy@intel.com>
If the device or its upstream bridge has failed to come out of D3cold
config/MMIO reads on it return all-1s. Once MMIO is mapped (after
xe_device_probe_early()), probe the GMD_ID register; an all-ones read
indicates the device is not accessible, so bail out of probe early to
avoid consuming bogus 0xFFFFFFFF values later in xe init paths.
v2: Move the sanity check to mmio_probe_early() - Michal
v3: Move the sanity check to pci_probe to handle much early - Matt
Use GMD_ID read for the accessibility check - Matt
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7941
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/xe/xe_pci.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 08c14a0202d9..80f30b970871 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -1199,6 +1199,17 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
return err;
+ /*
+ * MMIO is now mapped. Probe GMD_ID to make sure the device is
+ * actually accessible; an all-1s read indicates the device (or its
+ * upstream bridge) is dead (e.g. failed D3cold resume). Bail out
+ * with a clear error instead of consuming bogus values later.
+ */
+ if (xe_mmio_read32(xe_root_tile_mmio(xe), GMD_ID) == U32_MAX) {
+ dev_err(&pdev->dev, "Device not accessible (dead config/MMIO); aborting probe\n");
+ return -ENODEV;
+ }
+
err = xe_probe_info(xe, desc, &probed_info);
if (err)
return err;
--
2.25.1
next prev parent reply other threads:[~2026-07-06 4:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 6:01 [PATCH] drm/xe: Check for dead config space on reading all 1s Arun R Murthy
2026-05-12 11:12 ` ✓ CI.KUnit: success for " Patchwork
2026-05-12 11:55 ` [PATCH] " Michal Wajdeczko
2026-05-12 12:32 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-05-12 22:28 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-19 3:31 ` [PATCHv2] " Arun R Murthy
2026-05-19 13:24 ` Raag Jadav
2026-05-20 3:52 ` Murthy, Arun R
2026-05-19 20:26 ` Matt Roper
2026-05-20 4:42 ` Murthy, Arun R
2026-05-20 18:07 ` Matt Roper
2026-05-21 4:05 ` Murthy, Arun R
2026-07-06 4:41 ` Arun R Murthy [this message]
2026-05-19 3:39 ` ✓ CI.KUnit: success for drm/xe: Check for dead config space on reading all 1s (rev2) Patchwork
2026-05-19 4:21 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-19 13:10 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-06 4:49 ` ✓ CI.KUnit: success for drm/xe: Check for dead config space on reading all 1s (rev3) Patchwork
2026-07-06 5:31 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-07-06 7:19 ` ✓ Xe.CI.FULL: success " 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=20260706044112.3225462-1-arun.r.murthy@intel.com \
--to=arun.r.murthy@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=raag.jadav@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 read-only IMAP folder(s) and NNTP newsgroup(s).