diff options
-rw-r--r-- | src/drmmode_display.c | 26 | ||||
-rw-r--r-- | src/legacy_output.c | 6 | ||||
-rw-r--r-- | src/r600_exa.c | 2 | ||||
-rw-r--r-- | src/radeon_accelfuncs.c | 2 | ||||
-rw-r--r-- | src/radeon_atombios.c | 50 | ||||
-rw-r--r-- | src/radeon_bios.c | 10 | ||||
-rw-r--r-- | src/radeon_crtc.c | 4 | ||||
-rw-r--r-- | src/radeon_dri.c | 80 | ||||
-rw-r--r-- | src/radeon_dri2.c | 30 | ||||
-rw-r--r-- | src/radeon_driver.c | 32 | ||||
-rw-r--r-- | src/radeon_exa.c | 10 | ||||
-rw-r--r-- | src/radeon_exa_funcs.c | 2 | ||||
-rw-r--r-- | src/radeon_kms.c | 20 | ||||
-rw-r--r-- | src/radeon_output.c | 4 | ||||
-rw-r--r-- | src/radeon_probe.c | 8 | ||||
-rw-r--r-- | src/radeon_textured_video.c | 4 | ||||
-rw-r--r-- | src/radeon_vbo.c | 12 | ||||
-rw-r--r-- | src/radeon_video.c | 38 | ||||
-rw-r--r-- | src/radeon_vip.c | 2 | ||||
-rw-r--r-- | src/theatre200.c | 8 |
20 files changed, 175 insertions, 175 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index c427bf10..1366b36d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -292,7 +292,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, #endif } - 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; @@ -649,15 +649,15 @@ 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); } for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) { drmModeFreeEncoder(drmmode_output->mode_encoders[i]); - xfree(drmmode_output->mode_encoders); + free(drmmode_output->mode_encoders); } - xfree(drmmode_output->props); + free(drmmode_output->props); drmModeFreeConnector(drmmode_output->mode_output); - xfree(drmmode_output); + free(drmmode_output); output->driver_private = NULL; } @@ -699,7 +699,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; @@ -725,7 +725,7 @@ drmmode_output_create_resources(xf86OutputPtr output) INT32 value = p->value; 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); @@ -747,7 +747,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); @@ -896,7 +896,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) if (!koutput) return; - kencoders = xcalloc(sizeof(drmModeEncoderPtr), koutput->count_encoders); + kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders); if (!kencoders) { goto out_free_encoders; } @@ -945,7 +945,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) goto out_free_encoders; } - drmmode_output = xcalloc(sizeof(drmmode_output_private_rec), 1); + drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1); if (!drmmode_output) { xf86OutputDestroy(output); goto out_free_encoders; @@ -985,7 +985,7 @@ out_free_encoders: if (kencoders){ for (i = 0; i < koutput->count_encoders; i++) drmModeFreeEncoder(kencoders[i]); - xfree(kencoders); + free(kencoders); } drmModeFreeConnector(koutput); @@ -1130,10 +1130,10 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) } else { if (radeon_bo_map(info->front_bo, 1)) goto fail; - fb_shadow = xcalloc(1, screen_size); + fb_shadow = calloc(1, screen_size); if (fb_shadow == NULL) goto fail; - xfree(info->fb_shadow); + free(info->fb_shadow); info->fb_shadow = fb_shadow; screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen), width, height, -1, -1, pitch * cpp, diff --git a/src/legacy_output.c b/src/legacy_output.c index fe0fbe39..670f1ba4 100644 --- a/src/legacy_output.c +++ b/src/legacy_output.c @@ -165,7 +165,7 @@ RADEONGetExtTMDSInfo(ScrnInfoPtr pScrn, radeon_dvo_ptr dvo) dvo->DVOChip = RADEONDVODeviceInit(dvo->pI2CBus, dvo->dvo_i2c_slave_addr); if (!dvo->DVOChip) - xfree(dvo->pI2CBus); + free(dvo->pI2CBus); } } } @@ -442,7 +442,7 @@ RADEONDVODeviceInit(I2CBusPtr b, I2CSlaveAddr addr) { I2CDevPtr dvo; - dvo = xcalloc(1, sizeof(I2CDevRec)); + dvo = calloc(1, sizeof(I2CDevRec)); if (dvo == NULL) return NULL; @@ -458,7 +458,7 @@ RADEONDVODeviceInit(I2CBusPtr b, I2CSlaveAddr addr) return dvo; } - xfree(dvo); + free(dvo); return NULL; } diff --git a/src/r600_exa.c b/src/r600_exa.c index 26b59d8a..b1c024a3 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -2360,7 +2360,7 @@ R600DrawInit(ScreenPtr pScreen) info->accel_state->vsync = FALSE; if (!exaDriverInit(pScreen, info->accel_state->exa)) { - xfree(info->accel_state->exa); + free(info->accel_state->exa); return FALSE; } diff --git a/src/radeon_accelfuncs.c b/src/radeon_accelfuncs.c index 36f25e71..d0bead35 100644 --- a/src/radeon_accelfuncs.c +++ b/src/radeon_accelfuncs.c @@ -1206,7 +1206,7 @@ FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, XAAInfoRecPtr a) a->ScanlineColorExpandBuffers = info->accel_state->scratch_buffer; if (!info->accel_state->scratch_save) info->accel_state->scratch_save - = xalloc(((pScrn->virtualX+31)/32*4) + = malloc(((pScrn->virtualX+31)/32*4) + (pScrn->virtualX * info->CurrentLayout.pixel_bytes)); info->accel_state->scratch_buffer[0] = info->accel_state->scratch_save; a->SetupForScanlineCPUToScreenColorExpandFill diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 30dbaf6f..996e6eee 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -490,7 +490,7 @@ rhdAtomAllocateFbScratch(atomBiosHandlePtr handle, xf86DrvMsg(handle->scrnIndex, X_INFO, "Cannot get VRAM scratch space. " "Allocating in main memory instead\n"); - handle->scratchBase = xcalloc(fb_size,1); + handle->scratchBase = calloc(fb_size,1); return ATOM_SUCCESS; } return ATOM_FAILED; @@ -651,14 +651,14 @@ rhdAtomInit(atomBiosHandlePtr unused1, AtomBiosRequestID unused2, BIOSImageSize = RADEON_VBIOS_SIZE; #endif - if (!(atomDataPtr = xcalloc(1, sizeof(atomDataTables)))) { + if (!(atomDataPtr = calloc(1, sizeof(atomDataTables)))) { xf86DrvMsg(scrnIndex,X_ERROR,"Cannot allocate memory for " "ATOM BIOS data tabes\n"); goto error; } if (!rhdAtomGetDataTable(scrnIndex, info->VBIOS, atomDataPtr, &cmd_offset, BIOSImageSize)) goto error1; - if (!(handle = xcalloc(1, sizeof(atomBiosHandleRec)))) { + if (!(handle = calloc(1, sizeof(atomBiosHandleRec)))) { xf86DrvMsg(scrnIndex,X_ERROR,"Cannot allocate memory\n"); goto error1; } @@ -677,7 +677,7 @@ rhdAtomInit(atomBiosHandlePtr unused1, AtomBiosRequestID unused2, return ATOM_SUCCESS; error1: - xfree(atomDataPtr); + free(atomDataPtr); error: return ATOM_FAILED; } @@ -688,10 +688,10 @@ rhdAtomTearDown(atomBiosHandlePtr handle, { //RHDFUNC(handle); - xfree(handle->BIOSBase); - xfree(handle->atomDataPtr); - if (handle->scratchBase) xfree(handle->scratchBase); - xfree(handle); + free(handle->BIOSBase); + free(handle->atomDataPtr); + if (handle->scratchBase) free(handle->scratchBase); + free(handle); return ATOM_SUCCESS; } @@ -777,7 +777,7 @@ rhdAtomDTDTimings(atomBiosHandlePtr handle, ATOM_DTD_FORMAT *dtd) if (!dtd->usHActive || !dtd->usVActive) return NULL; - if (!(mode = (DisplayModePtr)xcalloc(1,sizeof(DisplayModeRec)))) + if (!(mode = (DisplayModePtr)calloc(1,sizeof(DisplayModeRec)))) return NULL; mode->CrtcHDisplay = mode->HDisplay = le16_to_cpu(dtd->usHActive); @@ -861,7 +861,7 @@ rhdAtomLvdsDDC(atomBiosHandlePtr handle, uint32_t offset, unsigned char *record) - sizeof(UCHAR); if (offset > handle->BIOSImageSize) break; /* dup string as we free it later */ - if (!(EDIDBlock = (unsigned char *)xalloc( + if (!(EDIDBlock = (unsigned char *)malloc( ((ATOM_FAKE_EDID_PATCH_RECORD*)record)->ucFakeEDIDLength))) return NULL; memcpy(EDIDBlock,&((ATOM_FAKE_EDID_PATCH_RECORD*)record)->ucFakeEDIDString, @@ -871,7 +871,7 @@ rhdAtomLvdsDDC(atomBiosHandlePtr handle, uint32_t offset, unsigned char *record) { xf86MonPtr mon = xf86InterpretEDID(handle->scrnIndex,EDIDBlock); xf86PrintEDID(mon); - xfree(mon); + free(mon); } return EDIDBlock; @@ -1802,9 +1802,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo if (device_support & ATOM_DEVICE_LCD1_SUPPORT) { if (info->encoders[device_index]->dev_priv == NULL) { info->encoders[device_index]->dev_priv = - (radeon_lvds_ptr)xcalloc(1,sizeof(radeon_lvds_rec)); + (radeon_lvds_ptr)calloc(1,sizeof(radeon_lvds_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else RADEONGetATOMLVDSInfo(pScrn, (radeon_lvds_ptr)info->encoders[device_index]->dev_priv); @@ -1816,7 +1816,7 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo } } - info->encoders[device_index] = (radeon_encoder_ptr)xcalloc(1,sizeof(radeon_encoder_rec)); + info->encoders[device_index] = (radeon_encoder_ptr)calloc(1,sizeof(radeon_encoder_rec)); if (info->encoders[device_index] != NULL) { info->encoders[device_index]->encoder_id = encoder_id; info->encoders[device_index]->devices = 0; @@ -1824,9 +1824,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo // add dev_priv stuff switch (encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_LVDS: - info->encoders[device_index]->dev_priv = (radeon_lvds_ptr)xcalloc(1,sizeof(radeon_lvds_rec)); + info->encoders[device_index]->dev_priv = (radeon_lvds_ptr)calloc(1,sizeof(radeon_lvds_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else { if (info->IsAtomBios) @@ -1837,9 +1837,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo break; case ENCODER_OBJECT_ID_INTERNAL_DAC2: if (!IS_AVIVO_VARIANT) { - info->encoders[device_index]->dev_priv = (radeon_tvdac_ptr)xcalloc(1,sizeof(radeon_tvdac_rec)); + info->encoders[device_index]->dev_priv = (radeon_tvdac_ptr)calloc(1,sizeof(radeon_tvdac_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else RADEONGetTVDacAdjInfo(pScrn, (radeon_tvdac_ptr)info->encoders[device_index]->dev_priv); @@ -1847,9 +1847,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo break; case ENCODER_OBJECT_ID_INTERNAL_TMDS1: if (!IS_AVIVO_VARIANT) { - info->encoders[device_index]->dev_priv = (radeon_tmds_ptr)xcalloc(1,sizeof(radeon_tmds_rec)); + info->encoders[device_index]->dev_priv = (radeon_tmds_ptr)calloc(1,sizeof(radeon_tmds_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else RADEONGetTMDSInfo(pScrn, (radeon_tmds_ptr)info->encoders[device_index]->dev_priv); @@ -1857,9 +1857,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo break; case ENCODER_OBJECT_ID_INTERNAL_DVO1: if (!IS_AVIVO_VARIANT) { - info->encoders[device_index]->dev_priv = (radeon_dvo_ptr)xcalloc(1,sizeof(radeon_dvo_rec)); + info->encoders[device_index]->dev_priv = (radeon_dvo_ptr)calloc(1,sizeof(radeon_dvo_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else RADEONGetExtTMDSInfo(pScrn, (radeon_dvo_ptr)info->encoders[device_index]->dev_priv); @@ -1871,9 +1871,9 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: case ENCODER_OBJECT_ID_INTERNAL_LVTM1: if (device_support & ATOM_DEVICE_LCD1_SUPPORT) { - info->encoders[device_index]->dev_priv = (radeon_lvds_ptr)xcalloc(1,sizeof(radeon_lvds_rec)); + info->encoders[device_index]->dev_priv = (radeon_lvds_ptr)calloc(1,sizeof(radeon_lvds_rec)); if (info->encoders[device_index]->dev_priv == NULL) { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } else RADEONGetATOMLVDSInfo(pScrn, (radeon_lvds_ptr)info->encoders[device_index]->dev_priv); @@ -1882,7 +1882,7 @@ radeon_add_encoder(ScrnInfoPtr pScrn, uint32_t encoder_id, uint32_t device_suppo } return TRUE; } else { - ErrorF("xalloc failed\n"); + ErrorF("calloc failed\n"); return FALSE; } } diff --git a/src/radeon_bios.c b/src/radeon_bios.c index d066edce..7d615c06 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -361,9 +361,9 @@ RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) #ifdef XSERVER_LIBPCIACCESS int size = info->PciInfo->rom_size > RADEON_VBIOS_SIZE ? info->PciInfo->rom_size : RADEON_VBIOS_SIZE; - info->VBIOS = xalloc(size); + info->VBIOS = malloc(size); #else - info->VBIOS = xalloc(RADEON_VBIOS_SIZE); + info->VBIOS = malloc(RADEON_VBIOS_SIZE); #endif if (!info->VBIOS) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -381,7 +381,7 @@ RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unrecognized BIOS signature, BIOS data will not be used\n"); - xfree (info->VBIOS); + free (info->VBIOS); info->VBIOS = NULL; return FALSE; } @@ -396,7 +396,7 @@ RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) else if (info->VBIOS[dptr + 0x14] != 0x0) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Not an x86 BIOS ROM image, BIOS data will not be used\n"); - xfree (info->VBIOS); + free (info->VBIOS); info->VBIOS = NULL; return FALSE; } @@ -406,7 +406,7 @@ RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) if(!info->ROMHeaderStart) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Invalid ROM pointer, BIOS data will not be used\n"); - xfree (info->VBIOS); + free (info->VBIOS); info->VBIOS = NULL; return FALSE; } diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index bc23ee5c..5f4a0a7b 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -866,7 +866,7 @@ Bool RADEONAllocateControllers(ScrnInfoPtr pScrn, int mask) pRADEONEnt->Controller[1] = xnfcalloc(sizeof(RADEONCrtcPrivateRec), 1); if (!pRADEONEnt->Controller[1]) { - xfree(pRADEONEnt->Controller[0]); + free(pRADEONEnt->Controller[0]); return FALSE; } @@ -894,7 +894,7 @@ Bool RADEONAllocateControllers(ScrnInfoPtr pScrn, int mask) pRADEONEnt->Controller[i] = xnfcalloc(sizeof(RADEONCrtcPrivateRec), 1); if (!pRADEONEnt->Controller[i]) { - xfree(pRADEONEnt->Controller[i]); + free(pRADEONEnt->Controller[i]); return FALSE; } diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 6d12435d..ed167ed0 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -122,21 +122,21 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) if (use_db) numConfigs *= 2; if (!(pConfigs - = (__GLXvisualConfig *)xcalloc(sizeof(__GLXvisualConfig), - numConfigs))) { + = (__GLXvisualConfig *)calloc(sizeof(__GLXvisualConfig), + numConfigs))) { return FALSE; } if (!(pRADEONConfigs - = (RADEONConfigPrivPtr)xcalloc(sizeof(RADEONConfigPrivRec), - numConfigs))) { - xfree(pConfigs); + = (RADEONConfigPrivPtr)calloc(sizeof(RADEONConfigPrivRec), + numConfigs))) { + free(pConfigs); return FALSE; } if (!(pRADEONConfigPtrs - = (RADEONConfigPrivPtr *)xcalloc(sizeof(RADEONConfigPrivPtr), - numConfigs))) { - xfree(pConfigs); - xfree(pRADEONConfigs); + = (RADEONConfigPrivPtr *)calloc(sizeof(RADEONConfigPrivPtr), + numConfigs))) { + free(pConfigs); + free(pRADEONConfigs); return FALSE; } @@ -208,21 +208,21 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) if (use_db) numConfigs *= 2; if (!(pConfigs - = (__GLXvisualConfig *)xcalloc(sizeof(__GLXvisualConfig), - numConfigs))) { + = (__GLXvisualConfig *)calloc(sizeof(__GLXvisualConfig), + numConfigs))) { return FALSE; } if (!(pRADEONConfigs - = (RADEONConfigPrivPtr)xcalloc(sizeof(RADEONConfigPrivRec), - numConfigs))) { - xfree(pConfigs); + = (RADEONConfigPrivPtr)calloc(sizeof(RADEONConfigPrivRec), + numConfigs))) { + free(pConfigs); return FALSE; } if (!(pRADEONConfigPtrs - = (RADEONConfigPrivPtr *)xcalloc(sizeof(RADEONConfigPrivPtr), - numConfigs))) { - xfree(pConfigs); - xfree(pRADEONConfigs); + = (RADEONConfigPrivPtr *)calloc(sizeof(RADEONConfigPrivPtr), + numConfigs))) { + free(pConfigs); + free(pRADEONConfigs); return FALSE; } @@ -523,12 +523,12 @@ static void RADEONDRIMoveBuffers(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; } @@ -565,14 +565,14 @@ static void RADEONDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, if (nbox > 1) { /* reverse order of 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) { - xfree(pptNew2); - xfree(pboxNew2); - xfree(pptNew1); - xfree(pboxNew1); + free(pptNew2); + free(pboxNew2); + free(pptNew1); + free(pboxNew1); return; } @@ -643,10 +643,10 @@ static void RADEONDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, info->accel_state->dst_pitch_offset = info->dri->frontPitchOffset;; - xfree(pptNew2); - xfree(pboxNew2); - xfree(pptNew1); - xfree(pboxNew1); + free(pptNew2); + free(pboxNew2); + free(pptNew1); + free(pboxNew1); info->accel_state->accel->NeedToSync = TRUE; #endif /* USE_XAA */ @@ -1410,7 +1410,7 @@ Bool RADEONDRIGetVersion(ScrnInfoPtr pScrn) if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { busId = DRICreatePCIBusID(info->PciInfo); } else { - busId = xalloc(64); + busId = malloc(64); sprintf(busId, "PCI:%d:%d:%d", PCI_DEV_BUS(info->PciInfo), @@ -1420,7 +1420,7 @@ Bool RADEONDRIGetVersion(ScrnInfoPtr pScrn) /* Low level DRM open */ fd = drmOpen(RADEON_DRIVER_NAME, busId); - xfree(busId); + free(busId); if (fd < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[dri] RADEONDRIGetVersion failed to open the DRM\n" @@ -1557,7 +1557,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { pDRIInfo->busIdString = DRICreatePCIBusID(info->PciInfo); } else { - pDRIInfo->busIdString = xalloc(64); + pDRIInfo->busIdString = malloc(64); sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", PCI_DEV_BUS(info->PciInfo), @@ -1598,7 +1598,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) pDRIInfo->SAREASize = SAREA_MAX; #endif - if (!(pRADEONDRI = (RADEONDRIPtr)xcalloc(sizeof(RADEONDRIRec),1))) { + if (!(pRADEONDRI = (RADEONDRIPtr)calloc(sizeof(RADEONDRIRec),1))) { DRIDestroyInfoRec(info->dri->pDRIInfo); info->dri->pDRIInfo = NULL; return FALSE; @@ -1645,7 +1645,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) if (!DRIScreenInit(pScreen, pDRIInfo, &info->dri->drmFD)) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] DRIScreenInit failed. Disabling DRI.\n"); - xfree(pDRIInfo->devPrivate); + free(pDRIInfo->devPrivate); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec(pDRIInfo); pDRIInfo = NULL; @@ -1934,7 +1934,7 @@ void RADEONDRICloseScreen(ScreenPtr pScreen) } if (info->dri->pciGartBackup) { - xfree(info->dri->pciGartBackup); + free(info->dri->pciGartBackup); info->dri->pciGartBackup = NULL; } @@ -1944,18 +1944,18 @@ void RADEONDRICloseScreen(ScreenPtr pScreen) /* De-allocate all DRI data structures */ if (info->dri->pDRIInfo) { if (info->dri->pDRIInfo->devPrivate) { - xfree(info->dri->pDRIInfo->devPrivate); + free(info->dri->pDRIInfo->devPrivate); info->dri->pDRIInfo->devPrivate = NULL; } DRIDestroyInfoRec(info->dri->pDRIInfo); info->dri->pDRIInfo = NULL; } if (info->dri->pVisualConfigs) { - xfree(info->dri->pVisualConfigs); + free(info->dri->pVisualConfigs); info->dri->pVisualConfigs = NULL; } if (info->dri->pVisualConfigsPriv) { - xfree(info->dri->pVisualConfigsPriv); + free(info->dri->pVisualConfigsPriv); info->dri->pVisualConfigsPriv = NULL; } } diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 7d5205e9..0ecdcd4c 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -74,13 +74,13 @@ radeon_dri2_create_buffers(DrawablePtr drawable, int i, r; int flags = 0; - buffers = xcalloc(count, sizeof *buffers); + buffers = calloc(count, sizeof *buffers); if (buffers == NULL) { return NULL; } - privates = xcalloc(count, sizeof(struct dri2_buffer_priv)); + privates = calloc(count, sizeof(struct dri2_buffer_priv)); if (privates == NULL) { - xfree(buffers); + free(buffers); return NULL; } @@ -156,13 +156,13 @@ radeon_dri2_create_buffer(DrawablePtr drawable, int r; int flags; - buffers = xcalloc(1, sizeof *buffers); + buffers = calloc(1, sizeof *buffers); if (buffers == NULL) { return NULL; } - privates = xcalloc(1, sizeof(struct dri2_buffer_priv)); + privates = calloc(1, sizeof(struct dri2_buffer_priv)); if (privates == NULL) { - xfree(buffers); + free(buffers); return NULL; } @@ -240,8 +240,8 @@ radeon_dri2_destroy_buffers(DrawablePtr drawable, (*pScreen->DestroyPixmap)(private->pixmap); } if (buffers) { - xfree(buffers[0].driverPrivate); - xfree(buffers); + free(buffers[0].driverPrivate); + free(buffers); } } #else @@ -256,8 +256,8 @@ radeon_dri2_destroy_buffer(DrawablePtr drawable, BufferPtr buffers) private = buffers->driverPrivate; (*pScreen->DestroyPixmap)(private->pixmap); - xfree(buffers->driverPrivate); - xfree(buffers); + free(buffers->driverPrivate); + free(buffers); } } #endif @@ -361,7 +361,7 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, status = dixLookupDrawable(&drawable, event->drawable_id, serverClient, M_ANY, DixWriteAccess); if (status != Success) { - xfree(event); + free(event); return; } @@ -392,7 +392,7 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, break; } - xfree(event); + free(event); } static int radeon_dri2_drawable_crtc(DrawablePtr pDraw) @@ -480,7 +480,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, if (crtc == -1) goto out_complete; - wait_info = xcalloc(1, sizeof(DRI2FrameEventRec)); + wait_info = calloc(1, sizeof(DRI2FrameEventRec)); if (!wait_info) goto out_complete; @@ -614,7 +614,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, divisor &= 0xffffffff; remainder &= 0xffffffff; - swap_info = xcalloc(1, sizeof(DRI2FrameEventRec)); + swap_info = calloc(1, sizeof(DRI2FrameEventRec)); /* Drawable not displayed... just complete the swap */ if (crtc == -1 || !swap_info) @@ -749,7 +749,7 @@ blit_fallback: DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data); if (swap_info) - xfree(swap_info); + free(swap_info); *target_msc = 0; /* offscreen, so zero out target vblank count */ return TRUE; } diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 7167ea06..2b7be55c 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -368,32 +368,32 @@ void RADEONFreeRec(ScrnInfoPtr pScrn) info = RADEONPTR(pScrn); if (info->cp) { - xfree(info->cp); + free(info->cp); info->cp = NULL; } if (info->dri) { - xfree(info->dri); + free(info->dri); info->dri = NULL; } if (info->accel_state) { - xfree(info->accel_state); + free(info->accel_state); info->accel_state = NULL; } for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) { if (info->encoders[i]) { if (info->encoders[i]->dev_priv) { - xfree(info->encoders[i]->dev_priv); + free(info->encoders[i]->dev_priv); info->encoders[i]->dev_priv = NULL; } - xfree(info->encoders[i]); + free(info->encoders[i]); info->encoders[i]= NULL; } } - xfree(pScrn->driverPrivate); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } @@ -2158,7 +2158,7 @@ static Bool RADEONPreInitAccel(ScrnInfoPtr pScrn) int maxy = info->FbMapSize / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes); #endif - if (!(info->accel_state = xcalloc(1, sizeof(struct radeon_accel_state)))) { + if (!(info->accel_state = calloc(1, sizeof(struct radeon_accel_state)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to allocate accel_state rec!\n"); return FALSE; } @@ -2329,12 +2329,12 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn) info->directRenderingEnabled = FALSE; info->directRenderingInited = FALSE; - if (!(info->dri = xcalloc(1, sizeof(struct radeon_dri)))) { + if (!(info->dri = calloc(1, sizeof(struct radeon_dri)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate dri rec!\n"); return FALSE; } - if (!(info->cp = xcalloc(1, sizeof(struct radeon_cp)))) { + if (!(info->cp = calloc(1, sizeof(struct radeon_cp)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate cp rec!\n"); return FALSE; } @@ -3085,7 +3085,7 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) /* We can't do this until we have a pScrn->display. */ xf86CollectOptions(pScrn, NULL); - if (!(info->Options = xalloc(sizeof(RADEONOptions)))) + if (!(info->Options = malloc(sizeof(RADEONOptions)))) goto fail; memcpy(info->Options, RADEONOptions, sizeof(RADEONOptions)); @@ -3249,7 +3249,7 @@ fail: /* Pre-init failed. */ /* Free the video bios (if applicable) */ if (info->VBIOS) { - xfree(info->VBIOS); + free(info->VBIOS); info->VBIOS = NULL; } @@ -3670,9 +3670,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, "Initializing fb layer\n"); if (info->r600_shadow_fb) { - info->fb_shadow = xcalloc(1, - pScrn->displayWidth * pScrn->virtualY * - ((pScrn->bitsPerPixel + 7) >> 3)); + info->fb_shadow = calloc(1, + pScrn->displayWidth * pScrn->virtualY * + ((pScrn->bitsPerPixel + 7) >> 3)); if (info->fb_shadow == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate shadow framebuffer\n"); @@ -6018,7 +6018,7 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) #ifdef USE_EXA if (info->accel_state->exa) { exaDriverFini(pScreen); - xfree(info->accel_state->exa); + free(info->accel_state->exa); info->accel_state->exa = NULL; } #endif /* USE_EXA */ @@ -6029,7 +6029,7 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) info->accel_state->accel = NULL; if (info->accel_state->scratch_save) - xfree(info->accel_state->scratch_save); + free(info->accel_state->scratch_save); info->accel_state->scratch_save = NULL; } #endif /* USE_XAA */ diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 4f974c35..d7fba656 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -372,7 +372,7 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align) } #endif - new_priv = xcalloc(1, sizeof(struct radeon_exa_pixmap_priv)); + new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv)); if (!new_priv) return NULL; @@ -382,7 +382,7 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align) new_priv->bo = radeon_bo_open(info->bufmgr, 0, size, align, RADEON_GEM_DOMAIN_VRAM, 0); if (!new_priv->bo) { - xfree(new_priv); + free(new_priv); ErrorF("Failed to alloc memory\n"); return NULL; } @@ -471,7 +471,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, padded_width = RADEON_ALIGN(padded_width, pixmap_align); size = height * padded_width; - new_priv = xcalloc(1, sizeof(struct radeon_exa_pixmap_priv)); + new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv)); if (!new_priv) return NULL; @@ -483,7 +483,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, new_priv->bo = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_VRAM, 0); if (!new_priv->bo) { - xfree(new_priv); + free(new_priv); ErrorF("Failed to alloc memory\n"); return NULL; } @@ -503,7 +503,7 @@ void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv) if (driver_priv->bo) radeon_bo_unref(driver_priv->bo); - xfree(driverPriv); + free(driverPriv); } struct radeon_bo *radeon_get_pixmap_bo(PixmapPtr pPix) diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index cdc0edb5..2df6ccbd 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -904,7 +904,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) RADEONEngineInit(pScrn); if (!exaDriverInit(pScreen, info->accel_state->exa)) { - xfree(info->accel_state->exa); + free(info->accel_state->exa); return FALSE; } exaMarkSync(pScreen); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index a28f5e6c..c0d2ae66 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -227,7 +227,7 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); - if (!(info->accel_state = xcalloc(1, sizeof(struct radeon_accel_state)))) { + if (!(info->accel_state = calloc(1, sizeof(struct radeon_accel_state)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to allocate accel_state rec!\n"); return FALSE; } @@ -356,12 +356,12 @@ static Bool RADEONPreInitChipType_KMS(ScrnInfoPtr pScrn) static Bool radeon_alloc_dri(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); - if (!(info->dri = xcalloc(1, sizeof(struct radeon_dri)))) { + if (!(info->dri = calloc(1, sizeof(struct radeon_dri)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate dri rec!\n"); return FALSE; } - if (!(info->cp = xcalloc(1, sizeof(struct radeon_cp)))) { + if (!(info->cp = calloc(1, sizeof(struct radeon_cp)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate cp rec!\n"); return FALSE; } @@ -394,10 +394,10 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->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. @@ -472,7 +472,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) goto fail; xf86CollectOptions(pScrn, NULL); - if (!(info->Options = xalloc(sizeof(RADEONOptions_KMS)))) + if (!(info->Options = malloc(sizeof(RADEONOptions_KMS)))) goto fail; memcpy(info->Options, RADEONOptions_KMS, sizeof(RADEONOptions_KMS)); @@ -643,7 +643,7 @@ static Bool RADEONCloseScreen_KMS(int scrnIndex, ScreenPtr pScreen) if (info->accel_state->exa) { exaDriverFini(pScreen); - xfree(info->accel_state->exa); + free(info->accel_state->exa); info->accel_state->exa = NULL; } @@ -741,9 +741,9 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen, front_ptr = info->front_bo->ptr; if (info->r600_shadow_fb) { - info->fb_shadow = xcalloc(1, - pScrn->displayWidth * pScrn->virtualY * - ((pScrn->bitsPerPixel + 7) >> 3)); + info->fb_shadow = calloc(1, + pScrn->displayWidth * pScrn->virtualY * + ((pScrn->bitsPerPixel + 7) >> 3)); if (info->fb_shadow == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate shadow framebuffer\n"); diff --git a/src/radeon_output.c b/src/radeon_output.c index 3a0d1e94..172b8719 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -418,7 +418,7 @@ radeon_ddc_connected(xf86OutputPtr output) if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE)) xf86OutputSetEDID(output, MonInfo); } else - xfree(MonInfo); + free(MonInfo); } else MonType = MT_NONE; @@ -1295,7 +1295,7 @@ static void radeon_destroy (xf86OutputPtr output) { if (output->driver_private) - xfree(output->driver_private); + free(output->driver_private); } static void diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 1429835e..4405d404 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -100,7 +100,7 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci busIdString = DRICreatePCIBusID(pci_dev); ret = drmCheckModesettingSupported(busIdString); - xfree(busIdString); + free(busIdString); if (ret) { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, "[KMS] drm report modesetting isn't supported.\n"); @@ -195,7 +195,7 @@ radeon_get_scrninfo(int entity_num, void *pci_dev) } } - xfree(pEnt); + free(pEnt); return TRUE; } @@ -239,8 +239,8 @@ RADEONProbe(DriverPtr drv, int flags) } } - xfree(usedChips); - xfree(devSections); + free(usedChips); + free(devSections); return foundScreen; } diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 5c52a5fd..c19066b6 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -769,8 +769,8 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen) int i; int num_texture_ports = 16; - adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + num_texture_ports * - (sizeof(RADEONPortPrivRec) + sizeof(DevUnion))); + adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + num_texture_ports * + (sizeof(RADEONPortPrivRec) + sizeof(DevUnion))); if (adapt == NULL) return NULL; diff --git a/src/radeon_vbo.c b/src/radeon_vbo.c index ad650b2d..0735540d 100644 --- a/src/radeon_vbo.c +++ b/src/radeon_vbo.c @@ -97,19 +97,19 @@ void radeon_vbo_free_lists(ScrnInfoPtr pScrn) foreach_s(dma_bo, temp, &accel_state->bo_free) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - xfree(dma_bo); + free(dma_bo); } foreach_s(dma_bo, temp, &accel_state->bo_wait) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - xfree(dma_bo); + free(dma_bo); } foreach_s(dma_bo, temp, &accel_state->bo_reserved) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - xfree(dma_bo); + free(dma_bo); } } @@ -126,7 +126,7 @@ void radeon_vbo_flush_bos(ScrnInfoPtr pScrn) ErrorF("leaking dma buffer\n"); while ((dma_bo->bo = radeon_bo_unref(dma_bo->bo))) {} remove_from_list(dma_bo); - xfree(dma_bo); + free(dma_bo); continue; } @@ -157,7 +157,7 @@ void radeon_vbo_flush_bos(ScrnInfoPtr pScrn) remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - xfree(dma_bo); + free(dma_bo); } } @@ -169,7 +169,7 @@ static struct radeon_bo *radeon_vbo_get_bo(ScrnInfoPtr pScrn) struct radeon_bo *bo; if (is_empty_list(&accel_state->bo_free)) { - dma_bo = xcalloc(1, sizeof(struct radeon_dma_bo)); + dma_bo = calloc(1, sizeof(struct radeon_dma_bo)); if (!dma_bo) return NULL; diff --git a/src/radeon_video.c b/src/radeon_video.c index 5e2a7238..dc752797 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -281,7 +281,7 @@ void RADEONInitVideo(ScreenPtr pScreen) return; num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); - newAdaptors = xalloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); + newAdaptors = malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); if (newAdaptors == NULL) return; @@ -316,7 +316,7 @@ void RADEONInitVideo(ScreenPtr pScreen) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if(newAdaptors) - xfree(newAdaptors); + free(newAdaptors); } @@ -1404,7 +1404,7 @@ static void RADEONSetupTheatre(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Unsupported reference clock frequency, Rage Theatre disabled\n"); t->theatre_num=-1; - xfree(pPriv->theatre); + free(pPriv->theatre); pPriv->theatre = NULL; return; } @@ -1423,9 +1423,9 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn))) return NULL; - if(!(pPriv = xcalloc(1, sizeof(RADEONPortPrivRec) + sizeof(DevUnion)))) + if(!(pPriv = calloc(1, sizeof(RADEONPortPrivRec) + sizeof(DevUnion)))) { - xfree(adapt); + free(adapt); return NULL; } @@ -1538,7 +1538,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!xf86LoadSubModule(pScrn,"theatre")) { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } break; @@ -1548,7 +1548,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!xf86LoadSubModule(pScrn,"theatre200")) { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } pPriv->theatre->microc_path = info->RageTheatreMicrocPath; @@ -1558,7 +1558,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) default: { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unknown Theatre chip\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } } @@ -1569,7 +1569,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) xf86_InitTheatre(pPriv->theatre); if(pPriv->theatre->mode == MODE_UNINITIALIZED) { - Xfree(pPriv->theatre); + free(pPriv->theatre); pPriv->theatre = NULL; xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Rage Theatre disabled\n"); /* Here the modules must be unloaded */ @@ -3192,18 +3192,18 @@ RADEONAllocateSurface( surface->width = w; surface->height = h; - if(!(surface->pitches = xalloc(sizeof(int)))) { + if(!(surface->pitches = malloc(sizeof(int)))) { radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } - if(!(surface->offsets = xalloc(sizeof(int)))) { - xfree(surface->pitches); + if(!(surface->offsets = malloc(sizeof(int)))) { + free(surface->pitches); radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } - if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) { - xfree(surface->pitches); - xfree(surface->offsets); + if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) { + free(surface->pitches); + free(surface->offsets); radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } @@ -3247,9 +3247,9 @@ RADEONFreeSurface( RADEONStopSurface(surface); radeon_legacy_free_memory(pScrn, pPriv->surface_memory); pPriv->surface_memory = NULL; - xfree(surface->pitches); - xfree(surface->offsets); - xfree(surface->devPrivate.ptr); + free(surface->pitches); + free(surface->offsets); + free(surface->devPrivate.ptr); return Success; } @@ -3364,7 +3364,7 @@ RADEONInitOffscreenImages(ScreenPtr pScreen) XF86OffscreenImagePtr offscreenImages; /* need to free this someplace */ - if (!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec)))) + if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec)))) return; offscreenImages[0].image = &Images[0]; diff --git a/src/radeon_vip.c b/src/radeon_vip.c index 05b90f19..84570789 100644 --- a/src/radeon_vip.c +++ b/src/radeon_vip.c @@ -349,7 +349,7 @@ void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { - pPriv->VIP=xcalloc(1,sizeof(GENERIC_BUS_Rec)); + pPriv->VIP=calloc(1,sizeof(GENERIC_BUS_Rec)); pPriv->VIP->scrnIndex=pScrn->scrnIndex; pPriv->VIP->DriverPrivate.ptr=pPriv; pPriv->VIP->ioctl=RADEONVIP_ioctl; diff --git a/src/theatre200.c b/src/theatre200.c index c150ed4e..16b18400 100644 --- a/src/theatre200.c +++ b/src/theatre200.c @@ -318,10 +318,10 @@ fail_exit: curr_seg = seg_list; while(curr_seg) { - Xfree(curr_seg->data); + free(curr_seg->data); prev_seg = curr_seg; curr_seg = curr_seg->next; - Xfree(prev_seg); + free(prev_seg); } fclose(file); @@ -335,10 +335,10 @@ static void microc_clean(struct rt200_microc_data* microc_datap, int screen) while(seg_list) { - Xfree(seg_list->data); + free(seg_list->data); prev_seg = seg_list; seg_list = seg_list->next; - Xfree(prev_seg); + free(prev_seg); } } |