summaryrefslogtreecommitdiff
path: root/src/glamo-cmdq.c
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2009-01-12 17:35:39 +0000
committerGraeme Gregory <dp@xora.org.uk>2009-01-12 17:35:39 +0000
commitefb1e05664b32348a9993989b28c6d459a9f48dd (patch)
treebaa612d74f609e6295ac74719d9ec6dbf6eff23e /src/glamo-cmdq.c
parentbbe679bd3b3ddff5ab4b641c46a797da794a1c0d (diff)
glamo* : more debug
Diffstat (limited to 'src/glamo-cmdq.c')
-rw-r--r--src/glamo-cmdq.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/glamo-cmdq.c b/src/glamo-cmdq.c
index bcf8472..68c2611 100644
--- a/src/glamo-cmdq.c
+++ b/src/glamo-cmdq.c
@@ -278,7 +278,7 @@ GLAMOEngineWaitReal(GlamoPtr pGlamo,
GLAMO_LOG_ERROR("Timeout idling accelerator "
"(0x%x), resetting...\n",
status);
- /*GLAMODumpRegs(pGlamo, 0x1600, 0x1612);*/
+ GLAMODumpRegs(pGlamo, 0x1600, 0x1612);
GLAMOEngineReset(pGlamo, GLAMO_ENGINE_CMDQ);
GLAMOEngineEnable(pGlamo, GLAMO_ENGINE_2D);
GLAMOEngineReset(pGlamo, GLAMO_ENGINE_2D);
@@ -338,7 +338,7 @@ GLAMODispatchCMDQCache(GlamoPtr pGlamo)
pGlamo->ring_write++; addr++;
if (pGlamo->ring_write >= ring_count) {
GLAMO_LOG_ERROR("wrapped over ring_write\n");
- /*GLAMODumpRegs(pGlamo, 0x1600, 0x1612);*/
+ GLAMODumpRegs(pGlamo, 0x1600, 0x1612);
pGlamo->ring_write = 0;
}
count--;
@@ -346,7 +346,7 @@ GLAMODispatchCMDQCache(GlamoPtr pGlamo)
if (TIMEDOUT()) {
GLAMO_LOG_ERROR("Timeout submitting packets, "
"resetting...\n");
- /*GLAMODumpRegs(pGlamo, 0x1600, 0x1612);*/
+ GLAMODumpRegs(pGlamo, 0x1600, 0x1612);
GLAMOEngineReset(pGlamo, GLAMO_ENGINE_CMDQ);
GLAMODrawSetup(pGlamo);
}
@@ -380,6 +380,9 @@ GLAMOCMDQResetCP(GlamoPtr pGlamo)
int cq_len = CQ_LEN;
CARD32 queue_offset = 0;
+ xf86DrvMsg(0, X_WARNING,
+ "GLAMOCMDQResetCP %x %d\n", pGlamo->ring_addr, pGlamo->ring_len );
+
/* make the decoder happy? */
memset((char*)pGlamo->ring_addr, 0, pGlamo->ring_len+2);
@@ -475,3 +478,16 @@ GLAMOCMQCacheTeardown(GlamoPtr pGlamo)
xfree(pGlamo->cmd_queue_cache);
pGlamo->cmd_queue_cache = NULL;
}
+
+void GLAMODumpRegs(GlamoPtr pGlamo,
+ CARD16 from,
+ CARD16 to)
+{
+ int i=0;
+ for (i=from; i <= to; i += 2) {
+ xf86DrvMsg(0, X_WARNING,"reg:%#x, val:%#x\n",
+ pGlamo->reg_base+i,
+ *(VOL16*)(pGlamo->reg_base+i));
+ }
+}
+