drm/xe: Initialize MOCS earlier
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 2 Jun 2023 23:52:09 +0000 (16:52 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:28 +0000 (18:34 -0500)
xe_mocs_init_early doesn't touch the hardware, it just sets up internal
software state.  There's no need to perform this step in the "forcewake
held" region.  Moving the init earlier will also make the uc_index
values available earlier which will be important for an upcoming GuC
init patch.

Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20230602235210.1314028-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt.c

index 335148f1cd39c6c720dd81f12b25a5e9a60d43e9..3799e663bad353f16c62707aefd00b6c365d1bea 100644 (file)
@@ -315,8 +315,6 @@ static int gt_fw_domain_init(struct xe_gt *gt)
        /* Rerun MCR init as we now have hw engine list */
        xe_gt_mcr_init(gt);
 
-       xe_mocs_init_early(gt);
-
        err = xe_hw_engines_init_early(gt);
        if (err)
                goto err_force_wake;
@@ -429,6 +427,8 @@ int xe_gt_init(struct xe_gt *gt)
        if (err)
                return err;
 
+       xe_mocs_init_early(gt);
+
        xe_gt_sysfs_init(gt);
 
        err = gt_fw_domain_init(gt);