diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2018-10-22 17:12:39 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 14:21:23 -0500 |
commit | 3ba7b418f12b634b8920c979f5259013d40e38e2 (patch) | |
tree | fc464795f333c07b114e229d81cdb5329e87cf4b | |
parent | c66ed765a0a97b8900f37d4a71f1d75f52f56eeb (diff) |
drm/amdgpu: Enable default GPU reset for dGPU on gfx8/9 v3
After testing looks like these subset of ASICs has GPU reset
working for the most part. Enable reset due to job timeout.
v2: Switch from GFX version to ASIC type.
v3: Fix identation
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 30bc345d6fdf..416a67672f3d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -3295,13 +3295,35 @@ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev) | |||
3295 | return false; | 3295 | return false; |
3296 | } | 3296 | } |
3297 | 3297 | ||
3298 | if (amdgpu_gpu_recovery == 0 || (amdgpu_gpu_recovery == -1 && | 3298 | if (amdgpu_gpu_recovery == 0) |
3299 | !amdgpu_sriov_vf(adev))) { | 3299 | goto disabled; |
3300 | DRM_INFO("GPU recovery disabled.\n"); | 3300 | |
3301 | return false; | 3301 | if (amdgpu_sriov_vf(adev)) |
3302 | return true; | ||
3303 | |||
3304 | if (amdgpu_gpu_recovery == -1) { | ||
3305 | switch (adev->asic_type) { | ||
3306 | case CHIP_TOPAZ: | ||
3307 | case CHIP_TONGA: | ||
3308 | case CHIP_FIJI: | ||
3309 | case CHIP_POLARIS10: | ||
3310 | case CHIP_POLARIS11: | ||
3311 | case CHIP_POLARIS12: | ||
3312 | case CHIP_VEGAM: | ||
3313 | case CHIP_VEGA20: | ||
3314 | case CHIP_VEGA10: | ||
3315 | case CHIP_VEGA12: | ||
3316 | break; | ||
3317 | default: | ||
3318 | goto disabled; | ||
3319 | } | ||
3302 | } | 3320 | } |
3303 | 3321 | ||
3304 | return true; | 3322 | return true; |
3323 | |||
3324 | disabled: | ||
3325 | DRM_INFO("GPU recovery disabled.\n"); | ||
3326 | return false; | ||
3305 | } | 3327 | } |
3306 | 3328 | ||
3307 | /** | 3329 | /** |