]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/xe: Move xe_gt_init_early() where it belongs
authorLucas De Marchi <lucas.demarchi@intel.com>
Mon, 13 May 2024 21:37:49 +0000 (14:37 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 14 May 2024 04:21:13 +0000 (21:21 -0700)
Early shall be early enough, stop doing other things with gt before it.
Now that xe_gt_init_early() doesn't need forcewake and doesn't depend on
the fake engine_mask initialization, move it where it belongs: it
doesn't need to be after hwconfig config anymore.

Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-3-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_device.c

index 4165e13473710b8fa58eb9c871dffe92e5523394..9c32bd157ecf47ad6f178309392b0473d8783b19 100644 (file)
@@ -567,6 +567,12 @@ int xe_device_probe(struct xe_device *xe)
 
        xe_ttm_sys_mgr_init(xe);
 
+       for_each_gt(gt, xe, id) {
+               err = xe_gt_init_early(gt);
+               if (err)
+                       return err;
+       }
+
        for_each_gt(gt, xe, id)
                xe_force_wake_init_gt(gt, gt_to_fw(gt));
 
@@ -605,12 +611,6 @@ int xe_device_probe(struct xe_device *xe)
        if (err)
                goto err;
 
-       for_each_gt(gt, xe, id) {
-               err = xe_gt_init_early(gt);
-               if (err)
-                       goto err_irq_shutdown;
-       }
-
        err = xe_device_set_has_flat_ccs(xe);
        if (err)
                goto err_irq_shutdown;