Browse Source

drm/amdgpu: group VM mapping tree with its lock (v2)

And also update the comment.

v2: agd: rebase on usptream.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König 9 years ago
parent
commit
25cfc3c27e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      drivers/gpu/drm/amd/amdgpu/amdgpu.h

+ 3 - 2
drivers/gpu/drm/amd/amdgpu/amdgpu.h

@@ -932,6 +932,8 @@ struct amdgpu_vm_id {
 };
 
 struct amdgpu_vm {
+	/* tree of virtual addresses mapped */
+	spinlock_t		it_lock;
 	struct rb_root		va;
 
 	/* protecting invalidated */
@@ -956,8 +958,7 @@ struct amdgpu_vm {
 
 	/* for id and flush management per ring */
 	struct amdgpu_vm_id	ids[AMDGPU_MAX_RINGS];
-	/* for interval tree */
-	spinlock_t		it_lock;
+
 	/* protecting freed */
 	spinlock_t		freed_lock;
 };