diff options
| author | Tom St Denis <[email protected]> | 2017-03-29 17:01:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-03-30 03:55:53 +0000 |
| commit | ec63982e90a8793a838dfba9037bde597bb565e1 (patch) | |
| tree | c984d69c0a50d7747c2bec0d7d3fab667b9d9830 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
| parent | drm/amdgpu: Fix multi-level page table bugs for large BOs v3 (diff) | |
| download | kernel-ec63982e90a8793a838dfba9037bde597bb565e1.tar.gz kernel-ec63982e90a8793a838dfba9037bde597bb565e1.zip | |
drm/amd/amdgpu: Correct ring wptr address in debugfs (v2)
On gfx9 hardware the value is not wrapped and is a 64-bit value. So
we reduce it modulo the ring size.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
(v2) use buf_mask instead of computing on the fly
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 783d52a007ea..6a85db0c0bc3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -320,8 +320,8 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, if (*pos < 12) { early[0] = amdgpu_ring_get_rptr(ring); - early[1] = amdgpu_ring_get_wptr(ring); - early[2] = ring->wptr; + 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++) { r = put_user(early[i], (uint32_t *)buf); if (r) |
