<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Fixed locally. Thanks!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kuehling, Felix <Felix.Kuehling@amd.com><br>
<b>Sent:</b> Wednesday, September 22, 2021 12:58 PM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> Re: [PATCH 04/66] drm/amdgpu: fill in IP versions from IP discovery table</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 2021-09-21 um 2:06 p.m. schrieb Alex Deucher:<br>
> Prerequisite for using IP versions in the driver rather<br>
> than asic type.<br>
><br>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 +++++++-<br>
> 1 file changed, 7 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> index 67e7a46f5020..ff52fcce1f93 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> @@ -244,6 +244,11 @@ void amdgpu_discovery_fini(struct amdgpu_device *adev)<br>
> adev->mman.discovery_bin = NULL;<br>
> }<br>
> <br>
> +static u32 amdgpu_discovery_convert_version(u32 major, u32 minor, u32 revision)<br>
> +{<br>
> + return (major << 16) | (minor << 8) | revision;<br>
<br>
This does the same as the IP_VERSION macro defined in the previous<br>
patch. Do you need this function at all?<br>
<br>
Regards,<br>
Felix<br>
<br>
<br>
> +}<br>
> +<br>
> int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)<br>
> {<br>
> struct binary_header *bhdr;<br>
> @@ -316,8 +321,9 @@ int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)<br>
> hw_id_names[le16_to_cpu(ip->hw_id)]);<br>
> adev->reg_offset[hw_ip][ip->number_instance] =<br>
> ip->base_address;<br>
> + adev->ip_versions[hw_ip] =<br>
> + amdgpu_discovery_convert_version(ip->major, ip->minor, ip->revision);<br>
> }<br>
> -<br>
> }<br>
> <br>
> ip_offset += sizeof(*ip) + 4 * (ip->num_base_address - 1);<br>
</div>
</span></font></div>
</div>
</body>
</html>