drm/radeon: improve ring debugfs printing
Print 32dword before last know rptr as problem most likely comes from previous command. Also small cosmetic change to the printing. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
74795486b2
commit
4d0091904c
|
@ -770,22 +770,28 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
|
||||||
int ridx = *(int*)node->info_ent->data;
|
int ridx = *(int*)node->info_ent->data;
|
||||||
struct radeon_ring *ring = &rdev->ring[ridx];
|
struct radeon_ring *ring = &rdev->ring[ridx];
|
||||||
unsigned count, i, j;
|
unsigned count, i, j;
|
||||||
|
u32 tmp;
|
||||||
|
|
||||||
radeon_ring_free_size(rdev, ring);
|
radeon_ring_free_size(rdev, ring);
|
||||||
count = (ring->ring_size / 4) - ring->ring_free_dw;
|
count = (ring->ring_size / 4) - ring->ring_free_dw;
|
||||||
seq_printf(m, "wptr(0x%04x): 0x%08x\n", ring->wptr_reg, RREG32(ring->wptr_reg));
|
tmp = RREG32(ring->wptr_reg) >> ring->ptr_reg_shift;
|
||||||
seq_printf(m, "rptr(0x%04x): 0x%08x\n", ring->rptr_reg, RREG32(ring->rptr_reg));
|
seq_printf(m, "wptr(0x%04x): 0x%08x [%5d]\n", ring->wptr_reg, tmp, tmp);
|
||||||
|
tmp = RREG32(ring->rptr_reg) >> ring->ptr_reg_shift;
|
||||||
|
seq_printf(m, "rptr(0x%04x): 0x%08x [%5d]\n", ring->rptr_reg, tmp, tmp);
|
||||||
if (ring->rptr_save_reg) {
|
if (ring->rptr_save_reg) {
|
||||||
seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg,
|
seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg,
|
||||||
RREG32(ring->rptr_save_reg));
|
RREG32(ring->rptr_save_reg));
|
||||||
}
|
}
|
||||||
seq_printf(m, "driver's copy of the wptr: 0x%08x\n", ring->wptr);
|
seq_printf(m, "driver's copy of the wptr: 0x%08x [%5d]\n", ring->wptr, ring->wptr);
|
||||||
seq_printf(m, "driver's copy of the rptr: 0x%08x\n", ring->rptr);
|
seq_printf(m, "driver's copy of the rptr: 0x%08x [%5d]\n", ring->rptr, ring->rptr);
|
||||||
seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw);
|
seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw);
|
||||||
seq_printf(m, "%u dwords in ring\n", count);
|
seq_printf(m, "%u dwords in ring\n", count);
|
||||||
i = ring->rptr;
|
/* print 8 dw before current rptr as often it's the last executed
|
||||||
for (j = 0; j <= count; j++) {
|
* packet that is the root issue
|
||||||
seq_printf(m, "r[%04d]=0x%08x\n", i, ring->ring[i]);
|
*/
|
||||||
|
i = (ring->rptr + ring->ptr_mask + 1 - 32) & ring->ptr_mask;
|
||||||
|
for (j = 0; j <= (count + 32); j++) {
|
||||||
|
seq_printf(m, "r[%5d]=0x%08x\n", i, ring->ring[i]);
|
||||||
i = (i + 1) & ring->ptr_mask;
|
i = (i + 1) & ring->ptr_mask;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue