[Intel-xe] [PATCH 2/4] drm/xe/huc: HuC is not supported on GTs that don't have video engines

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


On Fri, Sep 15, 2023 at 03:34:56PM -0700, Daniele Ceraolo Spurio wrote:
>On MTL-style multi-gt platforms, the HuC is only available on the media
>GT, so we need to consider it as not supported on the render GT.
>
>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>

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

Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_huc.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
>index ff86b7d8633e..700c43fe287b 100644
>--- a/drivers/gpu/drm/xe/xe_huc.c
>+++ b/drivers/gpu/drm/xe/xe_huc.c
>@@ -166,10 +166,19 @@ int xe_huc_parse_gsc_header(struct xe_uc_fw *huc_fw, const void *data, size_t si
>
> int xe_huc_init(struct xe_huc *huc)
> {
>-	struct xe_device *xe = huc_to_xe(huc);
>+	struct xe_gt *gt = huc_to_gt(huc);
>+	struct xe_tile *tile = gt_to_tile(gt);
>+	struct xe_device *xe = gt_to_xe(gt);
> 	int ret;
>
> 	huc->fw.type = XE_UC_FW_TYPE_HUC;
>+
>+	/* On platforms with a media GT the HuC is only available there */
>+	if (tile->media_gt && (gt != tile->media_gt)) {
>+		xe_uc_fw_change_status(&huc->fw, XE_UC_FIRMWARE_NOT_SUPPORTED);
>+		return 0;
>+	}
>+
> 	ret = xe_uc_fw_init(&huc->fw);
> 	if (ret)
> 		goto out;
>-- 
>2.41.0
>


More information about the Intel-xe mailing list