summaryrefslogtreecommitdiff
path: root/src/g80_driver.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-07-16 18:48:32 +1000
committerDave Airlie <airlied@gmail.com>2012-07-16 18:48:32 +1000
commite5e3e733d933fc3accdd6c3c7a02df5950530cae (patch)
treeb681c75b4536050a4165ed4f129db8ec8d21f14e /src/g80_driver.c
parent713e9501b87465cf2a62c27605b6fc4a454dad95 (diff)
nv: make XAA optional.
This allows nv to build without XAA. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/g80_driver.c')
-rw-r--r--src/g80_driver.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/g80_driver.c b/src/g80_driver.c
index c666977..cc4e197 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -107,7 +107,11 @@ G80ResizeScreen(ScrnInfoPtr pScrn, int width, int height)
pScrn->virtualY = height;
/* Can resize if XAA is disabled or EXA is enabled */
- if(!pNv->xaa || pNv->exa) {
+ if(
+#ifdef HAVE_XAA_H
+ !pNv->xaa ||
+#endif
+ pNv->exa) {
(*pScrn->pScreen->GetScreenPixmap)(pScrn->pScreen)->devKind = pitch;
pScrn->displayWidth = pitch / (pScrn->bitsPerPixel / 8);
@@ -503,8 +507,10 @@ G80CloseScreen(CLOSE_SCREEN_ARGS_DECL)
if(pScrn->vtSema)
ReleaseDisplay(pScrn);
+#ifdef HAVE_XAA_H
if(pNv->xaa)
XAADestroyInfoRec(pNv->xaa);
+#endif
if(pNv->exa) {
if(pNv->exaScreenArea) {
exaOffscreenFree(pScreen, pNv->exaScreenArea);
@@ -850,6 +856,7 @@ G80ScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DPMSInit(pScreen, xf86DPMSSet, 0);
+#ifdef HAVE_XAA_H
/* Clear the screen */
if(pNv->xaa) {
/* Use the acceleration engine */
@@ -857,7 +864,9 @@ G80ScreenInit(SCREEN_INIT_ARGS_DECL)
pNv->xaa->SubsequentSolidFillRect(pScrn,
0, 0, pScrn->displayWidth, pNv->offscreenHeight);
G80DmaKickoff(pNv);
- } else {
+ } else
+#endif
+ {
/* Use a slow software clear path */
memset(pNv->mem, 0, pitch * pNv->offscreenHeight);
}
@@ -910,8 +919,10 @@ G80EnterVT(VT_FUNC_ARGS_DECL)
G80Ptr pNv = G80PTR(pScrn);
/* Reinit the hardware */
+#ifdef HAVE_XAA_H
if(pNv->xaa)
G80InitHW(pScrn);
+#endif
if(!AcquireDisplay(pScrn))
return FALSE;