[Intel-xe] [PATCH 3/4] drm/xe/huc: Don't re-auth HuC if it's already authenticated

Lucas De Marchi lucas.demarchi at intel.com
Fri Oct 13 19:16:08 UTC 2023


On Fri, Sep 15, 2023 at 03:34:57PM -0700, Daniele Ceraolo Spurio wrote:
>On newer platforms the HuC survives reset and stays authenticated, so no
>need to re-authenticate it.
>
>Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>Cc: Alan Previn <alan.previn.teres.alexis at intel.com>
>Cc: John Harrison <John.C.Harrison at Intel.com>
>---
> drivers/gpu/drm/xe/xe_huc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
>index 700c43fe287b..d753d2eb8954 100644
>--- a/drivers/gpu/drm/xe/xe_huc.c
>+++ b/drivers/gpu/drm/xe/xe_huc.c
>@@ -214,6 +214,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) {

is this safe on the older platforms though? Assuming this works on other
platforms,

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

Lucas De Marchi

>+		xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_RUNNING);
>+		return 0;
>+	}
>+
> 	if (!xe_uc_fw_is_loaded(&huc->fw))
> 		return -ENOEXEC;
>
>-- 
>2.41.0
>


More information about the Intel-xe mailing list