drm/i915/gsc: Mark internal GSC engine with reserved uabi class
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 16 Nov 2023 08:44:56 +0000 (08:44 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 20 Nov 2023 11:11:47 +0000 (11:11 +0000)
commitdfed6b58d54f3a5d7e6bc1fb060e2c936330eba2
tree5c7431d1f33958278aa4a6af1c2106cc671fc944
parente31b380741bfa27d274a9f9610fd732e1204ea24
drm/i915/gsc: Mark internal GSC engine with reserved uabi class

The GSC CS is not exposed to the user, so we skipped assigning a uabi
class number for it. However, the trace logs use the uabi class and
instance to identify the engine, so leaving uabi class unset makes the
GSC CS show up as the RCS in those logs.

Given that the engine is not exposed to the user, we can't add a new
case in the uabi enum, so we insted internally define a kernel
internal class as -1.

At the same time remove special handling for the name and complete
the uabi_classes array so internal class is automatically correctly
assigned.

Engine will show as 65535:0 other0 in the logs/traces which should
be unique enough.

v2:
 * Fix uabi class u8 vs u16 type confusion.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 194babe26bdc ("drm/i915/mtl: don't expose GSC command streamer to the user")
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231116084456.291533-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/gt/intel_engine_user.c