drm/amdgpu: Fix bugs in amdgpu_device_gpu_recover in XGMI case.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 30 Aug 2019 14:31:18 +0000 (10:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2019 22:39:05 +0000 (17:39 -0500)
commit12ffa55da60f8355a5e485bc6d612257a303147e
tree4297a85018e0a1d6a0786edd414f451c57d75fc1
parent43ce6bab7b9ea8615b18b4a6c88e9b8a122080e3
drm/amdgpu: Fix bugs in amdgpu_device_gpu_recover in XGMI case.

Issue 1:
In  XGMI case amdgpu_device_lock_adev for other devices in hive
was called to late, after access to their repsective schedulers.
So relocate the lock to the begining of accessing the other devs.

Issue 2:
Using amdgpu_device_ip_need_full_reset to switch the device list from
all devices in hive to the single 'master' device who owns this reset
call is wrong because when stopping schedulers we iterate all the devices
in hive but when restarting we will only reactivate the 'master' device.
Also, in case amdgpu_device_pre_asic_reset conlcudes that full reset IS
needed we then have to stop schedulers for all devices in hive and not
only the 'master' but with amdgpu_device_ip_need_full_reset  we
already missed the opprotunity do to so. So just remove this logic and
always stop and start all schedulers for all devices in hive.

Also minor cleanup and print fix.

v4: Minor coding style fix.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c