* [PATCH] drm/amd/amdgpu: Fix debugfs reg read/write address width
@ 2017-03-15 9:35 Tom St Denis
[not found] ` <20170315093539.30142-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Tom St Denis @ 2017-03-15 9:35 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis
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>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
1 file 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 47d1dcc85b18..89504a883791 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2944,7 +2944,7 @@ static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf,
use_bank = 0;
}
- *pos &= 0x3FFFF;
+ *pos &= (1UL << 22) - 1;
if (use_bank) {
if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
@@ -3020,7 +3020,7 @@ static ssize_t amdgpu_debugfs_regs_write(struct file *f, const char __user *buf,
use_bank = 0;
}
- *pos &= 0x3FFFF;
+ *pos &= (1UL << 22) - 1;
if (use_bank) {
if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
--
2.12.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: Fix debugfs reg read/write address width
[not found] ` <20170315093539.30142-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-15 9:37 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2017-03-15 9:37 UTC (permalink / raw)
To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis
Am 15.03.2017 um 10:35 schrieb Tom St Denis:
> 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>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
> 1 file 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 47d1dcc85b18..89504a883791 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2944,7 +2944,7 @@ static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf,
> use_bank = 0;
> }
>
> - *pos &= 0x3FFFF;
> + *pos &= (1UL << 22) - 1;
>
> if (use_bank) {
> if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
> @@ -3020,7 +3020,7 @@ static ssize_t amdgpu_debugfs_regs_write(struct file *f, const char __user *buf,
> use_bank = 0;
> }
>
> - *pos &= 0x3FFFF;
> + *pos &= (1UL << 22) - 1;
>
> if (use_bank) {
> if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-15 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 9:35 [PATCH] drm/amd/amdgpu: Fix debugfs reg read/write address width Tom St Denis
[not found] ` <20170315093539.30142-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-03-15 9:37 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.