Skip to contentSkip to conversation

drm/radeon/kms: r600 dump last 64 dwords of ring.

PATCH In review Jerome Glisse 3 participants 4 messages Jun 4, 2010

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

PATCH 1/1 drm/radeon/kms: r600 dump last 64 dwords of ring.

Instead of dumping unprocessed dwords, dump the last 64 dwords of the ring. This make debugging of some case easier.

---
 drivers/gpu/drm/radeon/r600.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/r600.c +3 -3
index f68cc92..1537079 100644
@@ -3371,9 +3371,9 @@ static int r600_debugfs_cp_ring_info(struct seq_file *m, void *data)
 	seq_printf(m, "driver's copy of the CP_RB_RPTR 0x%08x\n", rdev->cp.rptr);
 	seq_printf(m, "%u free dwords in ring\n", rdev->cp.ring_free_dw);
 	seq_printf(m, "%u dwords in ring\n", count);
-	i = rdev->cp.rptr;
-	for (j = 0; j <= count; j++) {
-		seq_printf(m, "r[%04d]=0x%08x\n", i, rdev->cp.ring[i]);
+	i = (rdev->cp.wptr + (rdev->cp.ring_size / 4) - 64) & rdev->cp.ptr_mask;
+	for (j = 0; j <= 64; j++) {
+		seq_printf(m, "r[%04d]=0x%08X\n", i, rdev->cp.ring[i]);
 		i = (i + 1) & rdev->cp.ptr_mask;
 	}
 	return 0;
Signature · 1 line
1.7.0.1
#1 lore raw

2010/6/4 Jerome Glisse <[email protected]>:

Quoted 26 lines

Instead of dumping unprocessed dwords, dump the last 64 dwords of the ring. This make debugging of some case easier.

---
 drivers/gpu/drm/radeon/r600.c |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/r600.c +3 -4
index f68cc92..1537079 100644
@@ -3371,9 +3371,9 @@ static int r600_debugfs_cp_ring_info(struct seq_file *m, void *data)
        seq_printf(m, "driver's copy of the CP_RB_RPTR 0x%08x\n", rdev->cp.rptr);
        seq_printf(m, "%u free dwords in ring\n", rdev->cp.ring_free_dw);
        seq_printf(m, "%u dwords in ring\n", count);
-       i = rdev->cp.rptr;
-       for (j = 0; j <= count; j++) {
-               seq_printf(m, "r[%04d]=0x%08x\n", i, rdev->cp.ring[i]);
+       i = (rdev->cp.wptr + (rdev->cp.ring_size / 4) - 64) & rdev->cp.ptr_mask;
+       for (j = 0; j <= 64; j++) {
+               seq_printf(m, "r[%04d]=0x%08X\n", i, rdev->cp.ring[i]);
                i = (i + 1) & rdev->cp.ptr_mask;
        }
        return 0;
--
Quoted 1 line

1.7.0.1

What about same for r1xx-r5xx? Could you care?

Signature · 5 lines
Rafał
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 22 lines · Rafał Miłecki

2010/6/4 Jerome Glisse <[email protected]>:

Quoted 21 lines

Instead of dumping unprocessed dwords, dump the last 64 dwords of the ring. This make debugging of some case easier.

---
 drivers/gpu/drm/radeon/r600.c |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/r600.c +2 -3
index f68cc92..1537079 100644
@@ -3371,9 +3371,9 @@ static int r600_debugfs_cp_ring_info(struct seq_file *m, void *data)
        seq_printf(m, "driver's copy of the CP_RB_RPTR 0x%08x\n", rdev->cp.rptr);
        seq_printf(m, "%u free dwords in ring\n", rdev->cp.ring_free_dw);
        seq_printf(m, "%u dwords in ring\n", count);
-       i = rdev->cp.rptr;
-       for (j = 0; j <= count; j++) {
-               seq_printf(m, "r[%04d]=0x%08x\n", i, rdev->cp.ring[i]);
+       i = (rdev->cp.wptr + (rdev->cp.ring_size / 4) - 64) & rdev->cp.ptr_mask;
+       for (j = 0; j <= 64; j++) {
Quoted 11 lines
Quoted 6 lines
drivers/gpu/drm/radeon/r600.c +1 -1
+               seq_printf(m, "r[%04d]=0x%08X\n", i, rdev->cp.ring[i]);
                i = (i + 1) & rdev->cp.ptr_mask;
        }
        return 0;
--

1.7.0.1

What about same for r1xx-r5xx? Could you care?

Signature · 1 line
Rafał

Yes will do the patch, sorry i was working on r6xx bug at the time i did this patch.

Cheers,
Jerome
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

W dniu 4 czerwca 2010 21:55 użytkownik Jerome Glisse

Quoted 32 lines · <[email protected]> napisał:
Quoted 31 lines · Rafał Miłecki

2010/6/4 Jerome Glisse <[email protected]>:

Quoted 26 lines

Instead of dumping unprocessed dwords, dump the last 64 dwords of the ring. This make debugging of some case easier.

---
 drivers/gpu/drm/radeon/r600.c |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/r600.c +3 -4
index f68cc92..1537079 100644
@@ -3371,9 +3371,9 @@ static int r600_debugfs_cp_ring_info(struct seq_file *m, void *data)
        seq_printf(m, "driver's copy of the CP_RB_RPTR 0x%08x\n", rdev->cp.rptr);
        seq_printf(m, "%u free dwords in ring\n", rdev->cp.ring_free_dw);
        seq_printf(m, "%u dwords in ring\n", count);
-       i = rdev->cp.rptr;
-       for (j = 0; j <= count; j++) {
-               seq_printf(m, "r[%04d]=0x%08x\n", i, rdev->cp.ring[i]);
+       i = (rdev->cp.wptr + (rdev->cp.ring_size / 4) - 64) & rdev->cp.ptr_mask;
+       for (j = 0; j <= 64; j++) {
+               seq_printf(m, "r[%04d]=0x%08X\n", i, rdev->cp.ring[i]);
                i = (i + 1) & rdev->cp.ptr_mask;
        }
        return 0;
--
Quoted 1 line

1.7.0.1

What about same for r1xx-r5xx? Could you care?

Quoted 5 lines
Quoted 2 lines

--
Rafał

Yes will do the patch, sorry i was working on r6xx bug at the time i did this patch.

Thanks :)

Signature · 5 lines
Rafał
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel