Commit c3ca5465 authored by Matthew Brost's avatar Matthew Brost Committed by Rodrigo Vivi

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: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
parent da3799c9
...@@ -147,8 +147,11 @@ int xe_bo_restore_kernel(struct xe_device *xe) ...@@ -147,8 +147,11 @@ int xe_bo_restore_kernel(struct xe_device *xe)
return ret; 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); 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 * We expect validate to trigger a move VRAM and our move code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment