From: "Murthy, Arun R" <arun.r.murthy@intel.com>
To: "Jadav, Raag" <raag.jadav@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Wajdeczko, Michal" <michal.wajdeczko@intel.com>,
"Roper, Matthew D" <matthew.d.roper@intel.com>,
"Nilawar, Badal" <badal.nilawar@intel.com>
Subject: RE: [PATCHv2] drm/xe: Check for dead config space on reading all 1s
Date: Wed, 20 May 2026 03:52:12 +0000 [thread overview]
Message-ID: <IA0PR11MB730703D8856CF6930EC729BABA012@IA0PR11MB7307.namprd11.prod.outlook.com> (raw)
In-Reply-To: <agxkkgXMMpLtELLN@black.igk.intel.com>
> -----Original Message-----
> From: Jadav, Raag <raag.jadav@intel.com>
> Sent: Tuesday, May 19, 2026 6:55 PM
> To: Murthy, Arun R <arun.r.murthy@intel.com>
> Cc: intel-xe@lists.freedesktop.org; Wajdeczko, Michal
> <michal.wajdeczko@intel.com>; Roper, Matthew D
> <matthew.d.roper@intel.com>; Nilawar, Badal <badal.nilawar@intel.com>
> Subject: Re: [PATCHv2] drm/xe: Check for dead config space on reading all 1s
>
> Cc: Badal
>
> On Tue, May 19, 2026 at 09:01:04AM +0530, Arun R Murthy wrote:
> > After ioremap the BAR mapped address is read once as a sanity check
> > and if found to be all 1s then return avoiding the driver
> > initialization of a dead device.
> >
> > v2: Move the sanity check to mmio_probe_early() - Michal
> >
> > 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_mmio.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_mmio.c
> > b/drivers/gpu/drm/xe/xe_mmio.c index 78adb303b663..d206e3720eed
> 100644
> > --- a/drivers/gpu/drm/xe/xe_mmio.c
> > +++ b/drivers/gpu/drm/xe/xe_mmio.c
> > @@ -90,6 +90,7 @@ int xe_mmio_probe_early(struct xe_device *xe) {
> > struct xe_tile *root_tile = xe_device_get_root_tile(xe);
> > struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> > + u32 sanity = 0;
> >
> > /*
> > * Map the entire BAR.
> > @@ -103,6 +104,21 @@ int xe_mmio_probe_early(struct xe_device *xe)
> > return -EIO;
> > }
> >
> > + /*
> > + * If the parent PCIe bridge failed to leave D3cold, or the device
>
> So shouldn't this also be in PM path?
>
There exists one such check in xe_force_wake.c in function __domain_wait. This is check for corrupt space during probe itself.
Thanks and Regards,
Arun R Murthy
-------------------
> Raag
>
> > + * fell off the bus, MMIO reads return all-ones. Detect that here
> > + * before any other subsystem (SR-IOV, GuC, pcode...) consumes a
> > + * bogus 0xFFFFFFFF.
> > + */
> > + sanity = readl(xe->mmio.regs);
> > + if (sanity == U32_MAX && !pci_device_is_present(pdev)) {
> > + drm_err(&xe->drm,
> > + "MMIO reads all 1s and device not present; aborting
> probe\n");
> > + pci_iounmap(pdev, xe->mmio.regs);
> > + xe->mmio.regs = NULL;
> > + return -ENODEV;
> > + }
> > +
> > /* Setup first tile; other tiles (if present) will be setup later. */
> > xe_mmio_init(&root_tile->mmio, root_tile, xe->mmio.regs, SZ_4M);
> >
> > --
> > 2.25.1
> >
next prev parent reply other threads:[~2026-05-20 3:52 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 [this message]
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 ` [PATCHv3] drm/xe: Check for dead config space Arun R Murthy
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=IA0PR11MB730703D8856CF6930EC729BABA012@IA0PR11MB7307.namprd11.prod.outlook.com \
--to=arun.r.murthy@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@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).