summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glamo-cmdq.c22
-rw-r--r--src/glamo-draw.c2
-rw-r--r--src/glamo.h6
3 files changed, 23 insertions, 7 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));
+ }
+}
+
diff --git a/src/glamo-draw.c b/src/glamo-draw.c
index 60353da..4809fb7 100644
--- a/src/glamo-draw.c
+++ b/src/glamo-draw.c
@@ -203,7 +203,7 @@ GLAMODrawExaInit(ScreenPtr pScreen, ScrnInfoPtr pScrn)
if(!exa) return FALSE;
exa->memoryBase = pGlamo->fbstart;
- exa->memorySize = 1024 * 1024 * 8;
+ exa->memorySize = 1024 * 1024 * 4;
/*exa->offScreenBase = pGlamo->fboff;*/
exa->offScreenBase = pScrn->virtualX * pScrn->virtualY * 2;
diff --git a/src/glamo.h b/src/glamo.h
index 115d539..7738bc5 100644
--- a/src/glamo.h
+++ b/src/glamo.h
@@ -203,9 +203,9 @@ void
GLAMOUnmapReg(KdCardInfo *card, GLAMOCardInfo *glamoc);
void
-GLAMODumpRegs(GLAMOScreenInfo *glamos,
- CARD16 from,
- CARD16 to);
+GLAMODumpRegs(GlamoPtr pGlamo,
+ CARD16 from,
+ CARD16 to)
#endif