[PATCH v4 11/11] drm/xe: Rename xe_uc_init_hw to xe_uc_load_hw

Lucas De Marchi lucas.demarchi at intel.com
Wed Jun 25 19:21:30 UTC 2025


On Thu, Jun 19, 2025 at 12:49:10PM +0200, Maarten Lankhorst wrote:
>It feels to me like load is closer to the intention than init_hw.
>
>It makes the init calls slightly less confusing to me. :)
>
>Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_gt.c | 6 +++---
> drivers/gpu/drm/xe/xe_uc.c | 6 +++---
> drivers/gpu/drm/xe/xe_uc.h | 2 +-
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
>index 14761849390d8..d397df056e4cd 100644
>--- a/drivers/gpu/drm/xe/xe_gt.c
>+++ b/drivers/gpu/drm/xe/xe_gt.c
>@@ -573,7 +573,7 @@ static int gt_init_with_all_forcewake(struct xe_gt *gt)
> 		}
> 	}
>
>-	err = xe_uc_init_hw(&gt->uc);
>+	err = xe_uc_load_hw(&gt->uc);
> 	if (err)
> 		goto err_force_wake;
>
>@@ -738,7 +738,7 @@ static int vf_gt_restart(struct xe_gt *gt)
> 	if (err)
> 		return err;
>
>-	err = xe_uc_init_hw(&gt->uc);
>+	err = xe_uc_load_hw(&gt->uc);
> 	if (err)
> 		return err;
>
>@@ -776,7 +776,7 @@ static int do_gt_restart(struct xe_gt *gt)
> 	if (err)
> 		return err;
>
>-	err = xe_uc_init_hw(&gt->uc);
>+	err = xe_uc_load_hw(&gt->uc);
> 	if (err)
> 		return err;
>
>diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
>index 1b1441b234c92..d8ac194107c32 100644
>--- a/drivers/gpu/drm/xe/xe_uc.c
>+++ b/drivers/gpu/drm/xe/xe_uc.c
>@@ -144,7 +144,7 @@ int xe_uc_sanitize_reset(struct xe_uc *uc)
> 	return uc_reset(uc);
> }
>
>-static int vf_uc_init_hw(struct xe_uc *uc)
>+static int vf_uc_load_hw(struct xe_uc *uc)
> {
> 	int err;
>
>@@ -173,7 +173,7 @@ static int vf_uc_init_hw(struct xe_uc *uc)
>  * Should be called during driver load, after every GT reset, and after every
>  * suspend to reload / auth the firmwares.
>  */
>-int xe_uc_init_hw(struct xe_uc *uc)
>+int xe_uc_load_hw(struct xe_uc *uc)
> {
> 	int ret;
>
>@@ -182,7 +182,7 @@ int xe_uc_init_hw(struct xe_uc *uc)
> 		return 0;
>
> 	if (IS_SRIOV_VF(uc_to_xe(uc)))
>-		return vf_uc_init_hw(uc);
>+		return vf_uc_load_hw(uc);
>
> 	ret = xe_huc_upload(&uc->huc);
> 	if (ret)
>diff --git a/drivers/gpu/drm/xe/xe_uc.h b/drivers/gpu/drm/xe/xe_uc.h
>index 58ff3946a80ec..21c9306098cfd 100644
>--- a/drivers/gpu/drm/xe/xe_uc.h
>+++ b/drivers/gpu/drm/xe/xe_uc.h
>@@ -11,7 +11,7 @@ struct xe_uc;
> int xe_uc_init_noalloc(struct xe_uc *uc);
> int xe_uc_init(struct xe_uc *uc);
> int xe_uc_init_post_hwconfig(struct xe_uc *uc);
>-int xe_uc_init_hw(struct xe_uc *uc);
>+int xe_uc_load_hw(struct xe_uc *uc);
> void xe_uc_gucrc_disable(struct xe_uc *uc);
> int xe_uc_reset_prepare(struct xe_uc *uc);
> void xe_uc_stop_prepare(struct xe_uc *uc);
>-- 
>2.45.2
>


More information about the Intel-xe mailing list