diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-07-11 13:00:40 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-13 22:46:21 +0300 |
commit | a5ccfe5c20740f2fbf00291490cdf8d2373ec255 (patch) | |
tree | 66b6a41a586ebba1e8c04a71dfbe3058c42b9581 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | ddc21af4d0f37f42b33c54cb69b215997fe5b082 (diff) | |
download | linux-a5ccfe5c20740f2fbf00291490cdf8d2373ec255.tar.xz |
drm/amdgpu: Make pin_size values atomic
Concurrent execution of the non-atomic arithmetic could result in
completely bogus values.
v2:
* Rebased on v2 of the previous patch
Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/106872
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 51b16de008bb..53435da158c2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1589,9 +1589,9 @@ struct amdgpu_device { DECLARE_HASHTABLE(mn_hash, 7); /* tracking pinned memory */ - u64 vram_pin_size; - u64 visible_pin_size; - u64 gart_pin_size; + atomic64_t vram_pin_size; + atomic64_t visible_pin_size; + atomic64_t gart_pin_size; /* amdkfd interface */ struct kfd_dev *kfd; |