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

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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