]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/guc: Introduce enum with offsets for context register H2Gs
authorTomasz Lis <tomasz.lis@intel.com>
Mon, 12 May 2025 11:40:17 +0000 (13:40 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 12 May 2025 13:53:37 +0000 (15:53 +0200)
commite327592cc901a3e415e28e1b6aa26381a2a93582
tree33704bd887c3ab572e5d9a17729733903adfdfd7
parent3e693945b125da0f8459e84cee385cec77910c2f
drm/xe/guc: Introduce enum with offsets for context register H2Gs

Some GuC messages are constructed with incrementing dword counter
rather than referencing specific DWORDs, as described in GuC interface
specification.

This change introduces the definitions of DWORD numbers for parameters
which will need to be referenced in a CTB parser to be added in a
following patch. To ensure correctness of these DWORDs, verification
in form of asserts was added to the message construction code.

v2: Renamed enum members, added ones for single context registration,
  modified asserts to check values rather than indexes.
v3: Reordered assert args to take less lines
v4: Added lengths
v5: Renamed MULTI_LRC_MSG_LEN to MULTI_LRC_MSG_MIN_LEN

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20250512114018.361843-4-tomasz.lis@intel.com
drivers/gpu/drm/xe/abi/guc_actions_abi.h
drivers/gpu/drm/xe/xe_guc_submit.c