summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_device_types.h
diff options
context:
space:
mode:
authorNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>2023-11-01 22:02:53 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:45:27 +0300
commit78e2701a2614720d8c47b3a8490bf61c29718e8a (patch)
tree4b99b32833c5fce2f858cc1aa80c99e790ee5915 /drivers/gpu/drm/xe/xe_device_types.h
parentf3bc5bb4d53d2091f03cf43f19e7c9b41db90367 (diff)
downloadlinux-78e2701a2614720d8c47b3a8490bf61c29718e8a.tar.xz
drm/xe: Avoid any races around ccs_mode update
Ensure that there are no drm clients when changing CCS mode. Allow exec_queue creation only with enabled CCS engines. v2: Rebase Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_device_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_device_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 9a212dbdb8a4..58442da2f6c5 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -310,6 +310,15 @@ struct xe_device {
enum xe_sriov_mode __mode;
} sriov;
+ /** @clients: drm clients info */
+ struct {
+ /** @lock: Protects drm clients info */
+ spinlock_t lock;
+
+ /** @count: number of drm clients */
+ u64 count;
+ } clients;
+
/** @usm: unified memory state */
struct {
/** @asid: convert a ASID to VM */