]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: Cache data about user-visible engines
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 17 May 2024 20:43:08 +0000 (13:43 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 21 May 2024 13:33:40 +0000 (06:33 -0700)
commitbaa14865529bf1f3c12dc6145bd9109ef289e038
treea31806ad3cafd98c7809377013836900d746fd2c
parent6109f24f87d75122cf6de50901115cbee4285ce2
drm/xe: Cache data about user-visible engines

gt->info.engine_mask used to indicate the available engines, but that
is not always true anymore: some engines are reserved to kernel and some
may be exposed as a single engine (e.g. with ccs_mode).

Runtime changes only happen when no clients exist, so it's safe to cache
the list of engines in the gt and update that when it's needed. This
will help implementing per client engine utilization so this (mostly
constant) information doesn't need to be re-calculated on every query.

Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-7-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_gt.c
drivers/gpu/drm/xe/xe_gt.h
drivers/gpu/drm/xe/xe_gt_ccs_mode.c
drivers/gpu/drm/xe/xe_gt_types.h