[AMD Official Use Only]

Reviewed-by: Aaron Liu <aaron....@amd.com>

--
Best Regards
Aaron Liu

> -----Original Message-----
> From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Saturday, January 22, 2022 4:22 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <alexander.deuc...@amd.com>
> Subject: [PATCH 1/5] drm/amdgpu: set APU flag based on IP discovery table
> 
> Use the IP versions to set the APU flag when necessary.
> 
> Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index e6a26b554254..ddbe13c9e4c7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -1253,6 +1253,19 @@ int amdgpu_discovery_set_ip_blocks(struct
> amdgpu_device *adev)
>               return -EINVAL;
>       }
> 
> +     switch (adev->ip_versions[GC_HWIP][0]) {
> +     case IP_VERSION(9, 1, 0):
> +     case IP_VERSION(9, 2, 2):
> +     case IP_VERSION(9, 3, 0):
> +     case IP_VERSION(10, 1, 3):
> +     case IP_VERSION(10, 3, 1):
> +     case IP_VERSION(10, 3, 3):
> +             adev->flags |= AMD_IS_APU;
> +             break;
> +     default:
> +             break;
> +     }
> +
>       if (adev->ip_versions[XGMI_HWIP][0] == IP_VERSION(4, 8, 0))
>               adev->gmc.xgmi.supported = true;
> 
> --
> 2.34.1

Reply via email to