drm/amd/amdgpu: Mask rptr as well in ring debugfs
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Mask rptr as well in ring debugfs
The read/write pointers on sdma4 devices increment beyond the ring size and should be masked. Tested on my Ryzen 2400G.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -1
@@ -484,7 +484,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, result =0 ;if (*pos <12 ) { - early[0 ] =amdgpu_ring_get_rptr (ring); + early[0 ] =amdgpu_ring_get_rptr (ring) & ring->buf_mask; early[1 ] =amdgpu_ring_get_wptr (ring) & ring->buf_mask; early[2 ] = ring->wptr & ring->buf_mask;for (i = *pos /4 ; i <3 && size; i++) {
Signature · 6 lines
2.14.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]
Alex Deucher
Reviewed-byQuoted 5 lines · Tom St Denis
The read/write pointers on sdma4 devices increment beyond the ring size and should be masked. Tested on my Ryzen 2400G.
Signed-off-by Tom St Denis <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1
-2@@ -484,7 +484,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, result =0 ;if (*pos <12 ) { - early[0 ] =amdgpu_ring_get_rptr (ring); + early[0 ] =amdgpu_ring_get_rptr (ring) & ring->buf_mask; early[1 ] =amdgpu_ring_get_wptr (ring) & ring->buf_mask; early[2 ] = ring->wptr & ring->buf_mask;for (i = *pos /4 ; i <3 && size; i++) { --2.14.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
Christian König
Reviewed-byAm 01.03.2018 um 15:43 schrieb Tom St Denis:
Quoted 5 lines
The read/write pointers on sdma4 devices increment beyond the ring size and should be masked. Tested on my Ryzen 2400G.
Signed-off-by Tom St Denis <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, · line 490
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1
-1@@ -484,7 +484,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, result =0 ;if (*pos <12 ) { - early[0 ] =amdgpu_ring_get_rptr (ring); + early[0 ] =amdgpu_ring_get_rptr (ring) & ring->buf_mask; early[1 ] =amdgpu_ring_get_wptr (ring) & ring->buf_mask; early[2 ] = ring->wptr & ring->buf_mask;for (i = *pos /4 ; i <3 && size; i++) {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx