diff options
author | Daniel Stone <daniel@fooishbar.org> | 2012-07-10 00:32:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-10 09:36:40 +0100 |
commit | 232217eef8f99f5678d65bf9aa5b898ef6d3b3c6 (patch) | |
tree | 22d00db9c82250c2e971b08cc312f51233efe117 /src/legacy | |
parent | 78dc0c04745ad4485b994f67833f4a155749f01d (diff) |
i810: Make DGA optional
Don't build DGA when it's not available, or when we don't want it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/legacy')
-rw-r--r-- | src/legacy/i810/Makefile.am | 6 | ||||
-rw-r--r-- | src/legacy/i810/i810_driver.c | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/legacy/i810/Makefile.am b/src/legacy/i810/Makefile.am index 01cc2183..07a384f6 100644 --- a/src/legacy/i810/Makefile.am +++ b/src/legacy/i810/Makefile.am @@ -10,7 +10,6 @@ AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ @PCIACCESS_CFLA liblegacy_i810_la_SOURCES = \ i810_common.h \ i810_cursor.c \ - i810_dga.c \ i810_driver.c \ i810.h \ i810_memory.c \ @@ -24,6 +23,11 @@ liblegacy_i810_la_SOURCES += \ i810_accel.c endif +if DGA +liblegacy_i810_la_SOURCES += \ + i810_dga.c +endif + if DRI liblegacy_i810_la_SOURCES +=\ i810_dri.c \ diff --git a/src/legacy/i810/i810_driver.c b/src/legacy/i810/i810_driver.c index df8f8e1b..f4f7f3e3 100644 --- a/src/legacy/i810/i810_driver.c +++ b/src/legacy/i810/i810_driver.c @@ -993,7 +993,7 @@ DoRestore(ScrnInfoPtr scrn, vgaRegPtr vgaReg, I810RegPtr i810Reg, uint32_t LCD_TV_Control = INREG(LCD_TV_C); uint32_t TV_HTotal = INREG(LCD_TV_HTOTAL); uint32_t ActiveStart, ActiveEnd; - + if((LCD_TV_Control & LCD_TV_ENABLE) && !(LCD_TV_Control & LCD_TV_VGAMOD) && TV_HTotal) { @@ -1006,7 +1006,7 @@ DoRestore(ScrnInfoPtr scrn, vgaRegPtr vgaReg, I810RegPtr i810Reg, OUTREG(LCD_TV_OVRACT, (ActiveEnd << 16) | ActiveStart); } - + /* Turn on DRAM Refresh */ temp = INREG8(DRAM_ROW_CNTL_HI); temp &= ~DRAM_REFRESH_RATE; @@ -1585,11 +1585,11 @@ I810ScreenInit(SCREEN_INIT_ARGS_DECL) pI810->LpRing = calloc(sizeof(I810RingBuffer),1); if (!pI810->LpRing) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, + xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Could not allocate lpring data structure.\n"); return FALSE; } - + miClearVisualTypes(); /* Re-implemented Direct Color support, -jens */ @@ -1623,7 +1623,7 @@ I810ScreenInit(SCREEN_INIT_ARGS_DECL) * pI810->directRenderingEnabled based on it each generation. */ pI810->directRenderingEnabled = !pI810->directRenderingDisabled; - + if (pI810->directRenderingEnabled==TRUE) pI810->directRenderingEnabled = I810DRIScreenInit(screen); @@ -1693,7 +1693,7 @@ I810ScreenInit(SCREEN_INIT_ARGS_DECL) } #endif -#ifdef XFreeXDGA +#ifdef HAVE_DGA I810DGAInit(screen); #endif |