drm/amdgpu: invert the logic in amdgpu_device_should_recover_gpu()
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: invert the logic in amdgpu_device_should_recover_gpu()
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 +++++++++------------- 1 file changed, 17 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +17 -27
@@ -4453,34 +4453,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 ; } }
Signature · 1 line
2.33.1
[AMD Official Use Only]
Quoted 79 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, January 12, 2022 6:45 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: invert the logic inamdgpu_device_should_recover_gpu()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.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 +++++++++------------(quoted diff) +0
-1- 1 file changed, 17 insertions(+), 27 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +17
-28@@ -4453,34 +4453,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 ; } } --2.33.1
[Public]
Regards,
Guchun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, January 12, 2022 6:45 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: invert the logic in amdgpu_device_should_recover_gpu()
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 +++++++++------------- 1 file changed, 17 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +17 -27
@@ -4453,34 +4453,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 ; } }
--
2.33.1
Am 11.01.22 um 23:45 schrieb Alex Deucher:
Quoted 5 lines
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.
Signed-off-by Alex Deucher <[email protected]>
Quoted 60 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 +++++++++------------- 1 file changed, 17 insertions(+), 27 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +17
-27@@ -4453,34 +4453,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 ; } }