drm/xe: add lockdep annotation for xe_device_mem_access_get()
authorMatthew Auld <matthew.auld@intel.com>
Wed, 19 Jul 2023 08:38:12 +0000 (09:38 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:37:36 +0000 (11:37 -0500)
commite3d2309250d49e4558b0abe95924b18f74995607
tree6e21f3a5aca6240848404fbcfc2fb5779a3f5568
parent7d623575a34539c0302a3ed3ec7321efcb281e37
drm/xe: add lockdep annotation for xe_device_mem_access_get()

The atomics here might hide potential issues, also rpm core is not
holding any lock when calling our rpm resume callback, so add a dummy lock
with the idea that xe_pm_runtime_resume() is eventually going to be
called when we are holding it. This only needs to happen once and then
lockdep can validate all callers and their locks.

v2: (Thomas Hellström)
 - Prefer static lockdep_map instead of full blown mutex.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device.c