Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 966f1d8f authored by Xiaojie Yuan's avatar Xiaojie Yuan Committed by Alex Deucher
Browse files

drm/amdgpu/discovery: stop converting the units of base addresses



the unit is already in dword

Signed-off-by: default avatarXiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6a8ee025
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -300,11 +300,11 @@ int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)


					for (k = 0; k < num_base_address; k++) {
					for (k = 0; k < num_base_address; k++) {
						/*
						/*
						 * convert the endianness and unit (in dword) of base addresses in place,
						 * convert the endianness of base addresses in place,
						 * so that we don't need to convert them when accessing adev->reg_offset.
						 * so that we don't need to convert them when accessing adev->reg_offset.
						 */
						 */
						ip->base_address[k] = le32_to_cpu(ip->base_address[k]) >> 2;
						ip->base_address[k] = le32_to_cpu(ip->base_address[k]);
						DRM_DEBUG("\t0x%08x\n", ip->base_address[k] << 2);
						DRM_DEBUG("\t0x%08x\n", ip->base_address[k]);
					}
					}


					adev->reg_offset[hw_ip][ip->number_instance] =
					adev->reg_offset[hw_ip][ip->number_instance] =