From: Daniele Ceraolo Spurio Date: Thu, 17 Aug 2023 20:18:30 +0000 (-0700) Subject: drm/xe: don't expose the GSCCS to users X-Git-Tag: v6.8-rc1~111^2~7^2~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92939935f478c5a0cc43f87652360ac5c70063b9;p=thirdparty%2Fkernel%2Fstable.git drm/xe: don't expose the GSCCS to users The kernel is the only expected user of the GSCCS, so we don't want to expose it to userspace. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-7-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c index 32a5bd9d8e6b6..81281e9c02eb5 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -795,6 +795,9 @@ bool xe_hw_engine_is_reserved(struct xe_hw_engine *hwe) struct xe_gt *gt = hwe->gt; struct xe_device *xe = gt_to_xe(gt); + if (hwe->class == XE_ENGINE_CLASS_OTHER) + return true; + return xe->info.supports_usm && hwe->class == XE_ENGINE_CLASS_COPY && hwe->instance == gt->usm.reserved_bcs_instance; }