aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <[email protected]>2023-10-25 10:57:44 -0700
committerRodrigo Vivi <[email protected]>2023-12-21 11:43:23 -0500
commit185f93f3041fe520c6df16a58bea116077d3f848 (patch)
tree5bfee2065c2f0a07439ffda49c090c5b0e70e461
parentb77d8b5c5ec0673086f565f2c07ed6da081483b8 (diff)
drm/xe/huc: Don't re-auth HuC if it's already authenticated
On newer platforms the HuC survives reset and stays authenticated, so no need to re-authenticate it. Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Alan Previn <[email protected]> Cc: John Harrison <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_huc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
index 386efa180c1c..2f176badab26 100644
--- a/drivers/gpu/drm/xe/xe_huc.c
+++ b/drivers/gpu/drm/xe/xe_huc.c
@@ -83,6 +83,12 @@ int xe_huc_auth(struct xe_huc *huc)
xe_assert(xe, !xe_uc_fw_is_running(&huc->fw));
+ /* On newer platforms the HuC survives reset, so no need to re-auth */
+ if (xe_mmio_read32(gt, HUC_KERNEL_LOAD_INFO) & HUC_LOAD_SUCCESSFUL) {
+ xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_RUNNING);
+ return 0;
+ }
+
if (!xe_uc_fw_is_loaded(&huc->fw))
return -ENOEXEC;