From: Jerome Glisse Subject: [PATCH] drm/radeon/kms: r600 dump last 64 dwords of ring. Date: Fri, 4 Jun 2010 13:28:55 +0200 Message-ID: <1275650935-7656-1-git-send-email-jglisse@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from protox.org (nox2.protox.org [95.130.11.66]) by gabe.freedesktop.org (Postfix) with ESMTP id 14D4C9E76C for ; Fri, 4 Jun 2010 04:27:51 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@gmail.com Cc: Jerome Glisse , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Instead of dumping unprocessed dwords, dump the last 64 dwords of the ring. This make debugging of some case easier. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/r600.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index f68cc92..1537079 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -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; -- 1.7.0.1