drm/amdgpu: Update pin_size values before unpinning BO
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 15 Jun 2018 09:06:56 +0000 (11:06 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Jun 2018 18:50:56 +0000 (13:50 -0500)
commit34d6d59986abb1d2cb5415a49b6c50f51ba1d2e4
tree32399d31437585eadb471bc358b0688000f65ec4
parent5c53d19b76dccbaf340b11acb837d40c0789049d
drm/amdgpu: Update pin_size values before unpinning BO

At least in theory, ttm_bo_validate may move the BO, in which case the
pin_size accounting would be inconsistent with when the BO was pinned.

Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c