[PATCH 04/14] drm/xe: Initialize UC after xe_display_init_noaccel.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Fri Sep 27 14:13:54 UTC 2024
There shouldn't be any allocation to GGTT before display readout,
and the ucode allocations count.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 2 +-
drivers/gpu/drm/xe/xe_gt.c | 27 +++++++++++++--------------
drivers/gpu/drm/xe/xe_gt.h | 2 +-
3 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 2f9af45bf97f..0a9aa76bf8c4 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -684,7 +684,7 @@ int xe_device_probe(struct xe_device *xe)
}
for_each_gt(gt, xe, id) {
- err = xe_gt_init_hwconfig(gt);
+ err = xe_gt_init_early_tile(gt);
if (err)
return err;
}
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 9b0218109647..c14f18bf497e 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -466,6 +466,18 @@ static int all_fw_domain_init(struct xe_gt *gt)
if (err)
goto err_hw_fence_irq;
+ /*
+ * Initialize GuC in order to obtain hwconfig and
+ * enable CTB communication.
+ */
+ err = xe_uc_init(>->uc);
+ if (err)
+ goto err_force_wake;
+
+ err = xe_uc_init_hwconfig(>->uc);
+ if (err)
+ goto err_force_wake;
+
xe_gt_mcr_set_implicit_defaults(gt);
xe_reg_sr_apply_mmio(>->reg_sr, gt);
@@ -542,11 +554,7 @@ static int all_fw_domain_init(struct xe_gt *gt)
return err;
}
-/*
- * Initialize enough GT to be able to load GuC in order to obtain hwconfig and
- * enable CTB communication.
- */
-int xe_gt_init_hwconfig(struct xe_gt *gt)
+int xe_gt_init_early_tile(struct xe_gt *gt)
{
int err;
@@ -557,19 +565,10 @@ int xe_gt_init_hwconfig(struct xe_gt *gt)
xe_gt_mcr_init_early(gt);
xe_pat_init(gt);
- err = xe_uc_init(>->uc);
- if (err)
- goto out_fw;
-
- err = xe_uc_init_hwconfig(>->uc);
- if (err)
- goto out_fw;
-
xe_gt_topology_init(gt);
xe_gt_mcr_init(gt);
xe_gt_enable_host_l2_vram(gt);
-out_fw:
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
out:
return err;
diff --git a/drivers/gpu/drm/xe/xe_gt.h b/drivers/gpu/drm/xe/xe_gt.h
index 05c8351d0f39..d599c6a9e167 100644
--- a/drivers/gpu/drm/xe/xe_gt.h
+++ b/drivers/gpu/drm/xe/xe_gt.h
@@ -34,8 +34,8 @@ static inline bool xe_fault_inject_gt_reset(void)
#endif
struct xe_gt *xe_gt_alloc(struct xe_tile *tile);
-int xe_gt_init_hwconfig(struct xe_gt *gt);
int xe_gt_init_early(struct xe_gt *gt);
+int xe_gt_init_early_tile(struct xe_gt *gt);
int xe_gt_init(struct xe_gt *gt);
void xe_gt_mmio_init(struct xe_gt *gt);
void xe_gt_declare_wedged(struct xe_gt *gt);
--
2.45.2
More information about the Intel-xe
mailing list