Skip to content

Commit 80fa03e

Browse files
author
Maarten Lankhorst
committed
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>
1 parent 3effd10 commit 80fa03e

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

drivers/gpu/drm/xe/xe_gt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,6 @@ static int gt_init_with_gt_forcewake(struct xe_gt *gt)
466466
if (err)
467467
goto err_force_wake;
468468

469-
err = xe_uc_init_hwconfig(&gt->uc);
470-
if (err)
471-
goto err_force_wake;
472-
473469
xe_gt_topology_init(gt);
474470
xe_gt_mcr_init(gt);
475471
xe_gt_enable_host_l2_vram(gt);

drivers/gpu/drm/xe/xe_uc.c

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ int xe_uc_init(struct xe_uc *uc)
7272
if (!xe_device_uc_enabled(uc_to_xe(uc)))
7373
return 0;
7474

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+
}
7780

78-
ret = xe_wopcm_init(&uc->wopcm);
81+
ret = xe_guc_min_load_for_hwconfig(&uc->guc);
7982
if (ret)
8083
goto err;
8184

8285
return 0;
83-
8486
err:
8587
xe_gt_err(uc_to_gt(uc), "Failed to initialize uC (%pe)\n", ERR_PTR(ret));
8688
return ret;
@@ -142,27 +144,6 @@ int xe_uc_sanitize_reset(struct xe_uc *uc)
142144
return uc_reset(uc);
143145
}
144146

145-
/**
146-
* xe_uc_init_hwconfig - minimally init Uc, read and parse hwconfig
147-
* @uc: The UC object
148-
*
149-
* Return: 0 on success, negative error code on error.
150-
*/
151-
int xe_uc_init_hwconfig(struct xe_uc *uc)
152-
{
153-
int ret;
154-
155-
/* GuC submission not enabled, nothing to do */
156-
if (!xe_device_uc_enabled(uc_to_xe(uc)))
157-
return 0;
158-
159-
ret = xe_guc_min_load_for_hwconfig(&uc->guc);
160-
if (ret)
161-
return ret;
162-
163-
return 0;
164-
}
165-
166147
static int vf_uc_init_hw(struct xe_uc *uc)
167148
{
168149
int err;

drivers/gpu/drm/xe/xe_uc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ struct xe_uc;
1010

1111
int xe_uc_init_noalloc(struct xe_uc *uc);
1212
int xe_uc_init(struct xe_uc *uc);
13-
int xe_uc_init_hwconfig(struct xe_uc *uc);
1413
int xe_uc_init_post_hwconfig(struct xe_uc *uc);
1514
int xe_uc_init_hw(struct xe_uc *uc);
1615
int xe_uc_fini_hw(struct xe_uc *uc);

0 commit comments

Comments
 (0)