drm/xe/guc: Introduce GuC context ID Manager
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 13 Mar 2024 22:11:10 +0000 (23:11 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 27 Mar 2024 19:19:25 +0000 (20:19 +0100)
commit68fac8ab0f9d51abd93edee38e8dadf2705c0b4f
treeff5a3df81c9db9a76afd18f275489406acc46080
parentf88beeed82700697745aa3290f5a12c7b1b1bbe7
drm/xe/guc: Introduce GuC context ID Manager

While we are already managing GuC IDs directly in GuC submission
code, using bitmap() for MLRC and ida() for SLRC, this code can't
be easily extended to meet additional requirements for SR-IOV use
cases, like limited number of IDs available on VFs, or ID range
reservation for provisioning VFs by the PF.

Add a separate component for managing GuC IDs, that will replace
existing ID management. Start with bitmap() based implementation
that could be optimized later based on perf data.

Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313221112.1089-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_guc_id_mgr.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_guc_id_mgr.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_guc_types.h