drm/amdgpu: Make pin_size values atomic
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 11 Jul 2018 10:00:40 +0000 (12:00 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:46:21 +0000 (14:46 -0500)
commita5ccfe5c20740f2fbf00291490cdf8d2373ec255
tree66b6a41a586ebba1e8c04a71dfbe3058c42b9581
parentddc21af4d0f37f42b33c54cb69b215997fe5b082
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>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c