xf86-video-intel: src/drmmode_display.c src/i810_dga.c src/i810_dri.c src/i810_driver.c src/i810_hwmc.c src/i810_video.c src/i830_batchbuffer.c src/i830_dri.c src/i830_driver.c src/i830_hwmc.c src/i830_uxa.c src/i830_video.c uxa/uxa-accel.c uxa/uxa.c uxa/uxa-glyphs.c uxa/uxa-render.c

Eric Anholt anholt at kemper.freedesktop.org
Sun Jun 6 15:57:31 PDT 2010


 src/drmmode_display.c  |   20 +++++++++----------
 src/i810_dga.c         |    4 +--
 src/i810_dri.c         |   50 ++++++++++++++++++++++++-------------------------
 src/i810_driver.c      |   12 +++++------
 src/i810_hwmc.c        |   10 ++++-----
 src/i810_video.c       |   26 ++++++++++++-------------
 src/i830_batchbuffer.c |    4 +--
 src/i830_dri.c         |   44 +++++++++++++++++++++----------------------
 src/i830_driver.c      |   12 +++++------
 src/i830_hwmc.c        |    4 +--
 src/i830_uxa.c         |   10 ++++-----
 src/i830_video.c       |   22 ++++++++++-----------
 uxa/uxa-accel.c        |   14 ++++++-------
 uxa/uxa-glyphs.c       |   10 ++++-----
 uxa/uxa-render.c       |    4 +--
 uxa/uxa.c              |    8 +++----
 16 files changed, 127 insertions(+), 127 deletions(-)

New commits:
commit 2c1fda08e889cad07acb452230da06f9c383d21c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jun 4 16:04:37 2010 -0700

    Use libc instead of deprecated libc wrappers for malloc/calloc/free.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 358baf4..3ea9b0f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -342,7 +342,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	crtc->y = y;
 	crtc->rotation = rotation;
 
-	output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output);
+	output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
 	if (!output_ids) {
 		ret = FALSE;
 		goto done;
@@ -812,18 +812,18 @@ drmmode_output_destroy(xf86OutputPtr output)
 		drmModeFreePropertyBlob(drmmode_output->edid_blob);
 	for (i = 0; i < drmmode_output->num_props; i++) {
 	    drmModeFreeProperty(drmmode_output->props[i].mode_prop);
-	    xfree(drmmode_output->props[i].atoms);
+	    free(drmmode_output->props[i].atoms);
 	}
-	xfree(drmmode_output->props);
+	free(drmmode_output->props);
 	drmModeFreeConnector(drmmode_output->mode_output);
 	drmmode_output->mode_output = NULL;
 	if (drmmode_output->private_data) {
-		xfree(drmmode_output->private_data);
+		free(drmmode_output->private_data);
 		drmmode_output->private_data = NULL;
 	}
 	if (drmmode_output->backlight_iface)
 		drmmode_backlight_set(output, drmmode_output->backlight_active_level);
-	xfree(drmmode_output);
+	free(drmmode_output);
 	output->driver_private = NULL;
 }
 
@@ -914,7 +914,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
     drmModePropertyPtr drmmode_prop;
     int i, j, err;
 
-    drmmode_output->props = xcalloc(mode_output->count_props, sizeof(drmmode_prop_rec));
+    drmmode_output->props = calloc(mode_output->count_props, sizeof(drmmode_prop_rec));
     if (!drmmode_output->props)
 	return;
 
@@ -939,7 +939,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
 	    INT32 range[2];
 
 	    p->num_atoms = 1;
-	    p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+	    p->atoms = calloc(p->num_atoms, sizeof(Atom));
 	    if (!p->atoms)
 		continue;
 	    p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -961,7 +961,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
 	    }
 	} else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) {
 	    p->num_atoms = drmmode_prop->count_enums + 1;
-	    p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+	    p->atoms = calloc(p->num_atoms, sizeof(Atom));
 	    if (!p->atoms)
 		continue;
 	    p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -1206,7 +1206,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
 		return;
 	}
 
-	drmmode_output = xcalloc(sizeof(drmmode_output_private_rec), 1);
+	drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1);
 	if (!drmmode_output) {
 		xf86OutputDestroy(output);
 		drmModeFreeConnector(koutput);
@@ -1220,7 +1220,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
 	 */
 	drmmode_output->private_data = NULL;
 	if (koutput->connector_type ==  DRM_MODE_CONNECTOR_LVDS) {
-		drmmode_output->private_data = xcalloc(
+		drmmode_output->private_data = calloc(
 				sizeof(struct fixed_panel_lvds), 1);
 		if (!drmmode_output->private_data)
 			xf86DrvMsg(scrn->scrnIndex, X_ERROR,
diff --git a/src/i810_dga.c b/src/i810_dga.c
index 3f53057..52a01b7 100644
--- a/src/i810_dga.c
+++ b/src/i810_dga.c
@@ -84,10 +84,10 @@ I810DGAInit(ScreenPtr pScreen)
 
    while (pMode) {
 
-      newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
+      newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
 
       if (!newmodes) {
-	 xfree(modes);
+	 free(modes);
 	 return FALSE;
       }
       modes = newmodes;
diff --git a/src/i810_dri.c b/src/i810_dri.c
index f6f9f5e..ecb94af 100644
--- a/src/i810_dri.c
+++ b/src/i810_dri.c
@@ -172,25 +172,25 @@ I810InitVisualConfigs(ScreenPtr pScreen)
       numConfigs = 8;
 
       pConfigs =
-	    (__GLXvisualConfig *) xcalloc(sizeof(__GLXvisualConfig),
+	    (__GLXvisualConfig *) calloc(sizeof(__GLXvisualConfig),
 					  numConfigs);
       if (!pConfigs)
 	 return FALSE;
 
       pI810Configs =
-	    (I810ConfigPrivPtr) xcalloc(sizeof(I810ConfigPrivRec),
+	    (I810ConfigPrivPtr) calloc(sizeof(I810ConfigPrivRec),
 					numConfigs);
       if (!pI810Configs) {
-	 xfree(pConfigs);
+	 free(pConfigs);
 	 return FALSE;
       }
 
       pI810ConfigPtrs =
-	    (I810ConfigPrivPtr *) xcalloc(sizeof(I810ConfigPrivPtr),
+	    (I810ConfigPrivPtr *) calloc(sizeof(I810ConfigPrivPtr),
 					  numConfigs);
       if (!pI810ConfigPtrs) {
-	 xfree(pConfigs);
-	 xfree(pI810Configs);
+	 free(pConfigs);
+	 free(pI810Configs);
 	 return FALSE;
       }
 
@@ -360,7 +360,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
    if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
       pDRIInfo->busIdString = DRICreatePCIBusID(pI810->PciInfo);
    } else {
-      pDRIInfo->busIdString = xalloc(64);
+      pDRIInfo->busIdString = malloc(64);
       sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
 	      ((pI810->PciInfo->domain << 8) | pI810->PciInfo->bus),
 	      pI810->PciInfo->dev, pI810->PciInfo->func
@@ -392,7 +392,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
    }
    pDRIInfo->SAREASize = SAREA_MAX;
 
-   if (!(pI810DRI = (I810DRIPtr) xcalloc(sizeof(I810DRIRec), 1))) {
+   if (!(pI810DRI = (I810DRIPtr) calloc(sizeof(I810DRIRec), 1))) {
       DRIDestroyInfoRec(pI810->pDRIInfo);
       pI810->pDRIInfo = NULL;
       return FALSE;
@@ -421,7 +421,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
    if (!DRIScreenInit(pScreen, pDRIInfo, &pI810->drmSubFD)) {
       xf86DrvMsg(pScreen->myNum, X_ERROR,
 		 "[dri] DRIScreenInit failed.  Disabling DRI.\n");
-      xfree(pDRIInfo->devPrivate);
+      free(pDRIInfo->devPrivate);
       pDRIInfo->devPrivate = NULL;
       DRIDestroyInfoRec(pI810->pDRIInfo);
       pI810->pDRIInfo = NULL;
@@ -1058,16 +1058,16 @@ I810DRICloseScreen(ScreenPtr pScreen)
 
    if (pI810->pDRIInfo) {
       if (pI810->pDRIInfo->devPrivate) {
-	 xfree(pI810->pDRIInfo->devPrivate);
+	 free(pI810->pDRIInfo->devPrivate);
 	 pI810->pDRIInfo->devPrivate = NULL;
       }
       DRIDestroyInfoRec(pI810->pDRIInfo);
       pI810->pDRIInfo = NULL;
    }
    if (pI810->pVisualConfigs)
-      xfree(pI810->pVisualConfigs);
+      free(pI810->pVisualConfigs);
    if (pI810->pVisualConfigsPriv)
-      xfree(pI810->pVisualConfigsPriv);
+      free(pI810->pVisualConfigsPriv);
 }
 
 static Bool
@@ -1205,12 +1205,12 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
 
       if (nbox > 1) {
 	 /* Keep ordering in each band, reverse order of bands */
-	 pboxNew1 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
+	 pboxNew1 = (BoxPtr) malloc(sizeof(BoxRec) * nbox);
 	 if (!pboxNew1)
 	    return;
-	 pptNew1 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
+	 pptNew1 = (DDXPointPtr) malloc(sizeof(DDXPointRec) * nbox);
 	 if (!pptNew1) {
-	    xfree(pboxNew1);
+	    free(pboxNew1);
 	    return;
 	 }
 	 pboxBase = pboxNext = pbox + nbox - 1;
@@ -1241,16 +1241,16 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
 
       if (nbox > 1) {
 	 /*reverse orderof rects in each band */
-	 pboxNew2 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
-	 pptNew2 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
+	 pboxNew2 = (BoxPtr) malloc(sizeof(BoxRec) * nbox);
+	 pptNew2 = (DDXPointPtr) malloc(sizeof(DDXPointRec) * nbox);
 	 if (!pboxNew2 || !pptNew2) {
 	    if (pptNew2)
-	       xfree(pptNew2);
+	       free(pptNew2);
 	    if (pboxNew2)
-	       xfree(pboxNew2);
+	       free(pboxNew2);
 	    if (pboxNew1) {
-	       xfree(pptNew1);
-	       xfree(pboxNew1);
+	       free(pptNew1);
+	       free(pboxNew1);
 	    }
 	    return;
 	 }
@@ -1315,12 +1315,12 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
    I810EmitFlush(pScrn);
 
    if (pboxNew2) {
-      xfree(pptNew2);
-      xfree(pboxNew2);
+      free(pptNew2);
+      free(pboxNew2);
    }
    if (pboxNew1) {
-      xfree(pptNew1);
-      xfree(pboxNew1);
+      free(pptNew1);
+      free(pboxNew1);
    }
 
    if (pI810->AccelInfoRec)
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 3109834..088b552 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -366,7 +366,7 @@ I810FreeRec(ScrnInfoPtr pScrn)
       return;
    if (!pScrn->driverPrivate)
       return;
-   xfree(pScrn->driverPrivate);
+   free(pScrn->driverPrivate);
    pScrn->driverPrivate = NULL;
 }
 #endif
@@ -617,7 +617,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
 
    /* Process the options */
    xf86CollectOptions(pScrn, NULL);
-   if (!(pI810->Options = xalloc(sizeof(I810Options))))
+   if (!(pI810->Options = malloc(sizeof(I810Options))))
       return FALSE;
    memcpy(pI810->Options, I810Options, sizeof(I810Options));
    xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pI810->Options);
@@ -1897,7 +1897,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    pI810 = I810PTR(pScrn);
    hwp = VGAHWPTR(pScrn);
 
-   pI810->LpRing = xcalloc(sizeof(I810RingBuffer),1);
+   pI810->LpRing = calloc(sizeof(I810RingBuffer),1);
    if (!pI810->LpRing) {
      xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 
 		"Could not allocate lpring data structure.\n");
@@ -2306,13 +2306,13 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
    vgaHWUnmapMem(pScrn);
 
    if (pI810->ScanlineColorExpandBuffers) {
-      xfree(pI810->ScanlineColorExpandBuffers);
+      free(pI810->ScanlineColorExpandBuffers);
       pI810->ScanlineColorExpandBuffers = NULL;
    }
 
    if (infoPtr) {
       if (infoPtr->ScanlineColorExpandBuffers)
-	 xfree(infoPtr->ScanlineColorExpandBuffers);
+	 free(infoPtr->ScanlineColorExpandBuffers);
       XAADestroyInfoRec(infoPtr);
       pI810->AccelInfoRec = NULL;
    }
@@ -2333,7 +2333,7 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
     */
    xf86GARTCloseScreen(scrnIndex);
 
-   xfree(pI810->LpRing);
+   free(pI810->LpRing);
    pI810->LpRing = NULL;
 
    pScrn->vtSema = FALSE;
diff --git a/src/i810_hwmc.c b/src/i810_hwmc.c
index 1c3ffc9..724e1be 100644
--- a/src/i810_hwmc.c
+++ b/src/i810_hwmc.c
@@ -230,7 +230,7 @@ void I810InitMC(ScreenPtr pScreen)
  *  Set *num_priv to the number of 32bit words that make up the size of
  *  of the data that priv will point to.
  *
- *  *priv = (long *) xcalloc (elements, sizeof(element))
+ *  *priv = (long *) calloc (elements, sizeof(element))
  *  *num_priv = (elements * sizeof(element)) >> 2;
  *
  **************************************************************************/
@@ -256,7 +256,7 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,
     return BadAlloc;
   }
 
-  *priv = xcalloc(1,sizeof(I810XvMCCreateContextRec));
+  *priv = calloc(1,sizeof(I810XvMCCreateContextRec));
   contextRec = (I810XvMCCreateContextRec *)*priv;
 
   if(!*priv) {
@@ -268,7 +268,7 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,
   if(drmCreateContext(pI810->drmSubFD, &(contextRec->drmcontext) ) < 0) {
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
         "I810XvMCCreateContext: Unable to create DRMContext!\n");
-    xfree(*priv);
+    free(*priv);
     return BadAlloc;
   }
 
@@ -295,7 +295,7 @@ int I810XvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf,
   I810Ptr pI810 = I810PTR(pScrn);
   int i;
 
-  *priv = (long *)xcalloc(2,sizeof(long));
+  *priv = (long *)calloc(2,sizeof(long));
 
   if(!*priv) {
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -341,7 +341,7 @@ int I810XvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp,
   I810Ptr pI810 = I810PTR(pScrn);
   int i;
 
-  *priv = (long *)xcalloc(1,sizeof(long));
+  *priv = (long *)calloc(1,sizeof(long));
 
   if(!*priv) {
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/src/i810_video.c b/src/i810_video.c
index 9bb9870..7e3db8c 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -174,7 +174,7 @@ void I810InitVideo(ScreenPtr pScreen)
 	    adaptors = &newAdaptor;
 	} else {
 	    newAdaptors =  /* need to free this someplace */
-		xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+		malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
 	    if(newAdaptors) {
 		memcpy(newAdaptors, adaptors, num_adaptors * 
 					sizeof(XF86VideoAdaptorPtr));
@@ -189,7 +189,7 @@ void I810InitVideo(ScreenPtr pScreen)
         xf86XVScreenInit(pScreen, adaptors, num_adaptors);
 
     if(newAdaptors)
-	xfree(newAdaptors);
+	free(newAdaptors);
 }
 
 /* *INDENT-OFF* */
@@ -383,7 +383,7 @@ I810SetupImageVideo(ScreenPtr pScreen)
     XF86VideoAdaptorPtr adapt;
     I810PortPrivPtr pPriv;
 
-    if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+    if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 			    sizeof(I810PortPrivRec) +
 			    sizeof(DevUnion))))
 	return NULL;
@@ -1224,18 +1224,18 @@ I810AllocateSurface(
     surface->width = w;
     surface->height = h;
 
-    if(!(surface->pitches = xalloc(sizeof(int)))) {
+    if(!(surface->pitches = malloc(sizeof(int)))) {
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
-    if(!(surface->offsets = xalloc(sizeof(int)))) {
-	xfree(surface->pitches);
+    if(!(surface->offsets = malloc(sizeof(int)))) {
+	free(surface->pitches);
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
-    if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
-	xfree(surface->pitches);
-	xfree(surface->offsets);
+    if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
+	free(surface->pitches);
+	free(surface->offsets);
 	xf86FreeOffscreenLinear(linear);
 	return BadAlloc;
     }
@@ -1285,9 +1285,9 @@ I810FreeSurface(
 	I810StopSurface(surface);
     }
     xf86FreeOffscreenLinear(pPriv->linear);
-    xfree(surface->pitches);
-    xfree(surface->offsets);
-    xfree(surface->devPrivate.ptr);
+    free(surface->pitches);
+    free(surface->offsets);
+    free(surface->devPrivate.ptr);
 
     return Success;
 }
@@ -1400,7 +1400,7 @@ I810InitOffscreenImages(ScreenPtr pScreen)
     XF86OffscreenImagePtr offscreenImages;
 
     /* need to free this someplace */
-    if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec)))) {
+    if(!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec)))) {
       return;
     }
 
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 2d47326..1b6a56e 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -140,7 +140,7 @@ void intel_batch_teardown(ScrnInfoPtr scrn)
 
 		dri_bo_unreference(entry->bo);
 		list_del(&entry->in_flight);
-		xfree(entry);
+		free(entry);
 	}
 }
 
@@ -261,7 +261,7 @@ void intel_batch_submit(ScrnInfoPtr scrn)
 
 		dri_bo_unreference(entry->bo);
 		list_del(&entry->in_flight);
-		xfree(entry);
+		free(entry);
 	}
 
 	/* Save a ref to the last batch emitted, which we use for syncing
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 68b163f..87865fe 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -87,12 +87,12 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
 	I830DRI2BufferPrivatePtr privates;
 	PixmapPtr pixmap, pDepthPixmap;
 
-	buffers = xcalloc(count, sizeof *buffers);
+	buffers = calloc(count, sizeof *buffers);
 	if (buffers == NULL)
 		return NULL;
-	privates = xcalloc(count, sizeof *privates);
+	privates = calloc(count, sizeof *privates);
 	if (privates == NULL) {
-		xfree(buffers);
+		free(buffers);
 		return NULL;
 	}
 
@@ -167,8 +167,8 @@ I830DRI2DestroyBuffers(DrawablePtr drawable, DRI2BufferPtr buffers, int count)
 	}
 
 	if (buffers) {
-		xfree(buffers[0].driverPrivate);
-		xfree(buffers);
+		free(buffers[0].driverPrivate);
+		free(buffers);
 	}
 }
 
@@ -186,12 +186,12 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 	I830DRI2BufferPrivatePtr privates;
 	PixmapPtr pixmap;
 
-	buffer = xcalloc(1, sizeof *buffer);
+	buffer = calloc(1, sizeof *buffer);
 	if (buffer == NULL)
 		return NULL;
-	privates = xcalloc(1, sizeof *privates);
+	privates = calloc(1, sizeof *privates);
 	if (privates == NULL) {
-		xfree(buffer);
+		free(buffer);
 		return NULL;
 	}
 
@@ -227,8 +227,8 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 							      drawable->depth,
 					      hint);
 		if (pixmap == NULL) {
-			xfree(privates);
-			xfree(buffer);
+			free(privates);
+			free(buffer);
 			return NULL;
 		}
 
@@ -248,8 +248,8 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 	if (bo == NULL || dri_bo_flink(bo, &buffer->name) != 0) {
 		/* failed to name buffer */
 		screen->DestroyPixmap(pixmap);
-		xfree(privates);
-		xfree(buffer);
+		free(privates);
+		free(buffer);
 		return NULL;
 	}
 
@@ -265,8 +265,8 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer)
 
 			screen->DestroyPixmap(private->pixmap);
 
-			xfree(private);
-			xfree(buffer);
+			free(private);
+			free(buffer);
 		}
 	}
 }
@@ -485,7 +485,7 @@ I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
 	I830DRI2BufferPrivatePtr back_priv;
 	DRI2FrameEventPtr flip_info;
 
-	flip_info = xcalloc(1, sizeof(DRI2FrameEventRec));
+	flip_info = calloc(1, sizeof(DRI2FrameEventRec));
 	if (!flip_info)
 	    return FALSE;
 
@@ -543,7 +543,7 @@ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec,
 	if (status != Success) {
 		I830DRI2DestroyBuffer(NULL, event->front);
 		I830DRI2DestroyBuffer(NULL, event->back);
-		xfree(event);
+		free(event);
 		return;
 	}
 
@@ -605,7 +605,7 @@ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec,
 
 	I830DRI2DestroyBuffer(drawable, event->front);
 	I830DRI2DestroyBuffer(drawable, event->back);
-	xfree(event);
+	free(event);
 }
 
 void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
@@ -620,7 +620,7 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
 	status = dixLookupDrawable(&drawable, flip->drawable_id, serverClient,
 				     M_ANY, DixWriteAccess);
 	if (status != Success) {
-		xfree(flip);
+		free(flip);
 		return;
 	}
 
@@ -641,7 +641,7 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
 		break;
 	}
 
-	xfree(flip);
+	free(flip);
 }
 
 /*
@@ -690,7 +690,7 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
 	divisor &= 0xffffffff;
 	remainder &= 0xffffffff;
 
-	swap_info = xcalloc(1, sizeof(DRI2FrameEventRec));
+	swap_info = calloc(1, sizeof(DRI2FrameEventRec));
 	if (!swap_info)
 	    goto blit_fallback;
 
@@ -837,7 +837,7 @@ blit_fallback:
 	if (swap_info) {
 	    I830DRI2DestroyBuffer(draw, swap_info->front);
 	    I830DRI2DestroyBuffer(draw, swap_info->back);
-	    xfree(swap_info);
+	    free(swap_info);
 	}
 	*target_msc = 0; /* offscreen, so zero out target vblank count */
 	return TRUE;
@@ -909,7 +909,7 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
 	if (pipe == -1)
 		goto out_complete;
 
-	wait_info = xcalloc(1, sizeof(DRI2FrameEventRec));
+	wait_info = calloc(1, sizeof(DRI2FrameEventRec));
 	if (!wait_info)
 		goto out_complete;
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6ec6f51..89a4525 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -244,7 +244,7 @@ static void I830FreeRec(ScrnInfoPtr scrn)
 	if (!scrn->driverPrivate)
 		return;
 
-	xfree(scrn->driverPrivate);
+	free(scrn->driverPrivate);
 	scrn->driverPrivate = NULL;
 }
 
@@ -417,7 +417,7 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr scrn)
 	/* Be nice to the user and load fbcon too */
 	if (!ret)
 		(void)xf86LoadKernelModule("fbcon");
-	xfree(busIdString);
+	free(busIdString);
 	if (ret)
 		return FALSE;
 
@@ -584,7 +584,7 @@ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)
 
 	/* Process the options */
 	xf86CollectOptions(scrn, NULL);
-	if (!(intel->Options = xalloc(sizeof(I830Options))))
+	if (!(intel->Options = malloc(sizeof(I830Options))))
 		return FALSE;
 	memcpy(intel->Options, I830Options, sizeof(I830Options));
 	xf86ProcessOptions(scrn->scrnIndex, scrn->options, intel->Options);
@@ -646,11 +646,11 @@ static Bool i830_open_drm_master(ScrnInfoPtr scrn)
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "[drm] Failed to open DRM device for %s: %s\n",
 			   busid, strerror(errno));
-		xfree(busid);
+		free(busid);
 		return FALSE;
 	}
 
-	xfree(busid);
+	free(busid);
 
 	/* Check that what we opened was a master or a master-capable FD,
 	 * by setting the version of the interface we'll use to talk to it.
@@ -1406,7 +1406,7 @@ static Bool I830CloseScreen(int scrnIndex, ScreenPtr screen)
 
 	if (intel->uxa_driver) {
 		uxa_driver_fini(screen);
-		xfree(intel->uxa_driver);
+		free(intel->uxa_driver);
 		intel->uxa_driver = NULL;
 	}
 	if (intel->front_buffer) {
diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index 850bf87..9aa0af3 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -62,7 +62,7 @@ static int create_context(ScrnInfoPtr scrn, XvMCContextPtr pContext,
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	struct intel_xvmc_hw_context *contextRec;
 
-	*priv = xcalloc(1, sizeof(struct intel_xvmc_hw_context));
+	*priv = calloc(1, sizeof(struct intel_xvmc_hw_context));
 	contextRec = (struct intel_xvmc_hw_context *) *priv;
 	if (!contextRec) {
 		*num_priv = 0;
@@ -207,7 +207,7 @@ Bool intel_xvmc_adaptor_init(ScreenPtr pScreen)
 		return FALSE;
 	}
 
-	pAdapt = xcalloc(1, sizeof(XF86MCAdaptorRec));
+	pAdapt = calloc(1, sizeof(XF86MCAdaptorRec));
 	if (!pAdapt) {
 		ErrorF("Allocation error.\n");
 		return FALSE;
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 853899f..e76f2cf 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -629,7 +629,7 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
 		int ret;
 
 		if (priv == NULL) {
-			priv = xcalloc(1, sizeof (struct intel_pixmap));
+			priv = calloc(1, sizeof (struct intel_pixmap));
 			if (priv == NULL)
 				goto BAIL;
 
@@ -650,7 +650,7 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
 		}
 	} else {
 		if (priv != NULL) {
-			xfree(priv);
+			free(priv);
 			priv = NULL;
 		}
 	}
@@ -1014,7 +1014,7 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 			}
 		}
 
-		priv = xcalloc(1, sizeof (struct intel_pixmap));
+		priv = calloc(1, sizeof (struct intel_pixmap));
 		if (priv == NULL) {
 			fbDestroyPixmap(pixmap);
 			return NullPixmap;
@@ -1028,7 +1028,7 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 								 "pixmap",
 								 size, 0);
 		if (!priv->bo) {
-			xfree(priv);
+			free(priv);
 			fbDestroyPixmap(pixmap);
 			return NullPixmap;
 		}
@@ -1147,7 +1147,7 @@ Bool i830_uxa_init(ScreenPtr screen)
 	if (!uxa_driver_init(screen, intel->uxa_driver)) {
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "UXA initialization failed\n");
-		xfree(intel->uxa_driver);
+		free(intel->uxa_driver);
 		return FALSE;
 	}
 
diff --git a/src/i830_video.c b/src/i830_video.c
index c6fd78d..d4f2b62 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -350,7 +350,7 @@ void I830InitVideo(ScreenPtr screen)
 	 * adaptors.
 	 */
 	newAdaptors =
-	    xalloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *));
+	    malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *));
 	if (newAdaptors == NULL)
 		return;
 
@@ -413,7 +413,7 @@ void I830InitVideo(ScreenPtr screen)
 	if (texturedAdaptor)
 		intel_xvmc_adaptor_init(screen);
 #endif
-	xfree(adaptors);
+	free(adaptors);
 }
 
 static XF86VideoAdaptorPtr I830SetupImageVideoOverlay(ScreenPtr screen)
@@ -426,7 +426,7 @@ static XF86VideoAdaptorPtr I830SetupImageVideoOverlay(ScreenPtr screen)
 
 	OVERLAY_DEBUG("I830SetupImageVideoOverlay\n");
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 			      sizeof(intel_adaptor_private) + sizeof(DevUnion))))
 		return NULL;
 
@@ -536,16 +536,16 @@ static XF86VideoAdaptorPtr I830SetupImageVideoTextured(ScreenPtr screen)
 
 	nAttributes = NUM_TEXTURED_ATTRIBUTES;
 
-	adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec));
-	adaptor_privs = xcalloc(nports, sizeof(intel_adaptor_private));
-	devUnions = xcalloc(nports, sizeof(DevUnion));
-	attrs = xcalloc(nAttributes, sizeof(XF86AttributeRec));
+	adapt = calloc(1, sizeof(XF86VideoAdaptorRec));
+	adaptor_privs = calloc(nports, sizeof(intel_adaptor_private));
+	devUnions = calloc(nports, sizeof(DevUnion));
+	attrs = calloc(nAttributes, sizeof(XF86AttributeRec));
 	if (adapt == NULL || adaptor_privs == NULL || devUnions == NULL ||
 	    attrs == NULL) {
-		xfree(adapt);
-		xfree(adaptor_privs);
-		xfree(devUnions);
-		xfree(attrs);
+		free(adapt);
+		free(adaptor_privs);
+		free(devUnions);
+		free(attrs);
 		return NULL;
 	}
 
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 6b177cf..ed643c6 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -727,7 +727,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		return;
 	}
 
-	prect = xalloc(sizeof(xRectangle) * npt);
+	prect = malloc(sizeof(xRectangle) * npt);
 	if (!prect)
 		return;
 	for (i = 0; i < npt; i++) {
@@ -741,7 +741,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		prect[i].height = 1;
 	}
 	pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect);
-	xfree(prect);
+	free(prect);
 }
 
 /**
@@ -764,7 +764,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		return;
 	}
 
-	prect = xalloc(sizeof(xRectangle) * (npt - 1));
+	prect = malloc(sizeof(xRectangle) * (npt - 1));
 	if (!prect)
 		return;
 	x1 = ppt[0].x;
@@ -780,7 +780,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		}
 
 		if (x1 != x2 && y1 != y2) {
-			xfree(prect);
+			free(prect);
 			uxa_check_poly_lines(pDrawable, pGC, mode, npt, ppt);
 			return;
 		}
@@ -804,7 +804,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		y1 = y2;
 	}
 	pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect);
-	xfree(prect);
+	free(prect);
 }
 
 /**
@@ -833,7 +833,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
 		}
 	}
 
-	prect = xalloc(sizeof(xRectangle) * nseg);
+	prect = malloc(sizeof(xRectangle) * nseg);
 	if (!prect)
 		return;
 	for (i = 0; i < nseg; i++) {
@@ -861,7 +861,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
 		}
 	}
 	pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect);
-	xfree(prect);
+	free(prect);
 }
 
 static Bool uxa_fill_region_solid(DrawablePtr pDrawable, RegionPtr pRegion,
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 9e59658..fde4028 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -110,7 +110,7 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
 			FreePicture(cache->picture, 0);
 
 		if (cache->glyphs)
-			xfree(cache->glyphs);
+			free(cache->glyphs);
 	}
 }
 
@@ -171,7 +171,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
 		ValidatePicture(picture);
 
 		cache->picture = picture;
-		cache->glyphs = xcalloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE);
+		cache->glyphs = calloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE);
 		if (!cache->glyphs)
 			goto bail;
 
@@ -285,7 +285,7 @@ uxa_glyph_unrealize(ScreenPtr pScreen,
 	priv->cache->glyphs[priv->pos] = NULL;
 
 	uxa_glyph_set_private(pGlyph, NULL);
-	xfree(priv);
+	free(priv);
 }
 
 /* Cut and paste from render/glyph.c - probably should export it instead */
@@ -587,7 +587,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y)
 				GlyphPtr evicted = cache->glyphs[pos + s];
 				if (evicted != NULL) {
 					if (priv != NULL)
-						xfree(priv);
+						free(priv);
 
 					priv = uxa_glyph_get_private(evicted);
 					uxa_glyph_set_private(evicted, NULL);
@@ -601,7 +601,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y)
 	}
 
 	if (priv == NULL) {
-		priv = xalloc(sizeof(struct uxa_glyph));
+		priv = malloc(sizeof(struct uxa_glyph));
 		if (priv == NULL)
 			return NULL;
 	}
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 0e4fa91..abfef8e 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -911,7 +911,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region,
 	int i;
 
 	if (num_rects > sizeof(stack_boxes) / sizeof(stack_boxes[0])) {
-		boxes = xalloc(sizeof(pixman_box16_t) * num_rects);
+		boxes = malloc(sizeof(pixman_box16_t) * num_rects);
 		if (boxes == NULL)
 			return FALSE;
 	}
@@ -926,7 +926,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region,
 	ret = pixman_region_init_rects(region, boxes, num_rects);
 
 	if (boxes != stack_boxes)
-		xfree(boxes);
+		free(boxes);
 
 	return ret;
 }
diff --git a/uxa/uxa.c b/uxa/uxa.c
index a9a705c..32b007d 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -405,7 +405,7 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
 	}
 #endif
 
-	xfree(uxa_screen);
+	free(uxa_screen);
 
 	return (*pScreen->CloseScreen) (i, pScreen);
 }
@@ -416,13 +416,13 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
  * without breaking ABI between UXA and the drivers.  The driver's
  * responsibility is to check beforehand that the UXA module has a matching
  * major number and sufficient minor.  Drivers are responsible for freeing the
- * driver structure using xfree().
+ * driver structure using free().
  *
  * @return a newly allocated, zero-filled driver structure
  */
 uxa_driver_t *uxa_driver_alloc(void)
 {
-	return xcalloc(1, sizeof(uxa_driver_t));
+	return calloc(1, sizeof(uxa_driver_t));
 }
 
 /**
@@ -467,7 +467,7 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver)
 			   "non-NULL\n", screen->myNum);
 		return FALSE;
 	}
-	uxa_screen = xcalloc(sizeof(uxa_screen_t), 1);
+	uxa_screen = calloc(sizeof(uxa_screen_t), 1);
 
 	if (!uxa_screen) {
 		LogMessage(X_WARNING,


More information about the xorg-commit mailing list