diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2017-03-15 05:34:25 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-15 16:21:34 -0400 |
commit | 801a6aa9a63c90724e8899982ad8c7f16be1e2cd (patch) | |
tree | 9eb1f732473ce61d4232586ed4eecf30e26422a6 | |
parent | 18a8de1bc37e97dff1c96ee6cf49adbd02a0f775 (diff) |
drm/amd/amdgpu: Fix debugfs reg read/write address width
The MMIO space is wider now so we mask the lower 22 bits
instead of 18.
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 4120b351a8e5..a3a105ec99e2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2590,7 +2590,7 @@ static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf, | |||
2590 | use_bank = 0; | 2590 | use_bank = 0; |
2591 | } | 2591 | } |
2592 | 2592 | ||
2593 | *pos &= 0x3FFFF; | 2593 | *pos &= (1UL << 22) - 1; |
2594 | 2594 | ||
2595 | if (use_bank) { | 2595 | if (use_bank) { |
2596 | if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) || | 2596 | if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) || |
@@ -2666,7 +2666,7 @@ static ssize_t amdgpu_debugfs_regs_write(struct file *f, const char __user *buf, | |||
2666 | use_bank = 0; | 2666 | use_bank = 0; |
2667 | } | 2667 | } |
2668 | 2668 | ||
2669 | *pos &= 0x3FFFF; | 2669 | *pos &= (1UL << 22) - 1; |
2670 | 2670 | ||
2671 | if (use_bank) { | 2671 | if (use_bank) { |
2672 | if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) || | 2672 | if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) || |