[PATCH] drm/amdgpu: simplify the logic in amdgpu_device_parse_gpu_info_fw()

Alex Deucher alexdeucher at gmail.com
Tue May 31 21:13:26 UTC 2022


Ping?

On Tue, May 24, 2022 at 10:09 PM Alex Deucher <alexander.deucher at amd.com> wrote:
>
> Drop all of the extra cases in the default case.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 ----------------------
>  1 file changed, 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4daa0e893965..7f7d475c46b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1942,35 +1942,6 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
>         }
>
>         switch (adev->asic_type) {
> -#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_BONAIRE:
> -       case CHIP_HAWAII:
> -       case CHIP_KAVERI:
> -       case CHIP_KABINI:
> -       case CHIP_MULLINS:
> -#endif
> -       case CHIP_TOPAZ:
> -       case CHIP_TONGA:
> -       case CHIP_FIJI:
> -       case CHIP_POLARIS10:
> -       case CHIP_POLARIS11:
> -       case CHIP_POLARIS12:
> -       case CHIP_VEGAM:
> -       case CHIP_CARRIZO:
> -       case CHIP_STONEY:
> -       case CHIP_VEGA20:
> -       case CHIP_ALDEBARAN:
> -       case CHIP_SIENNA_CICHLID:
> -       case CHIP_NAVY_FLOUNDER:
> -       case CHIP_DIMGREY_CAVEFISH:
> -       case CHIP_BEIGE_GOBY:
>         default:
>                 return 0;
>         case CHIP_VEGA10:
> --
> 2.35.3
>


More information about the amd-gfx mailing list