summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_uc.c
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2023-09-14 02:28:35 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:41:13 +0300
commitc4991ee01d480c45c789b43eb001a978bf016f58 (patch)
treebc58539225efd22759a61c8a6f0c5e0cd5807514 /drivers/gpu/drm/xe/xe_uc.c
parent3856b0f71f52b8397887c1765e14d0245d722233 (diff)
downloadlinux-c4991ee01d480c45c789b43eb001a978bf016f58.tar.xz
drm/xe/uc: Rename guc_submission_enabled() to uc_enabled()
The guc_submission_enabled() function is being used as a boolean toggle for all firmwares and all related features, not just GuC submission. We could add additional flags/functions to distinguish and allow different use-cases (e.g. loading HuC but not using GuC submission), but given that not using GuC is a debug-only scenario having a global switch for all FWs is enough. However, we want to make it clear that this switch turns off everything, so rename it to uc_enabled(). v2: rebase on s/XE_WARN_ON/xe_assert Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_uc.c')
-rw-r--r--drivers/gpu/drm/xe/xe_uc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
index a8ecb5c6e01a..5b7d6177c1c2 100644
--- a/drivers/gpu/drm/xe/xe_uc.c
+++ b/drivers/gpu/drm/xe/xe_uc.c
@@ -32,7 +32,7 @@ int xe_uc_init(struct xe_uc *uc)
int ret;
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
ret = xe_guc_init(&uc->guc);
@@ -66,7 +66,7 @@ err:
int xe_uc_init_post_hwconfig(struct xe_uc *uc)
{
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
return xe_guc_init_post_hwconfig(&uc->guc);
@@ -110,7 +110,7 @@ int xe_uc_init_hwconfig(struct xe_uc *uc)
int ret;
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
ret = xe_guc_min_load_for_hwconfig(&uc->guc);
@@ -129,7 +129,7 @@ int xe_uc_init_hw(struct xe_uc *uc)
int ret;
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
ret = xe_uc_sanitize_reset(uc);
@@ -175,7 +175,7 @@ int xe_uc_fini_hw(struct xe_uc *uc)
int xe_uc_reset_prepare(struct xe_uc *uc)
{
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
return xe_guc_reset_prepare(&uc->guc);
@@ -194,7 +194,7 @@ void xe_uc_stop_prepare(struct xe_uc *uc)
int xe_uc_stop(struct xe_uc *uc)
{
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
return xe_guc_stop(&uc->guc);
@@ -203,7 +203,7 @@ int xe_uc_stop(struct xe_uc *uc)
int xe_uc_start(struct xe_uc *uc)
{
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
return xe_guc_start(&uc->guc);
@@ -226,7 +226,7 @@ int xe_uc_suspend(struct xe_uc *uc)
int ret;
/* GuC submission not enabled, nothing to do */
- if (!xe_device_guc_submission_enabled(uc_to_xe(uc)))
+ if (!xe_device_uc_enabled(uc_to_xe(uc)))
return 0;
uc_reset_wait(uc);