aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Winiarski <[email protected]>2023-12-05 02:33:02 +0100
committerRodrigo Vivi <[email protected]>2023-12-21 11:45:11 -0500
commitb62f828a8368de59eb5b353788ace58fb6154495 (patch)
tree3ebb49106fef7bbf300c86ce71c1d31e7dab37cd
parent1ccd68e967f13a584bf3d45a58865afb0abbf2a4 (diff)
drm/xe: Move force_wake init to earlier point in probe
GuC will need to be loaded earlier during probe. And in order to load GuC, being able to take the forcewake is going to be needed. Signed-off-by: Michał Winiarski <[email protected]> Reviewed-by: Matt Roper <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_device.c3
-rw-r--r--drivers/gpu/drm/xe/xe_gt.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index dd56a8c3f80d..bcc10b7f23ab 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -415,6 +415,9 @@ int xe_device_probe(struct xe_device *xe)
xe_ttm_sys_mgr_init(xe);
+ for_each_gt(gt, xe, id)
+ xe_force_wake_init_gt(gt, gt_to_fw(gt));
+
err = drmm_add_action_or_reset(&xe->drm, xe_driver_flr_fini, xe);
if (err)
return err;
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 8a6fb9641cd6..4db94344bbde 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -293,8 +293,6 @@ int xe_gt_init_early(struct xe_gt *gt)
{
int err;
- xe_force_wake_init_gt(gt, gt_to_fw(gt));
-
err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (err)
return err;