diff options
author | jimqu <Jim.Qu@amd.com> | 2015-12-04 04:17:00 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-12-04 13:08:13 -0500 |
commit | 81d75a30c6ed006a314f5c760196d04758660ca6 (patch) | |
tree | fcdfce8c4b048aab55b101845e8a53155eb7c55e /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 9c97b5ab4a91c18c2e7654f044cbff446cfd979b (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 670fefb56945..5a5f04d0902d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -956,6 +956,8 @@ struct amdgpu_vm { | |||
956 | struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS]; | 956 | struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS]; |
957 | /* for interval tree */ | 957 | /* for interval tree */ |
958 | spinlock_t it_lock; | 958 | spinlock_t it_lock; |
959 | /* protecting freed */ | ||
960 | spinlock_t freed_lock; | ||
959 | }; | 961 | }; |
960 | 962 | ||
961 | struct amdgpu_vm_manager { | 963 | struct amdgpu_vm_manager { |