From: Likun Gao <[email protected]>

Correct the base addr value shown on sysfs with ignore reg_base_64,
since the base_addr value have been over write when discovery_init.

Signed-off-by: Likun Gao <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 3a03e024ba443..6f9e2b9d80da5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1216,13 +1216,8 @@ static int amdgpu_discovery_sysfs_ips(struct 
amdgpu_device *adev,
                                        ip_hw_instance->num_instance);
                        ip_hw_instance->num_base_addresses = 
ip->num_base_address;
 
-                       for (kk = 0; kk < ip_hw_instance->num_base_addresses; 
kk++) {
-                               if (reg_base_64)
-                                       ip_hw_instance->base_addr[kk] =
-                                               
lower_32_bits(le64_to_cpu(ip->base_address_64[kk])) & 0x3FFFFFFF;
-                               else
-                                       ip_hw_instance->base_addr[kk] = 
ip->base_address[kk];
-                       }
+                       for (kk = 0; kk < ip_hw_instance->num_base_addresses; 
kk++)
+                               ip_hw_instance->base_addr[kk] = 
ip->base_address[kk];
 
                        kobject_init(&ip_hw_instance->kobj, 
&ip_hw_instance_ktype);
                        ip_hw_instance->kobj.kset = &ip_hw_id->hw_id_kset;
-- 
2.53.0

Reply via email to