Skip to content

Commit

Permalink
drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie
Browse files Browse the repository at this point in the history
the register offset isn't needed division by 4 to pass RREG32_PCIE()

Signed-off-by: Kevin Wang <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
  • Loading branch information
Kevin Wang authored and alexdeucher committed Mar 4, 2021
1 parent b934dd9 commit 1aa4690
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
while (size) {
uint32_t value;

value = RREG32_PCIE(*pos >> 2);
value = RREG32_PCIE(*pos);
r = put_user(value, (uint32_t *)buf);
if (r) {
pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
Expand Down Expand Up @@ -424,7 +424,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
return r;
}

WREG32_PCIE(*pos >> 2, value);
WREG32_PCIE(*pos, value);

result += 4;
buf += 4;
Expand Down

0 comments on commit 1aa4690

Please sign in to comment.