drm/xe: Move system memory management init to earlier point in probe
authorMichał Winiarski <michal.winiarski@intel.com>
Tue, 5 Dec 2023 01:33:01 +0000 (02:33 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:45:11 +0000 (11:45 -0500)
GuC will need to be loaded earlier during probe. And in order to load
GuC, we will need the ability to create system memory allocations.

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device.c

index f4be4b13a506e572a4cc1bbc961435e7b42519da..dd56a8c3f80d4f1a292817d95f348e0dbc4af684 100644 (file)
@@ -413,6 +413,8 @@ int xe_device_probe(struct xe_device *xe)
 
        xe_mmio_probe_tiles(xe);
 
+       xe_ttm_sys_mgr_init(xe);
+
        err = drmm_add_action_or_reset(&xe->drm, xe_driver_flr_fini, xe);
        if (err)
                return err;
@@ -441,8 +443,6 @@ int xe_device_probe(struct xe_device *xe)
        if (err)
                goto err_irq_shutdown;
 
-       xe_ttm_sys_mgr_init(xe);
-
        for_each_tile(tile, xe, id) {
                err = xe_tile_init_noalloc(tile);
                if (err)