[RFC 01/34] Revert "drm/xe/uc: Store firmware binary in system-memory backed BO"

Rodrigo Vivi rodrigo.vivi at intel.com
Fri Jan 26 20:30:10 UTC 2024


This reverts commit 48cd5ebcb645ac1bd48480cf11dced902108d306.

This is breaking the GuC load after suspend cycles where the
power was lost such as s3 and d3cold on DGFX.

xe 0000:03:00.0: [drm] GuC load failed: status = 0x400000A0
xe 0000:03:00.0: [drm] GuC load failed: status: Reset = 0,
   BootROM = 0x50, UKernel = 0x00, MIA = 0x00, Auth = 0x01

Currently our suspend/resume flows only evict and restore the BOs
living in the VRAM itself since the system memory power won't be
lost. However, it seems that we might lose the PTEs for those
entries. While we don't have that in place, let's ensure that we
keep uc images in VRAM if possible.

Also another concern is the impact in the resume latency of
this case. So I wonder that if we end up moving this
uc_fw_copy to an earlier stage where LMEM is really not yet
available, maybe we need to later switch the uc_fw->bo to
a VRAM for the final access and better resume times.

Cc: Michał Winiarski <michal.winiarski at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/xe/xe_uc_fw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index 73d6938c921d..2c77322f103e 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -752,6 +752,8 @@ static int uc_fw_copy(struct xe_uc_fw *uc_fw, const void *data, size_t size, u32
 int xe_uc_fw_init(struct xe_uc_fw *uc_fw)
 {
 	const struct firmware *fw = NULL;
+	struct xe_gt *gt = uc_fw_to_gt(uc_fw);
+	struct xe_tile *tile = gt_to_tile(gt);
 	int err;
 
 	err = uc_fw_request(uc_fw, &fw);
@@ -763,7 +765,7 @@ int xe_uc_fw_init(struct xe_uc_fw *uc_fw)
 		return 0;
 
 	err = uc_fw_copy(uc_fw, fw->data, fw->size,
-			 XE_BO_CREATE_SYSTEM_BIT | XE_BO_CREATE_GGTT_BIT);
+			 XE_BO_CREATE_VRAM_IF_DGFX(tile) | XE_BO_CREATE_GGTT_BIT);
 
 	uc_fw_release(fw);
 
-- 
2.43.0



More information about the Intel-xe mailing list