Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Remove xe_uc_init_hwconfig()

This function is called immediately after xe_uc_init(), so just put it
there instead.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250619104858.418440-22-dev@lankhorst.se
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>

+6 -30
-4
drivers/gpu/drm/xe/xe_gt.c
··· 466 466 if (err) 467 467 goto err_force_wake; 468 468 469 - err = xe_uc_init_hwconfig(&gt->uc); 470 - if (err) 471 - goto err_force_wake; 472 - 473 469 xe_gt_topology_init(gt); 474 470 xe_gt_mcr_init(gt); 475 471 xe_gt_enable_host_l2_vram(gt);
+6 -25
drivers/gpu/drm/xe/xe_uc.c
··· 72 72 if (!xe_device_uc_enabled(uc_to_xe(uc))) 73 73 return 0; 74 74 75 - if (IS_SRIOV_VF(uc_to_xe(uc))) 76 - return 0; 75 + if (!IS_SRIOV_VF(uc_to_xe(uc))) { 76 + ret = xe_wopcm_init(&uc->wopcm); 77 + if (ret) 78 + goto err; 79 + } 77 80 78 - ret = xe_wopcm_init(&uc->wopcm); 81 + ret = xe_guc_min_load_for_hwconfig(&uc->guc); 79 82 if (ret) 80 83 goto err; 81 84 82 85 return 0; 83 - 84 86 err: 85 87 xe_gt_err(uc_to_gt(uc), "Failed to initialize uC (%pe)\n", ERR_PTR(ret)); 86 88 return ret; ··· 142 140 xe_uc_sanitize(uc); 143 141 144 142 return uc_reset(uc); 145 - } 146 - 147 - /** 148 - * xe_uc_init_hwconfig - minimally init Uc, read and parse hwconfig 149 - * @uc: The UC object 150 - * 151 - * Return: 0 on success, negative error code on error. 152 - */ 153 - int xe_uc_init_hwconfig(struct xe_uc *uc) 154 - { 155 - int ret; 156 - 157 - /* GuC submission not enabled, nothing to do */ 158 - if (!xe_device_uc_enabled(uc_to_xe(uc))) 159 - return 0; 160 - 161 - ret = xe_guc_min_load_for_hwconfig(&uc->guc); 162 - if (ret) 163 - return ret; 164 - 165 - return 0; 166 143 } 167 144 168 145 static int vf_uc_init_hw(struct xe_uc *uc)
-1
drivers/gpu/drm/xe/xe_uc.h
··· 10 10 11 11 int xe_uc_init_noalloc(struct xe_uc *uc); 12 12 int xe_uc_init(struct xe_uc *uc); 13 - int xe_uc_init_hwconfig(struct xe_uc *uc); 14 13 int xe_uc_init_post_hwconfig(struct xe_uc *uc); 15 14 int xe_uc_init_hw(struct xe_uc *uc); 16 15 int xe_uc_fini_hw(struct xe_uc *uc);