[PATCH 04/66] drm/amdgpu: fill in IP versions from IP discovery table

Deucher, Alexander Alexander.Deucher at amd.com
Wed Sep 22 20:43:25 UTC 2021


[AMD Official Use Only]

Fixed locally.  Thanks!

Alex

________________________________
From: Kuehling, Felix <Felix.Kuehling at amd.com>
Sent: Wednesday, September 22, 2021 12:58 PM
To: Deucher, Alexander <Alexander.Deucher at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: Re: [PATCH 04/66] drm/amdgpu: fill in IP versions from IP discovery table

Am 2021-09-21 um 2:06 p.m. schrieb Alex Deucher:
> Prerequisite for using IP versions in the driver rather
> than asic type.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 67e7a46f5020..ff52fcce1f93 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -244,6 +244,11 @@ void amdgpu_discovery_fini(struct amdgpu_device *adev)
>        adev->mman.discovery_bin = NULL;
>  }
>
> +static u32 amdgpu_discovery_convert_version(u32 major, u32 minor, u32 revision)
> +{
> +     return (major << 16) | (minor << 8) | revision;

This does the same as the IP_VERSION macro defined in the previous
patch. Do you need this function at all?

Regards,
  Felix


> +}
> +
>  int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
>  {
>        struct binary_header *bhdr;
> @@ -316,8 +321,9 @@ int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
>                                                        hw_id_names[le16_to_cpu(ip->hw_id)]);
>                                        adev->reg_offset[hw_ip][ip->number_instance] =
>                                                ip->base_address;
> +                                     adev->ip_versions[hw_ip] =
> +                                             amdgpu_discovery_convert_version(ip->major, ip->minor, ip->revision);
>                                }
> -
>                        }
>
>                        ip_offset += sizeof(*ip) + 4 * (ip->num_base_address - 1);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210922/8607046a/attachment-0001.htm>


More information about the amd-gfx mailing list