drm/amdgpu: Enable default GPU reset for dGPU on gfx8/9.
Subsystems (2)
PATCH 1/1 drm/amdgpu: Enable default GPU reset for dGPU on gfx8/9.
After testing looks like this subset of ASICs has GPU reset working for the most part. Enable reset due to job timeout.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +19 -5
@@ -3292,18 +3292,32 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,*/ bool amdgpu_device_should_recover_gpu (struct amdgpu_device *adev) { +struct amdgpu_ip_block *ip_block; +if (!amdgpu_device_ip_check_soft_reset (adev)) {DRM_INFO ("Timeout, but no hardware hang detected.\n" );return false; } -if (amdgpu_gpu_recovery ==0 || (amdgpu_gpu_recovery ==-1 && - !amdgpu_sriov_vf (adev))) { -DRM_INFO ("GPU recovery disabled.\n" ); -return false; - } +if (amdgpu_gpu_recovery ==0 ) + goto disabled; + +if (amdgpu_sriov_vf (adev)) +return true; + + ip_block =amdgpu_device_ip_get_ip_block (adev,AMD_IP_BLOCK_TYPE_GFX ); + +if (amdgpu_gpu_recovery ==-1 && + ((adev->flags &AMD_IS_APU ) || + ip_block->version->major <8 || + ip_block->version->major >9 )) + goto disabled;return true; + +disabled: +DRM_INFO ("GPU recovery disabled.\n" ); +return false; }/**
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1540243172-23222-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Quoted 32 lines · Andrey Grodzovsky
After testing looks like this subset of ASICs has GPU reset working for the most part. Enable reset due to job timeout.
Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5
-5@@ -3292,18 +3292,32 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,*/ bool amdgpu_device_should_recover_gpu (struct amdgpu_device *adev) { +struct amdgpu_ip_block *ip_block; +if (!amdgpu_device_ip_check_soft_reset (adev)) {DRM_INFO ("Timeout, but no hardware hang detected.\n" );return false; } -if (amdgpu_gpu_recovery ==0 || (amdgpu_gpu_recovery ==-1 && - !amdgpu_sriov_vf (adev))) { -DRM_INFO ("GPU recovery disabled.\n" ); -return false; - } +if (amdgpu_gpu_recovery ==0 ) + goto disabled; +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, · line 3314
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +10
-0+if (amdgpu_sriov_vf (adev)) +return true; + + ip_block =amdgpu_device_ip_get_ip_block (adev,AMD_IP_BLOCK_TYPE_GFX ); + +if (amdgpu_gpu_recovery ==-1 && + ((adev->flags &AMD_IS_APU ) || + ip_block->version->major <8 || + ip_block->version->major >9 )) + goto disabled;
I would prefer to tie this to asic_type rather than gfx version. E.g.,
switch (adev->asic_type) {
case CHIP_TOPAZ:
case CHIP_TONGA:
case CHIP_FIJI:
case CHIP_POLARIS10:
case CHIP_POLARIS11:
case CHIP_POLARIS12:
case CHIP_VEGAM:
case CHIP_VEGA20:
case CHIP_VEGA10:
case CHIP_VEGA12:
break;
default:
goto disabled;
}Alex
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4
-1return true; + +disabled: +DRM_INFO ("GPU recovery disabled.\n" ); +return false; }/** -- 2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx