drm/amdgpu: use new asic need_full_reset callback
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Mar 2018 19:48:37 +0000 (14:48 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Apr 2018 18:07:59 +0000 (13:07 -0500)
Use the new callback to determine whether to use full
asic reset or per IP soft reset.  Enables reset to
actually proceed on asics which don't support soft
reset yet.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index e0d6b1ddd2134661d4d0eb7312cd71ff0057af21..abc33464959ef9dd7cff970022b11facc5d3c89f 100644 (file)
@@ -2738,6 +2738,9 @@ static bool amdgpu_device_ip_check_soft_reset(struct amdgpu_device *adev)
        if (amdgpu_sriov_vf(adev))
                return true;
 
+       if (amdgpu_asic_need_full_reset(adev))
+               return true;
+
        for (i = 0; i < adev->num_ip_blocks; i++) {
                if (!adev->ip_blocks[i].status.valid)
                        continue;
@@ -2794,6 +2797,9 @@ static bool amdgpu_device_ip_need_full_reset(struct amdgpu_device *adev)
 {
        int i;
 
+       if (amdgpu_asic_need_full_reset(adev))
+               return true;
+
        for (i = 0; i < adev->num_ip_blocks; i++) {
                if (!adev->ip_blocks[i].status.valid)
                        continue;