From e443ede15981549ff5f6b01f42c3cb8dc909d778 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 13 Jul 2012 14:47:40 +1000 Subject: cirrus: handle server with no XAA this fixes cirrus to work with a server with no XAA module. Signed-off-by: Dave Airlie --- src/cir_dga.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/cir_dga.c') diff --git a/src/cir_dga.c b/src/cir_dga.c index b841be3..bf3a9dd 100644 --- a/src/cir_dga.c +++ b/src/cir_dga.c @@ -30,8 +30,10 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" +#endif #include "vgaHW.h" #include "cir.h" #include "dgaproc.h" @@ -39,15 +41,17 @@ static Bool Cir_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int *, int *, int *); static Bool Cir_SetMode(ScrnInfoPtr, DGAModePtr); -static void Cir_Sync(ScrnInfoPtr); static int Cir_GetViewport(ScrnInfoPtr); static void Cir_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H +static void Cir_Sync(ScrnInfoPtr); static void Cir_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void Cir_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); /* static void Cir_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); */ +#endif static DGAFunctionRec CirDGAFuncs = { @@ -56,9 +60,13 @@ DGAFunctionRec CirDGAFuncs = { Cir_SetMode, Cir_SetViewport, Cir_GetViewport, +#ifdef HAVE_XAA_H Cir_Sync, Cir_FillRect, Cir_BlitRect, +#else + NULL, NULL, NULL, +#endif NULL /* Cir_BlitTransRect */ }; @@ -207,14 +215,12 @@ Cir_GetViewport( return pCir->DGAViewportStatus; } - - +#ifdef HAVE_XAA_H static void Cir_Sync( ScrnInfoPtr pScrn ){ CirPtr pCir = CIRPTR(pScrn); - if(pCir->AccelInfoRec) { (*pCir->AccelInfoRec->Sync)(pScrn); } @@ -255,3 +261,4 @@ Cir_BlitRect( SET_SYNC_FLAG(pCir->AccelInfoRec); } } +#endif -- cgit v1.2.3