diff options
author | Matthew Brost <matthew.brost@intel.com> | 2023-01-26 02:27:21 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:27:47 +0300 |
commit | c3ca5465564e7b6459e868b3433fff4e44a7fd64 (patch) | |
tree | 7e97910d749d5dd00858e25b1d9c7ed5b88cea32 /drivers/gpu/drm/xe/xe_bo_evict.c | |
parent | da3799c975726572066f1c6bc6a6f65cb1f01c84 (diff) | |
download | linux-c3ca5465564e7b6459e868b3433fff4e44a7fd64.tar.xz |
drm/xe: Lock GGTT on when restoring kernel BOs
Make lockdep happy as we required to hold the GGTT when calling
xe_ggtt_map_bo.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo_evict.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo_evict.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo_evict.c b/drivers/gpu/drm/xe/xe_bo_evict.c index 7046dc203138..3fb3c8c77efa 100644 --- a/drivers/gpu/drm/xe/xe_bo_evict.c +++ b/drivers/gpu/drm/xe/xe_bo_evict.c @@ -147,8 +147,11 @@ int xe_bo_restore_kernel(struct xe_device *xe) return ret; } - if (bo->flags & XE_BO_CREATE_GGTT_BIT) + if (bo->flags & XE_BO_CREATE_GGTT_BIT) { + mutex_lock(&bo->gt->mem.ggtt->lock); xe_ggtt_map_bo(bo->gt->mem.ggtt, bo); + mutex_unlock(&bo->gt->mem.ggtt->lock); + } /* * We expect validate to trigger a move VRAM and our move code |