drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie
authorKevin Wang <kevin1.wang@amd.com>
Tue, 2 Mar 2021 07:54:00 +0000 (15:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Mar 2021 04:05:16 +0000 (23:05 -0500)
the register offset isn't needed division by 4 to pass RREG32_PCIE()

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

index 0a25fecf488aba6763798bb50292ae334b994080..43059ead733bdc60a86557e5d1b838971794da54 100644 (file)
@@ -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);
@@ -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;