From 78e2701a2614720d8c47b3a8490bf61c29718e8a Mon Sep 17 00:00:00 2001 From: Niranjana Vishwanathapura Date: Wed, 1 Nov 2023 19:02:53 +0000 Subject: 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 Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_device_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/drm/xe/xe_device_types.h') 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 */ -- cgit v1.2.3