drm/amdgpu: Warn and update pin_size values when destroying a pinned BO
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 11 Jul 2018 10:42:55 +0000 (12:42 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:46:28 +0000 (14:46 -0500)
commit15e6b76880e65be24250e30986084b5569b7a06f
treec38c625da2a4aad7523fc06939452184bad72af8
parenta5ccfe5c20740f2fbf00291490cdf8d2373ec255
drm/amdgpu: Warn and update pin_size values when destroying a pinned BO

This shouldn't happen, but if it does, we'll get a backtrace of the
caller, and update the pin_size values as needed.

v2:
* Check bo->pin_count instead of placement flags (Christian König)

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_object.c