diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2023-09-13 16:28:36 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:41:14 -0500 |
commit | 757308471dbe9aba28cdaf40848936923216a1f2 (patch) | |
tree | 34d00224a60bd9fc76cee6df618dc0d9d502079c /drivers/gpu/drm/xe/xe_wopcm.c | |
parent | c4991ee01d480c45c789b43eb001a978bf016f58 (diff) | |
download | lwn-757308471dbe9aba28cdaf40848936923216a1f2.tar.gz lwn-757308471dbe9aba28cdaf40848936923216a1f2.zip |
drm/xe/uc: Fix uC status tracking
The current uC status tracking has a few issues:
1) the HuC is moved to "disabled" instead of "not supported"
2) the status is left uninitialized instead of "disabled" when the
modparam is used to disable support
3) due to #1, a number of checks are done against "disabled" instead of
the appropriate status.
Address all of those by making sure to follow the appropriate state
transition and checking against the required state.
v2: rebase on s/guc_submission_enabled/uc_enabled/
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: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_wopcm.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_wopcm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_wopcm.c b/drivers/gpu/drm/xe/xe_wopcm.c index 9a85bcc18830..bf85d4fa56cc 100644 --- a/drivers/gpu/drm/xe/xe_wopcm.c +++ b/drivers/gpu/drm/xe/xe_wopcm.c @@ -139,8 +139,7 @@ static int __wopcm_init_regs(struct xe_device *xe, struct xe_gt *gt, { u32 base = wopcm->guc.base; u32 size = wopcm->guc.size; - u32 huc_agent = xe_uc_fw_is_disabled(>->uc.huc.fw) ? 0 : - HUC_LOADING_AGENT_GUC; + u32 huc_agent = xe_uc_fw_is_available(>->uc.huc.fw) ? HUC_LOADING_AGENT_GUC : 0; u32 mask; int err; |