drm/xe/uc: Fix uC status tracking
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 13 Sep 2023 23:28:36 +0000 (16:28 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:41:14 +0000 (11:41 -0500)
commit757308471dbe9aba28cdaf40848936923216a1f2
tree34d00224a60bd9fc76cee6df618dc0d9d502079c
parentc4991ee01d480c45c789b43eb001a978bf016f58
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>
drivers/gpu/drm/xe/xe_guc.c
drivers/gpu/drm/xe/xe_huc.c
drivers/gpu/drm/xe/xe_uc.c
drivers/gpu/drm/xe/xe_uc_fw.c
drivers/gpu/drm/xe/xe_wopcm.c