drm/amdgpu: invert the logic in amdgpu_device_should_recover_gpu()
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jan 2022 22:41:44 +0000 (17:41 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jan 2022 23:06:44 +0000 (18:06 -0500)
Rather than opting into GPU recovery support, default to on, and
opt out if it's not working on a particular GPU.  This avoids the
need to add new asics to this list since this is a core feature.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@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

index cde3412..c4f3c88 100644 (file)
@@ -4450,34 +4450,24 @@ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev)
 
        if (amdgpu_gpu_recovery == -1) {
                switch (adev->asic_type) {
-               case CHIP_BONAIRE:
-               case CHIP_HAWAII:
-               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:
-               case CHIP_RAVEN:
-               case CHIP_ARCTURUS:
-               case CHIP_RENOIR:
-               case CHIP_NAVI10:
-               case CHIP_NAVI14:
-               case CHIP_NAVI12:
-               case CHIP_SIENNA_CICHLID:
-               case CHIP_NAVY_FLOUNDER:
-               case CHIP_DIMGREY_CAVEFISH:
-               case CHIP_BEIGE_GOBY:
-               case CHIP_VANGOGH:
-               case CHIP_ALDEBARAN:
-               case CHIP_YELLOW_CARP:
-                       break;
-               default:
+#ifdef CONFIG_DRM_AMDGPU_SI
+               case CHIP_VERDE:
+               case CHIP_TAHITI:
+               case CHIP_PITCAIRN:
+               case CHIP_OLAND:
+               case CHIP_HAINAN:
+#endif
+#ifdef CONFIG_DRM_AMDGPU_CIK
+               case CHIP_KAVERI:
+               case CHIP_KABINI:
+               case CHIP_MULLINS:
+#endif
+               case CHIP_CARRIZO:
+               case CHIP_STONEY:
+               case CHIP_CYAN_SKILLFISH:
                        goto disabled;
+               default:
+                       break;
                }
        }