summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2023-10-25 10:57:43 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:43:23 -0500
commitb77d8b5c5ec0673086f565f2c07ed6da081483b8 (patch)
tree9b7eda7b773b220ccfe76e147146df5e41f21f87
parent484ecffac91067e44273afa727fb1b9855058c9a (diff)
downloadlinux-b77d8b5c5ec0673086f565f2c07ed6da081483b8.tar.gz
linux-b77d8b5c5ec0673086f565f2c07ed6da081483b8.zip
drm/xe/huc: HuC is not supported on GTs that don't have video engines
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@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_huc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
index 293403d16f25..386efa180c1c 100644
--- a/drivers/gpu/drm/xe/xe_huc.c
+++ b/drivers/gpu/drm/xe/xe_huc.c
@@ -35,10 +35,19 @@ huc_to_guc(struct xe_huc *huc)
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;