drm/amdgpu: add spin lock to protect freed list in vm (v2)

there is a protection fault about freed list when OCL test.
add a spin lock to protect it.

v2: drop changes in vm_fini

Signed-off-by: JimQu <jim.qu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
jimqu
2015-12-04 17:17:00 +08:00
committed by Alex Deucher
parent 9c97b5ab4a
commit 81d75a30c6
2 changed files with 15 additions and 3 deletions

View File

@@ -956,6 +956,8 @@ struct amdgpu_vm {
struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS];
/* for interval tree */
spinlock_t it_lock;
/* protecting freed */
spinlock_t freed_lock;
};
struct amdgpu_vm_manager {