From: Stuart Summers <stuart.summers@intel.com>
Cc: rodrigo.vivi@intel.com, riana.tauro@intel.com,
anoop.c.vijay@intel.com, matthew.d.roper@intel.com,
fei.yang@intel.com, intel-xe@lists.freedesktop.org,
Stuart Summers <stuart.summers@intel.com>
Subject: [PATCH 14/17] drm/xe: Require a fully visible VRAM BAR without a primary GT
Date: Sat, 21 Nov 2026 18:23:30 +0000 [thread overview]
Message-ID: <20261121182317.48981-33-stuart.summers@intel.com> (raw)
In-Reply-To: <20261121182317.48981-19-stuart.summers@intel.com>
CPU copies can only reach VRAM that the BAR maps: xe_ttm_io_mem_reserve()
rejects any resource that is not entirely CPU visible. With no primary
GT there is no copy engine to fall back on, so a small BAR would leave
most of VRAM unreachable.
Refuse to probe such a device rather than fail later on the first move.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
drivers/gpu/drm/xe/xe_vram.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index 1c02889ba29b..4d399a83479e 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -23,6 +23,7 @@
#include "xe_mmio.h"
#include "xe_sriov.h"
#include "xe_tile.h"
+#include "xe_tile_printk.h"
#include "xe_tile_sriov_vf.h"
#include "xe_ttm_vram_mgr.h"
#include "xe_vram.h"
@@ -346,6 +347,20 @@ int xe_vram_probe(struct xe_device *xe)
if (err)
return err;
+ /*
+ * Without a primary GT there is no copy engine, so VRAM is
+ * moved with the CPU through the BAR. That only works if the
+ * BAR covers all of it.
+ */
+ if (!tile->primary_gt &&
+ tile->mem.vram->io_size < tile->mem.vram->usable_size) {
+ xe_tile_err(tile,
+ "VRAM is not fully CPU visible (%pa of %pa); a resizable BAR is required without a primary GT\n",
+ &tile->mem.vram->io_size,
+ &tile->mem.vram->usable_size);
+ return -ENODEV;
+ }
+
if (total_size > lmem_bar.io_size) {
xe_log_info(xe, VRAM,
"Total size %#llx is larger than resource %#llx\n",
--
2.43.0
next prev parent reply other threads:[~2026-11-21 18:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 18:23 [PATCH 00/17] Work around media 52-bit limitation on CRI Stuart Summers
2026-11-21 18:23 ` [PATCH 01/17] drm/xe/sysctrl: Use preallocated mailbox staging buffers Stuart Summers
2026-11-21 18:23 ` [PATCH 02/17] drm/xe: Process device OOB workarounds during early info init Stuart Summers
2026-11-21 18:23 ` [PATCH 03/17] drm/xe/sysctrl: Restore the SoC remapper on every runtime resume Stuart Summers
2026-11-21 18:23 ` [PATCH 04/17] drm/xe: Add enable_media module parameter Stuart Summers
2026-11-21 18:23 ` [PATCH 05/17] drm/xe: Detect each GMD_ID IP in a loop Stuart Summers
2026-11-21 18:23 ` [PATCH 06/17] drm/xe: Tolerate a missing graphics IP in xe_info_init() Stuart Summers
2026-11-21 18:23 ` [PATCH 07/17] drm/xe: Verify IP presence against GU_CNTL Stuart Summers
2026-11-21 18:23 ` [PATCH 08/17] drm/xe: Guard per-tile primary GT accesses Stuart Summers
2026-11-21 18:23 ` [PATCH 09/17] drm/xe: Stop assuming the root tile has a primary GT Stuart Summers
2026-11-21 18:23 ` [PATCH 10/17] drm/xe: Do not claim flat CCS without a graphics IP Stuart Summers
2026-11-21 18:23 ` [PATCH 11/17] drm/xe: Run page table updates on the media GT when there is no primary Stuart Summers
2026-11-21 18:23 ` [PATCH 12/17] drm/xe: Document that gt_types_allowed=media now probes Stuart Summers
2026-11-21 18:23 ` [PATCH 13/17] drm/xe: Fall back to CPU copies when the tile cannot blit Stuart Summers
2026-11-21 18:23 ` Stuart Summers [this message]
2026-11-21 18:23 ` [PATCH 15/17] drm/xe: Allow probe without a primary GT Stuart Summers
2026-11-21 18:23 ` [PATCH 16/17] drm/xe: Work around media 52-bit limitation on CRI Stuart Summers
2026-11-21 18:23 ` [PATCH 17/17] drm/xe: Don't error on failed media defeature Stuart Summers
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=20261121182317.48981-33-stuart.summers@intel.com \
--to=stuart.summers@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=fei.yang@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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