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.deuc...@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

                                }
                        }

Reply via email to