[PATCH 52/66] drm/amdgpu: store all instances of IPs in the IP version table

Lazar, Lijo lijo.lazar at amd.com
Wed Sep 22 08:45:15 UTC 2021



On 9/22/2021 2:06 PM, Lazar, Lijo wrote:
> 
> 
> On 9/21/2021 11:37 PM, Alex Deucher wrote:
>> Use the instance to increment the entry in the table.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
>> index e3b4578872f1..572a634f7a1e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
>> @@ -364,8 +364,10 @@ 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);
>> +                    adev->ip_versions[hw_ip + ip->number_instance] =
>> +                        amdgpu_discovery_convert_version(ip->major,
>> +                                         ip->minor,
>> +                                         ip->revision);
> 
> There could be multiple instances with the same hardware id, right? For 
> ex: SDMA in ARCT/ALDE. They don't have discovery table now, regardless 
> does this hold good in such cases?
> 
> Thanks,
> Lijo
> 

Never mind, found that HWIP used here is different from HW_ID.

Thanks,
Lijo

>>                   }
>>               }
>>


More information about the amd-gfx mailing list