Skip to contentSkip to conversation

drm/amd/amdgpu: debugfs SMC addresses are byte addresses

PATCH In review Tom St Denis 3 participants 3 messages Aug 29, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: debugfs SMC addresses are byte addresses

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index 1b31a7c1d217..288cfb4fa2ba 100644
@@ -2678,7 +2678,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;
@@ -2709,7 +2709,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;
Signature · 6 lines
2.9.3

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw

Am 29.08.2016 um 15:06 schrieb Tom St Denis:

Quoted 1 line
Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 1b31a7c1d217..288cfb4fa2ba 100644
@@ -2678,7 +2678,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;

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user * · line 2715

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -2709,7 +2709,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;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Alex Deucher
#3 lore raw
In reply to a message not in the archive
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Monday, August 29, 2016 9:06 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] drm/amd/amdgpu: debugfs SMC addresses are byte addresses

FWIW, all of the indirect register apertures use byte aligned indicies.

Alex

Quoted 32 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 1b31a7c1d217..288cfb4fa2ba 100644
@@ -2678,7 +2678,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)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 			return r;
@@ -2709,7 +2709,7 @@ static ssize_t

amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -2
 		if (r)
 			return r;
 
-		WREG32_SMC(*pos >> 2, value);
+		WREG32_SMC(*pos, value);
 
 		result += 4;
 		buf += 4;
--

2.9.3

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx