Commit d57e24aa authored by Candice Li's avatar Candice Li Committed by Alex Deucher

drm/amdgpu: Update amdgpu_device_indirect_r/wreg_ext

Only calculate pcie_index_hi for register address greater than 32bits.
Signed-off-by: default avatarCandice Li <candice.li@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a76b2870
...@@ -572,7 +572,7 @@ u32 amdgpu_device_indirect_rreg_ext(struct amdgpu_device *adev, ...@@ -572,7 +572,7 @@ u32 amdgpu_device_indirect_rreg_ext(struct amdgpu_device *adev,
pcie_index = adev->nbio.funcs->get_pcie_index_offset(adev); pcie_index = adev->nbio.funcs->get_pcie_index_offset(adev);
pcie_data = adev->nbio.funcs->get_pcie_data_offset(adev); pcie_data = adev->nbio.funcs->get_pcie_data_offset(adev);
if (adev->nbio.funcs->get_pcie_index_hi_offset) if ((reg_addr >> 32) && (adev->nbio.funcs->get_pcie_index_hi_offset))
pcie_index_hi = adev->nbio.funcs->get_pcie_index_hi_offset(adev); pcie_index_hi = adev->nbio.funcs->get_pcie_index_hi_offset(adev);
else else
pcie_index_hi = 0; pcie_index_hi = 0;
...@@ -728,7 +728,7 @@ void amdgpu_device_indirect_wreg_ext(struct amdgpu_device *adev, ...@@ -728,7 +728,7 @@ void amdgpu_device_indirect_wreg_ext(struct amdgpu_device *adev,
pcie_index = adev->nbio.funcs->get_pcie_index_offset(adev); pcie_index = adev->nbio.funcs->get_pcie_index_offset(adev);
pcie_data = adev->nbio.funcs->get_pcie_data_offset(adev); pcie_data = adev->nbio.funcs->get_pcie_data_offset(adev);
if (adev->nbio.funcs->get_pcie_index_hi_offset) if ((reg_addr >> 32) && (adev->nbio.funcs->get_pcie_index_hi_offset))
pcie_index_hi = adev->nbio.funcs->get_pcie_index_hi_offset(adev); pcie_index_hi = adev->nbio.funcs->get_pcie_index_hi_offset(adev);
else else
pcie_index_hi = 0; pcie_index_hi = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment