drm/amd/amdgpu: debugfs SMC addresses are byte addresses
authorTom St Denis <tom.stdenis@amd.com>
Mon, 29 Aug 2016 12:39:29 +0000 (08:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Aug 2016 21:55:31 +0000 (17:55 -0400)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 847583d8a3b3c10f50222e1e658b8141d6a134e6..71fe5c15cca8b0729b6f0a16993c8f01c67f07ad 100644 (file)
@@ -2610,7 +2610,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
        while (size) {
                uint32_t value;
 
-               value = RREG32_SMC(*pos >> 2);
+               value = RREG32_SMC(*pos);
                r = put_user(value, (uint32_t *)buf);
                if (r)
                        return r;
@@ -2641,7 +2641,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
                if (r)
                        return r;
 
-               WREG32_SMC(*pos >> 2, value);
+               WREG32_SMC(*pos, value);
 
                result += 4;
                buf += 4;