From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH v2 2/2] drm/xe/vf: Perform early GT MMIO initialization to read GMDID
Date: Tue, 14 Jan 2025 22:13:47 +0100 [thread overview]
Message-ID: <20250114211347.1083-1-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20241114175955.2299-3-michal.wajdeczko@intel.com>
VFs need to communicate with the GuC to obtain the GMDID value
and existing GuC functions used for that assume that the GT has
it's MMIO members already setup. However, due to recent refactoring
the gt->mmio is initialized later, and any attempt by the VF to use
xe_mmio_read|write() from GuC functions will lead to NPD crash due
to unset MMIO register address:
[] xe 0000:00:02.1: [drm] Running in SR-IOV VF mode
[] xe 0000:00:02.1: [drm] GT0: sending H2G MMIO 0x5507
[] BUG: unable to handle page fault for address: 0000000000190240
Since we are already tweaking the id and type of the primary GT to
mimic it's a Media GT before initializing the GuC communication,
we can also call xe_gt_mmio_init() to perform early setup of the
gt->mmio which will make those GuC functions work again.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
---
v2: drop Fixes tags (Michal/Lucas)
---
drivers/gpu/drm/xe/xe_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 5d588b1dfe21..e6ad189294c1 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -506,6 +506,7 @@ static void read_gmdid(struct xe_device *xe, enum xe_gmdid_type type, u32 *ver,
gt->info.type = XE_GT_TYPE_MAIN;
}
+ xe_gt_mmio_init(gt);
xe_guc_comm_init_early(>->uc.guc);
/* Don't bother with GMDID if failed to negotiate the GuC ABI */
--
2.47.1
next prev parent reply other threads:[~2025-01-14 21:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 17:59 [PATCH 0/2] VF: Fix early read of GDMID Michal Wajdeczko
2024-11-14 17:59 ` [PATCH 1/2] drm/xe: Always setup GT MMIO adjustment data Michal Wajdeczko
2024-11-14 19:23 ` Lucas De Marchi
2024-11-14 19:36 ` Michal Wajdeczko
2024-11-19 20:33 ` Lucas De Marchi
2024-12-03 20:37 ` Matt Roper
2024-12-09 14:44 ` Lucas De Marchi
2025-01-14 16:32 ` Lucas De Marchi
2024-11-14 17:59 ` [PATCH 2/2] drm/xe/vf: Perform early GT MMIO initialization to read GMDID Michal Wajdeczko
2024-12-02 18:38 ` Piotr Piórkowski
2025-01-14 21:13 ` Michal Wajdeczko [this message]
2024-11-14 19:41 ` ✓ CI.Patch_applied: success for VF: Fix early read of GDMID Patchwork
2024-11-14 19:41 ` ✓ CI.checkpatch: " Patchwork
2024-11-14 19:42 ` ✓ CI.KUnit: " Patchwork
2024-11-14 19:54 ` ✓ CI.Build: " Patchwork
2024-11-14 19:56 ` ✓ CI.Hooks: " Patchwork
2024-11-14 19:58 ` ✓ CI.checksparse: " Patchwork
2024-11-14 20:23 ` ✓ CI.BAT: " Patchwork
2024-11-15 15:07 ` ✗ CI.FULL: failure " Patchwork
2025-01-14 20:40 ` Michal Wajdeczko
2025-01-15 0:48 ` ✓ CI.Patch_applied: success for VF: Fix early read of GDMID (rev2) Patchwork
2025-01-15 0:48 ` ✓ CI.checkpatch: " Patchwork
2025-01-15 0:49 ` ✓ CI.KUnit: " Patchwork
2025-01-15 1:08 ` ✓ CI.Build: " Patchwork
2025-01-15 1:10 ` ✓ CI.Hooks: " Patchwork
2025-01-15 1:11 ` ✓ CI.checksparse: " Patchwork
2025-01-15 1:38 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-15 11:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-18 20:57 ` Michal Wajdeczko
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=20250114211347.1083-1-michal.wajdeczko@intel.com \
--to=michal.wajdeczko@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