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 12:23:38 -0500 |
commit | 9c4153b1eef9bc8da6a624252a3a25790b705136 (patch) | |
tree | 0de7e307e7317d669e9698e30e719ebb32c7f315 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | eb64526f5a5a382df7018a3e69061b9e3f20e32d (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 5f975030bb72..3b5d3706f0cb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -955,6 +955,8 @@ struct amdgpu_vm { | |||
955 | struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS]; | 955 | struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS]; |
956 | /* for interval tree */ | 956 | /* for interval tree */ |
957 | spinlock_t it_lock; | 957 | spinlock_t it_lock; |
958 | /* protecting freed */ | ||
959 | spinlock_t freed_lock; | ||
958 | }; | 960 | }; |
959 | 961 | ||
960 | struct amdgpu_vm_manager { | 962 | struct amdgpu_vm_manager { |