diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-04-26 21:12:18 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-04-26 21:12:18 -0700 |
commit | b877be5d8e633227764b9a158fb41be6d19c10e5 (patch) | |
tree | 9c3aa7e8499563a12cad35e2a5f8d724f5ee1518 | |
parent | d8bc97e4f23f7418f60ef42a25c00a21963a32ac (diff) |
Fix builds when XF86DRI is undefined
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/savage_driver.c | 2 | ||||
-rw-r--r-- | src/savage_exa.c | 4 | ||||
-rw-r--r-- | src/savage_video.c | 13 |
3 files changed, 16 insertions, 3 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index c909783..7c3ce90 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1700,8 +1700,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) "%s DVI port support (Savage4 only)\n",(psav->dvi?"Force":"Disable")); } - psav->AGPforXv = FALSE; #ifdef XF86DRI + psav->AGPforXv = FALSE; if (xf86GetOptValBool(psav->Options, OPTION_AGP_FOR_XV, &psav->AGPforXv)) { if (psav->AGPforXv) { if (psav->agpSize == 0) { diff --git a/src/savage_exa.c b/src/savage_exa.c index 3fc8f30..8411298 100644 --- a/src/savage_exa.c +++ b/src/savage_exa.c @@ -441,14 +441,17 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int int i, j, dwords, queue, Bpp; unsigned int cmd; CARD32 * srcp; +#ifdef XF86DRI unsigned int dst_pitch; unsigned int dst_yoffset; int agp_possible; +#endif exaWaitSync(pDst->drawable.pScreen); Bpp = pDst->drawable.bitsPerPixel / 8; +#ifdef XF86DRI /* Test for conditions for AGP Mastered Image Transfer (MIT). AGP memory needs to be available, the XVideo AGP needs to be enabled, the framebuffer destination must be a multiple of 32 bytes, and the source @@ -505,6 +508,7 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int return TRUE; } } +#endif /* XF86DRI */ /* If we reach here, AGP transfer is not possible, or failed to drmMap() */ psav->sbd_offset = exaGetPixmapOffset(pDst); diff --git a/src/savage_video.c b/src/savage_video.c index cf51ba0..3b991e8 100644 --- a/src/savage_video.c +++ b/src/savage_video.c @@ -247,10 +247,12 @@ typedef struct { void *video_planarmem; /* opaque memory management information structure */ CARD32 video_planarbuf; /* offset in video memory of planar YV12 buffer */ +#ifdef XF86DRI Bool tried_agp; /* TRUE if AGP allocation has been tried */ CARD32 agpBase; /* Physical address of aperture base */ CARD32 agpBufferOffset; /* Offset of buffer in AGP memory, or 0 if unavailable */ drmAddress agpBufferMap; /* Mapping of AGP buffer in process memory, or NULL */ +#endif } SavagePortPrivRec, *SavagePortPrivPtr; @@ -1046,6 +1048,7 @@ SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown) /*SavageClipVWindow(pScrn);*/ SavageStreamsOff( pScrn ); +#ifdef XF86DRI if (pPriv->agpBufferMap != NULL) { SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo; @@ -1057,6 +1060,8 @@ SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown) pPriv->agpBufferMap = NULL; pPriv->agpBufferOffset = 0; } + pPriv->tried_agp = FALSE; +#endif if (pPriv->video_memory != NULL) { SavageFreeMemory(pScrn, pPriv->video_memory); @@ -1067,7 +1072,6 @@ SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown) pPriv->video_planarmem = NULL; } pPriv->videoStatus = 0; - pPriv->tried_agp = FALSE; } else { if(pPriv->videoStatus & CLIENT_VIDEO_ON) { pPriv->videoStatus |= OFF_TIMER; @@ -1969,6 +1973,7 @@ SavagePutImage( /* Check whether AGP buffers can be allocated. If not, fall back to ordinary upload to framebuffer (slower) */ +#ifdef XF86DRI if (!pPriv->tried_agp && !psav->IsPCI && psav->drmFD > 0 && psav->DRIServerInfo != NULL) { int ret; SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo; @@ -2005,6 +2010,7 @@ SavagePutImage( pPriv->agpBufferOffset = 0; } } +#endif /* XF86DRI */ /* Buffer for final packed frame */ @@ -2050,6 +2056,7 @@ SavagePutImage( offsetV += tmp; nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; if (S3_SAVAGE4_SERIES(psav->Chipset) && psav->BCIforXv && (npixels & 0xF) == 0 && pPriv->video_planarbuf != 0) { +#ifdef XF86DRI if (pPriv->agpBufferMap != NULL) { /* Using copy to AGP memory */ SavageCopyPlanarDataBCI( @@ -2061,7 +2068,9 @@ SavagePutImage( pPriv->agpBufferMap, pPriv->agpBase + pPriv->agpBufferOffset, srcPitch, srcPitch2, dstPitch, nlines, npixels, TRUE); - } else { + } else +#endif /* XF86DRI */ + { /* Using ordinary copy to framebuffer */ SavageCopyPlanarDataBCI( pScrn, |