summaryrefslogtreecommitdiff
path: root/src/smi_driver.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-19 21:15:01 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-19 21:15:01 -0200
commit7f252345c0c6b260c5b37aff98a22679eb5c6c82 (patch)
tree7267c7e5a1c35cb4791334554fe657a552724eb3 /src/smi_driver.c
parent6a91bcc111902c45cc75c865893848b7c6c0a0b1 (diff)
Enable the SMI 501/502 command list interpreter in a "debug" build.
To enable it, set SMI501_CLI_DEBUG to 1 in smi.h, and use Option "AcellMethod "EXA" in the Device section of /etc/X11/xorg.conf This code is enabled mainly for debug purposes. To make if have an actual performance gain (like when using a sm50x with a "low profile" "main" processor") it should be required to actually do busy loops in kernel mode (and hope the costs of context switch will pay it). In kernel mode it is possible to wait for an interrupt being triggered when the command list is processed, or when the 2d engine is idle. This commit should be functional, but, mainly due to debug messages, should be significantly slower then a build with MI501_CLI_DEBUG defined to 0.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r--src/smi_driver.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c
index 01198ae..79d8a0c 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1522,6 +1522,21 @@ SMI_MapMem(ScrnInfoPtr pScrn)
#else
pSmi->FBReserved = pSmi->FBCursorOffset = pSmi->videoRAMBytes -
(pSmi->Dualhead ? SMI501_CURSOR_SIZE << 1 : SMI501_CURSOR_SIZE);
+
+# ifdef SMI501_CLI_DEBUG
+ if (pSmi->useEXA) {
+ pSmi->batch_active = FALSE;
+ pSmi->batch_length = 4096;
+ pSmi->FBReserved -= pSmi->batch_length << 3;
+ pSmi->batch_offset = pSmi->FBReserved;
+ pSmi->batch_handle = (int64_t *)(pSmi->FBBase + pSmi->batch_offset);
+ pSmi->batch_finish = -1;
+ pSmi->batch_index = 0;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Using command list interpreter debug code\n");
+ }
+# endif
+
#endif
}
else {