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

drm/xe: Remove xe_uc_fini_hw

xe_uc_init_hw() is called multiple times from xe_gt.c,
and that makes the name xe_uc_fini_hw(), called for a different
reason in xe_guc.c confusing.

Remove it and inline the xe_uc_sanitize_reset into xe_guc.c directly.

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

+1 -7
+1 -1
drivers/gpu/drm/xe/xe_guc.c
··· 577 577 unsigned int fw_ref; 578 578 579 579 fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); 580 - xe_uc_fini_hw(&guc_to_gt(guc)->uc); 580 + xe_uc_sanitize_reset(&guc_to_gt(guc)->uc); 581 581 xe_force_wake_put(gt_to_fw(gt), fw_ref); 582 582 583 583 guc_g2g_fini(guc);
-5
drivers/gpu/drm/xe/xe_uc.c
··· 220 220 return 0; 221 221 } 222 222 223 - int xe_uc_fini_hw(struct xe_uc *uc) 224 - { 225 - return xe_uc_sanitize_reset(uc); 226 - } 227 - 228 223 int xe_uc_reset_prepare(struct xe_uc *uc) 229 224 { 230 225 /* GuC submission not enabled, nothing to do */
-1
drivers/gpu/drm/xe/xe_uc.h
··· 12 12 int xe_uc_init(struct xe_uc *uc); 13 13 int xe_uc_init_post_hwconfig(struct xe_uc *uc); 14 14 int xe_uc_init_hw(struct xe_uc *uc); 15 - int xe_uc_fini_hw(struct xe_uc *uc); 16 15 void xe_uc_gucrc_disable(struct xe_uc *uc); 17 16 int xe_uc_reset_prepare(struct xe_uc *uc); 18 17 void xe_uc_stop_prepare(struct xe_uc *uc);