]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/amdgpu: amdgpu_device_recover_vram always failed if only one node in shadow_list
authorwentalou <Wentao.Lou@amd.com>
Tue, 2 Apr 2019 09:13:05 +0000 (17:13 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Apr 2019 15:22:06 +0000 (10:22 -0500)
commit1712fb1a2f6829150032ac76eb0e39b82a549cfb
tree78822194b681dd076ab52fe2d6289a1e128c47e4
parentd4162c61e253177936fcfe6c29f7b224d9a1efb8
drm/amdgpu: amdgpu_device_recover_vram always failed if only one node in shadow_list

amdgpu_bo_restore_shadow would assign zero to r if succeeded.
r would remain zero if there is only one node in shadow_list.
current code would always return failure when r <= 0.
restart the timeout for each wait was a rather problematic bug as well.
The value of tmo SHOULD be changed, otherwise we wait tmo jiffies on each loop.

Signed-off-by: Wentao Lou <Wentao.Lou@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_device.c