From c72d0b87f787376f144f6219977107d59b2d1ba3 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sat, 12 Apr 2008 20:50:24 -0300 Subject: [PATCH] Janitor work fixing compile warnings. By including headers, adding prototypes, removing/commenting unused variables/functions, and/or some type casts. Remaining warnings are about use of deprecated pciaccess functions. There is still a problem with the missing function XGIAdjustFrame, that is declared in xgi_driver.c and called in xgi_dga.c. --- src/xg47_accel.c | 4 ++-- src/xg47_bios.c | 15 ++++++++------- src/xg47_bios.h | 2 ++ src/xg47_misc.c | 2 ++ src/xg47_mode.c | 2 +- src/xg47_mode.h | 2 ++ src/xg47_tv.c | 3 +-- src/xg47_video.c | 24 +++++++++++++----------- src/xg47_videohw.c | 2 -- src/xg47_videohw.h | 4 ++++ src/xgi_bios.c | 5 +++-- src/xgi_bios.h | 3 ++- src/xgi_cursor.c | 1 + src/xgi_dga.c | 1 + src/xgi_dri.c | 5 +++-- src/xgi_driver.c | 9 ++++++--- src/xgi_hwmc.c | 17 +++++++---------- src/xgi_misc.c | 15 +++++++++------ src/xgi_shadow.c | 1 + 19 files changed, 68 insertions(+), 49 deletions(-) diff --git a/src/xg47_accel.c b/src/xg47_accel.c index 13901f6..ea43bb3 100644 --- a/src/xg47_accel.c +++ b/src/xg47_accel.c @@ -81,8 +81,8 @@ static XG47_accel_info accel_info; /* inner functions */ -static Bool XG47InitCmdList(); -static void ResetClip(); +static Bool XG47InitCmdList(ScrnInfoPtr pScrn); +static void ResetClip(void); static void SetClip(XGIPtr, CARD32 left, CARD32 top, CARD32 right, CARD32 bottom); static inline void SetColorDepth(int color); diff --git a/src/xg47_bios.c b/src/xg47_bios.c index cbd36c1..580ab62 100644 --- a/src/xg47_bios.c +++ b/src/xg47_bios.c @@ -33,6 +33,7 @@ #include "xgi_regs.h" #include "xgi_bios.h" #include "xgi_mode.h" +#include "xg47_bios.h" #include "xg47_tv.h" #include "xg47_mode.h" @@ -708,7 +709,7 @@ static ModeStatus XG47GetValidMode(XGIPtr pXGI, XGIAskModePtr pMode0, if (!refSupport) { xf86DrvMsg(pXGI->pScrn->scrnIndex, X_ERROR, "%s:%u: refSupport = 0, pMode0->condition = 0x%x\n", - __func__, __LINE__, pMode0->condition); + __func__, __LINE__, (unsigned int)pMode0->condition); return MODE_BAD; } @@ -738,7 +739,7 @@ static ModeStatus XG47GetValidMode(XGIPtr pXGI, XGIAskModePtr pMode0, if (!refSupport) { xf86DrvMsg(pXGI->pScrn->scrnIndex, X_ERROR, "%s:%u: refSupport = 0, pMode0->condition = 0x%x\n", - __func__, __LINE__, pMode0->condition); + __func__, __LINE__, (unsigned int)pMode0->condition); xf86DrvMsg(pXGI->pScrn->scrnIndex, X_INFO, "%s:%u: mode->refSupport[0..3] = 0x%04x 0x%04x 0x%04x 0x%04x\n", __func__, __LINE__, @@ -800,7 +801,7 @@ static ModeStatus XG47GetValidMode(XGIPtr pXGI, XGIAskModePtr pMode0, if (!refSupport) { xf86DrvMsg(pXGI->pScrn->scrnIndex, X_ERROR, "%s:%u: pMode1->refSupport = 0, pMode1->condition = 0x%x\n", - __func__, __LINE__, pMode1->condition); + __func__, __LINE__, (unsigned int)pMode1->condition); return MODE_BAD; } @@ -1077,8 +1078,8 @@ ModeStatus XG47BiosValidMode(ScrnInfoPtr pScrn, XGIAskModePtr pMode, (pXGI->biosDevSupport & (pMode0->condition & 0x0F))) { xf86DrvMsg(pXGI->pScrn->scrnIndex, X_ERROR, "1st display device not supported by BIOS: 0x%02x 0x%02x\n", - (pMode0->condition & 0x0f), - (pXGI->biosDevSupport & 0x0f)); + (unsigned int)(pMode0->condition & 0x0f), + (unsigned int)(pXGI->biosDevSupport & 0x0f)); return FALSE; } } @@ -1092,8 +1093,8 @@ ModeStatus XG47BiosValidMode(ScrnInfoPtr pScrn, XGIAskModePtr pMode, != (pXGI->biosDevSupport & (pMode1->condition & 0x0F))) { xf86DrvMsg(pXGI->pScrn->scrnIndex, X_ERROR, "2nd display device not supported by BIOS: 0x%02x 0x%02x\n", - (pMode1->condition & 0x0f), - (pXGI->biosDevSupport & 0x0f)); + (unsigned int)(pMode1->condition & 0x0f), + (unsigned int)(pXGI->biosDevSupport & 0x0f)); return FALSE; } } diff --git a/src/xg47_bios.h b/src/xg47_bios.h index 7ee2aa3..4e449ee 100644 --- a/src/xg47_bios.h +++ b/src/xg47_bios.h @@ -44,4 +44,6 @@ extern void XG47CloseAllDevice(XGIPtr pXGI, CARD8 device2Close); extern void XG47OpenAllDevice(XGIPtr pXGI, CARD8 device2Open); extern CARD16 XG47GetRefreshRateByIndex(CARD8 index); +extern void XG47WaitLcdPowerSequence(XGIPtr pXGI, CARD8 bNew); + #endif diff --git a/src/xg47_misc.c b/src/xg47_misc.c index 000a2b5..cc83a88 100644 --- a/src/xg47_misc.c +++ b/src/xg47_misc.c @@ -32,6 +32,8 @@ #include "xgi.h" #include "xgi_version.h" #include "xgi_regs.h" +#include "xg47_misc.h" +#include "xg47_mode.h" void XG47EnableMMIO(ScrnInfoPtr pScrn) { diff --git a/src/xg47_mode.c b/src/xg47_mode.c index 1d33ea7..4f631e1 100644 --- a/src/xg47_mode.c +++ b/src/xg47_mode.c @@ -32,7 +32,7 @@ #include "xgi.h" #include "xgi_regs.h" #include "xgi_bios.h" -#include "xgi_mode.h" +#include "xg47_mode.h" /* Jong 09/15/2006; support dual view; default is single mode */ int g_DualViewMode=0; diff --git a/src/xg47_mode.h b/src/xg47_mode.h index 2d3b764..b573834 100644 --- a/src/xg47_mode.h +++ b/src/xg47_mode.h @@ -28,6 +28,8 @@ #ifndef _XG47_MODE_H_ #define _XG47_MODE_H_ +#include "xgi_mode.h" + /* xg47_mode.c */ extern void XG47ModeSave(ScrnInfoPtr pScrn, XGIRegPtr pXGIReg); extern void XG47ModeRestore(ScrnInfoPtr pScrn, XGIRegPtr pXGIReg); diff --git a/src/xg47_tv.c b/src/xg47_tv.c index 3fafb62..7675226 100644 --- a/src/xg47_tv.c +++ b/src/xg47_tv.c @@ -38,9 +38,8 @@ static CARD16 currentXRes; static CARD16 currentYRes; static CARD16 currentColor; static CARD16 m_MV7_APS; -static CARD16 I2C0E, I2C0F, I2C1E, I2C1F, I2C20, I2C22; +static CARD16 I2C0E, I2C0F, I2C1E, I2C1F; static CARD16 flicker; -static CARD32 dwHandle; static CARD16 MV7SetRegisters(XGIPtr pXGI, CARD16 aps); static void XG47DelayTimer(XGIPtr pXGI, unsigned loop); diff --git a/src/xg47_video.c b/src/xg47_video.c index 8d66061..bb88e3b 100644 --- a/src/xg47_video.c +++ b/src/xg47_video.c @@ -140,13 +140,15 @@ static int XG47PutImage(ScrnInfoPtr pScrn, int srcID, unsigned char* buf, short width, short height, Bool isSync, RegionPtr pClipBoxes, - pointer pData); + pointer pData, + DrawablePtr pDraw); static int XG47PutVideo(ScrnInfoPtr pScrn, short srcX, short srcY, short drwX, short drwY, short srcW, short srcH, short drwW, short drwH, - RegionPtr pClipBoxes, pointer data); + RegionPtr pClipBoxes, pointer data, + DrawablePtr pDraw); static int XG47QueryImageAttributes(ScrnInfoPtr pScrn, int id, unsigned short *w, unsigned short *h, @@ -175,14 +177,13 @@ static int XG47DisplaySurface(XF86SurfacePtr pSurface, static Atom xvColorKey, xvSaturation, xvBrightness, xvHUE, xvContrast; static Atom xvmcUncompressIndex, xvmcMode, xvmcSubpictureIndex; -static Atom xvmcSubSrcX, xvmcSubSrcY, xvmcSubDstX, xvmcSubDstY, xvmcSubW, xvmcSubH; +/* static Atom xvmcSubSrcX, xvmcSubSrcY, xvmcSubDstX, xvmcSubDstY, xvmcSubW, xvmcSubH; */ void XG47InitVideo(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; - XGIPtr pXGI = XGIPTR(pScrn); int numAdaptors; /* Jong 11/28/2006; test */ @@ -1164,6 +1165,7 @@ static int XG47DisplayVideoWithYUY2(ScrnInfoPtr pScrn, return 0; } +/*ARGSUSED*/ static int XG47PutImage(ScrnInfoPtr pScrn, short srcX, short srcY, short drwX, short drwY, @@ -1172,10 +1174,10 @@ static int XG47PutImage(ScrnInfoPtr pScrn, int srcID, unsigned char* buf, short width, short height, Bool isSync, RegionPtr pClipBoxes, - pointer pData) + pointer pData, + DrawablePtr pDraw) { XGIPortPtr pXGIPort = (XGIPortPtr)pData; - XGIPtr pXGI = XGIPTR(pScrn); /* Jong 11/28/2006; test */ ErrorF("Jong-XG47PutImage()...\n"); @@ -1527,7 +1529,6 @@ static int XG47DisplayDVDVideo(ScrnInfoPtr pScrn, BoxRec dstBox; int dstOffsetY, dstOffsetV, dstOffsetU; int i = 0, top, left, npixels, nlines; - short width, height; for(i = 0; i < XGI_MAX_SURFACES; i++) { @@ -1627,21 +1628,22 @@ static int XG47DisplayDVDVideo(ScrnInfoPtr pScrn, static void XG47DisplaySubpicture(ScrnInfoPtr pScrn, pointer pData) { - XGIPtr pXGI = XGIPTR(pScrn); XGIPortPtr pXGIPort = (XGIPortPtr)pData; - XGIXvMCSubpicturePtr pSub = &(pXGI->xvmcSubpic); + XGIXvMCSubpicturePtr pSub = &XGIPTR(pScrn)->xvmcSubpic; pXGIPort->spStartAddr = pSub->hwAddr + (pSub->size >> 1) * pXGIPort->subpictureIndex; XG47SubpictureEnable(pScrn); } + +/*ARGSUSED*/ static int XG47PutVideo(ScrnInfoPtr pScrn, short srcX, short srcY, short drwX, short drwY, short srcW, short srcH, short drwW, short drwH, - RegionPtr pClipBoxes, pointer pData) + RegionPtr pClipBoxes, pointer pData, + DrawablePtr pDraw) { - XGIPtr pXGI = XGIPTR(pScrn); XGIPortPtr pXGIPort = (XGIPortPtr)pData; /* Jong 11/28/2006; test */ diff --git a/src/xg47_videohw.c b/src/xg47_videohw.c index 5d05abf..4d8cccf 100644 --- a/src/xg47_videohw.c +++ b/src/xg47_videohw.c @@ -1374,7 +1374,6 @@ void XG47HwDisableVideo(ScrnInfoPtr pScrn) void XG47HwTurnOffColorKey(ScrnInfoPtr pScrn, CARD32 flag) { XGIPtr pXGI = XGIPTR(pScrn); - XGIPortPtr pXGIPort = pXGI->pAdaptor->pPortPrivates[0].ptr; if (flag & (1 << 0)) { @@ -1799,7 +1798,6 @@ void XG47PanningExpansionAdjust(ScrnInfoPtr pScrn, BoxPtr pDstBox) CARD16 panningX, panningY, panelSizeX, panelSizeY; CARD16 modeSizeX, modeSizeY; Bool isPanelExpension; - Bool isInW2 = (pXGI->ovlAttr & OVLST_VIDEO_ON_W2); Bool isOutOfScreen = FALSE; left = (CARD16)pDstBox->x1; diff --git a/src/xg47_videohw.h b/src/xg47_videohw.h index 0c7c95c..7f5fa98 100644 --- a/src/xg47_videohw.h +++ b/src/xg47_videohw.h @@ -109,4 +109,8 @@ extern void XG47SubpictureDisable(ScrnInfoPtr pScrn, Bool isKillOrHide); extern void XG47SubpictureAdjustRect(ScrnInfoPtr pScrn); extern void XG47SubpictureSetDest(ScrnInfoPtr pScrn); +extern void XG47HwResetMC(ScrnInfoPtr pScrn); +extern void XG47HwDisableMC(ScrnInfoPtr pScrn); +extern void XG47HwSetIDCTorMC(ScrnInfoPtr pScrn); + #endif diff --git a/src/xgi_bios.c b/src/xgi_bios.c index d7d9994..8557f90 100644 --- a/src/xgi_bios.c +++ b/src/xgi_bios.c @@ -37,6 +37,8 @@ #include "xgi_mode.h" #include "xg47_bios.h" #include "xg47_mode.h" +#include "xg47_misc.h" +#include "xg47_tv.h" static void XGIBiosGetFramebufferSize(XGIPtr pXGI); @@ -697,7 +699,7 @@ void XGICloseSecondaryView(XGIPtr pXGI) OUTB(XGI_REG_SRX,0x1b); OUTB(XGI_REG_SRX+1, vclk19); OUTB(XGI_REG_SRX,0x28); - OUTB(XGI_REG_SRX+1, INB(XGI_REG_SRX+1) & ~0x70 | vclk28); + OUTB(XGI_REG_SRX+1, (INB(XGI_REG_SRX+1) & ~0x70) | vclk28); } if (IN3CFB(0x5B) & (DEV_SUPPORT_LCD << 4)) @@ -815,7 +817,6 @@ static Bool XGIBiosDllPunt(XGIPtr pXGI, unsigned long cmd, Bool XGIBiosDllInit(ScrnInfoPtr pScrn) { XGIPtr pXGI = XGIPTR(pScrn); - CARD8 idxbak; (void) memset(pXGI->pBiosDll, 0, sizeof(*pXGI->pBiosDll)); diff --git a/src/xgi_bios.h b/src/xgi_bios.h index f935a17..20ca900 100644 --- a/src/xgi_bios.h +++ b/src/xgi_bios.h @@ -415,7 +415,6 @@ extern Bool XGIBiosDllInit(ScrnInfoPtr pScrn); extern Bool XGIBiosModeInit(ScrnInfoPtr pScrn, XGIAskModePtr pMode, Bool dualView); - extern unsigned long XGIBiosValueInit(XGIPtr pXGI); extern Bool XGIBiosCloseSecondView(XGIPtr pXGI); extern Bool XGIBiosCloseAllDevice(XGIPtr pXGI, @@ -423,5 +422,7 @@ extern Bool XGIBiosCloseAllDevice(XGIPtr pXGI, extern Bool XGIBiosOpenAllDevice(XGIPtr pXGI, unsigned long* pDevices); +extern void XGICloseSecondaryView(XGIPtr pXGI); + #endif diff --git a/src/xgi_cursor.c b/src/xgi_cursor.c index 7308b46..e15f232 100644 --- a/src/xgi_cursor.c +++ b/src/xgi_cursor.c @@ -32,6 +32,7 @@ #include "xgi.h" #include "xgi_regs.h" #include "xg47_cursor.h" +#include "xgi_cursor.h" Bool XGIHWCursorInit(ScreenPtr pScreen) { diff --git a/src/xgi_dga.c b/src/xgi_dga.c index e53d227..9ba1efb 100644 --- a/src/xgi_dga.c +++ b/src/xgi_dga.c @@ -35,6 +35,7 @@ #include "xgi.h" #include "xgi_regs.h" #include "xgi_driver.h" +#include "xgi_dga.h" static Bool XGIDGAOpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int *, int *, int *); diff --git a/src/xgi_dri.c b/src/xgi_dri.c index 0163bb4..c87df1a 100644 --- a/src/xgi_dri.c +++ b/src/xgi_dri.c @@ -38,11 +38,12 @@ #include "sarea.h" #include "xgi_dri.h" +#if 0 static void XGIDRITransitionNoop(ScreenPtr pScreen) { return; } - +#endif static Bool XGICreateContext(ScreenPtr pScreen, VisualPtr visual, drm_context_t hwContext, void *pVisualConfigPriv, @@ -225,7 +226,7 @@ Bool XGIDRIFinishScreenInit(ScreenPtr pScreen) pXGI->gart_size = bs.gart.size; - pXGI->gart_handle = bs.gart.handle; + pXGI->gart_handle = (drm_handle_t)bs.gart.handle; err = drmMap(pXGI->drm_fd, pXGI->gart_handle, pXGI->gart_size, (drmAddressPtr) & pXGI->gart_vaddr); diff --git a/src/xgi_driver.c b/src/xgi_driver.c index a58018f..11614ad 100644 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -875,7 +875,7 @@ static void XGIUnmapMem(ScrnInfoPtr pScrn) #endif } - +#if 0 /* * Compute log base 2 of val */ @@ -887,6 +887,7 @@ int XGIMinBits(int val) for (bits = 0; val; val >>= 1, ++bits); return bits; } +#endif /* * This is called by XGIPreInit to set up the default visual. @@ -1197,7 +1198,6 @@ static Bool XGIPreInitModes(ScrnInfoPtr pScrn) ClockRangePtr pClockRange; int modesFound; - char *mod = NULL; MessageType from = X_PROBED; #if DBG_FLOW @@ -1465,6 +1465,8 @@ static Bool XGIPreInitMemory(ScrnInfoPtr pScrn) return TRUE; } + +#if 0 static void XGIPreInitClock(ScrnInfoPtr pScrn) { XGIPtr pXGI = XGIPTR(pScrn); @@ -1532,6 +1534,7 @@ static void XGIPreInitClock(ScrnInfoPtr pScrn) #endif } +#endif static Bool XGIPreInitShadow(ScrnInfoPtr pScrn) { @@ -1920,7 +1923,7 @@ static void XGIRestore(ScrnInfoPtr pScrn) } -Bool XGIFBManagerInit(ScreenPtr pScreen) +static Bool XGIFBManagerInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XGIPtr pXGI = XGIPTR(pScrn); diff --git a/src/xgi_hwmc.c b/src/xgi_hwmc.c index 1292e94..7e2ccbd 100644 --- a/src/xgi_hwmc.c +++ b/src/xgi_hwmc.c @@ -215,7 +215,6 @@ int XGIXvMCCreateContext(ScrnInfoPtr pScrn, XvMCContextPtr pContext, { XGIPtr pXGI = XGIPTR(pScrn); XGIXvMCCreateContextPtr pXGIContext = NULL; - int i, ret = 0; XGITRACE(("XGIXvMCCreateContext \n")); @@ -318,7 +317,7 @@ int XGIXvMCCreateSurface(ScrnInfoPtr pScrn, pXGI->xvmcSurface[i] = *pXGISurface; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG," index: %d surfPitch: %d surfHwAddr %lx\n", - i, surfPitch, alloc.hw_addr); + i, surfPitch, (unsigned long)alloc.hw_addr); return Success; } } @@ -333,16 +332,15 @@ int XGIXvMCCreateSubpicture(ScrnInfoPtr pScrn, { XGIPtr pXGI = XGIPTR(pScrn); XGIPortPtr pXGIPort = pXGI->pAdaptor->pPortPrivates[0].ptr; - XvMCContextPtr pContext = pSubpicture->context; XGIXvMCSubpicturePtr pXGISubpicture = NULL; struct xgi_mem_alloc alloc; int surfSize, surfPitch, pitchAlign; - int i = 0, ret = 0; + int ret = 0; XGITRACE(("XGIXvMCCreateSubpicture \n")); xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "subpicture_id = %x xvimage_id = %x width = %d, height = %d\n", - pSubpicture->subpicture_id, pSubpicture->xvimage_id, pSubpicture->width, pSubpicture->height); + (unsigned int)pSubpicture->subpicture_id, pSubpicture->xvimage_id, pSubpicture->width, pSubpicture->height); *priv = (long *)xcalloc(1, sizeof(XGIXvMCSubpictureRec)); if (!*priv) @@ -379,9 +377,10 @@ int XGIXvMCCreateSubpicture(ScrnInfoPtr pScrn, pXGI->spID = pSubpicture->subpicture_id; pXGI->xvmcSubpic = *pXGISubpicture; - memset(pXGISubpicture->hwAddr + pXGI->fbBase, i, surfSize); + memset(pXGISubpicture->hwAddr + pXGI->fbBase, 0, surfSize); xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,"pitch: %d size: %x hwAddr %lx\n", - surfPitch, pXGISubpicture->size, pXGISubpicture->hwAddr); + surfPitch, pXGISubpicture->size, + (unsigned long)pXGISubpicture->hwAddr); } } @@ -394,8 +393,6 @@ int XGIXvMCCreateSubpicture(ScrnInfoPtr pScrn, void XGIXvMCDestroyContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext) { - XGIPtr pXGI = XGIPTR(pScrn); - XGITRACE(("XGIXvMCDestroyContext \n")); return; @@ -440,7 +437,7 @@ void XGIXvMCDestroySubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubpicture) XGIPtr pXGI = XGIPTR(pScrn); XGIXvMCSubpicturePtr pXGISubpicture = NULL; unsigned long surfBusAddr = 0; - int i, ret = 0; + int ret = 0; XGITRACE(("XGIXvMCDestroySurface \n")); diff --git a/src/xgi_misc.c b/src/xgi_misc.c index bed66ca..61bb600 100644 --- a/src/xgi_misc.c +++ b/src/xgi_misc.c @@ -33,6 +33,7 @@ #include "xgi_regs.h" #include "xgi_driver.h" #include "xgi_bios.h" +#include "xgi_misc.h" #include "xgi_debug.h" @@ -142,7 +143,7 @@ void XGIDumpMemory(CARD8 *addr, unsigned long size) return; #endif - ErrorF("\n==================memory dump at 0x%x, size = %d ===============\n", addr, size); + ErrorF("\n==================memory dump at 0x%x, size = %d ===============\n", (unsigned int)addr, (unsigned int)size); for(i=0; i<0x10; i++) { @@ -357,7 +358,8 @@ Bool XGIPcieMemAllocate(ScrnInfoPtr pScrn, size_t size, xf86DrvMsg(pScrn->scrnIndex, X_INFO, "alloc.size: 0x%x " "alloc.offset: 0x%lx alloc.hwAddr: 0x%x\n", - alloc.size, alloc.offset, alloc.hw_addr); + alloc.size, (unsigned long)alloc.offset, + (unsigned int)alloc.hw_addr); *offset = alloc.index; *pBufHWAddr = alloc.hw_addr; @@ -369,14 +371,15 @@ Bool XGIPcieMemAllocate(ScrnInfoPtr pScrn, size_t size, return TRUE; } -Bool XGIPcieMemFree(ScrnInfoPtr pScrn, size_t size, unsigned long offset) +Bool XGIPcieMemFree(ScrnInfoPtr pScrn, size_t size, + unsigned long bufBusAddr, void *pBufVirtAddr) { XGIPtr pXGI = XGIPTR(pScrn); int ret; - ret = drmCommandWrite(pXGI->drm_fd, DRM_XGI_FREE, &offset, - sizeof(offset)); + ret = drmCommandWrite(pXGI->drm_fd, DRM_XGI_FREE, &bufBusAddr, + sizeof(bufBusAddr)); if (ret < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "PCIE memory IOCTL free failed (%d, %s) %p, %d\n", @@ -385,7 +388,7 @@ Bool XGIPcieMemFree(ScrnInfoPtr pScrn, size_t size, unsigned long offset) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PCIE memory free size: 0x%x offset: 0x%lx\n", - (unsigned int) size, offset); + (unsigned int) size, bufBusAddr); return ret == 0; } diff --git a/src/xgi_shadow.c b/src/xgi_shadow.c index 5251e40..f2778c7 100644 --- a/src/xgi_shadow.c +++ b/src/xgi_shadow.c @@ -37,6 +37,7 @@ #include "shadowfb.h" #include "servermd.h" #include "xgi.h" +#include "xgi_shadow.h" void XGIPointerMoved(int index, int x, int y) -- 1.5.3.2