init.texture_offset[1] = pMGADRIServer->agpTextures.handle; init.texture_size[1] = pMGADRIServer->agpTextures.size;
static Bool MGADRIKernelInit( ScreenPtr pScreen ){   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];   MGAPtr pMga = MGAPTR(pScrn);   MGADRIServerPrivatePtr pMGADRIServer = pMga->DRIServerInfo;   drmMGAInit init;   int ret;   memset( &init, 0, sizeof(drmMGAInit) );   init.sarea_priv_offset = sizeof(XF86DRISAREARec);   switch ( pMga->Chipset ) {   case PCI_CHIP_MGAG550:   case PCI_CHIP_MGAG400:      init.chipset = MGA_CARD_TYPE_G400;      break;   case PCI_CHIP_MGAG200:   case PCI_CHIP_MGAG200_PCI:      init.chipset = MGA_CARD_TYPE_G200;      break;   default:      return FALSE;   }   init.sgram = !pMga->HasSDRAM;   init.maccess = pMga->MAccess;   init.fb_cpp		= pScrn->bitsPerPixel / 8;   init.front_offset	= pMGADRIServer->frontOffset;   init.front_pitch	= pMGADRIServer->frontPitch / init.fb_cpp;   init.back_offset	= pMGADRIServer->backOffset;   init.back_pitch	= pMGADRIServer->backPitch / init.fb_cpp;   init.depth_cpp	= pScrn->bitsPerPixel / 8;   init.depth_offset	= pMGADRIServer->depthOffset;   init.depth_pitch	= pMGADRIServer->depthPitch / init.depth_cpp;   init.texture_offset[0] = pMGADRIServer->textureOffset;   init.texture_size[0] = pMGADRIServer->textureSize;   init.fb_offset = pMga->FbAddress;   init.mmio_offset = pMGADRIServer->registers.handle;   init.status_offset = pMGADRIServer->status.handle;   init.warp_offset = pMGADRIServer->warp.handle;   init.primary_offset = pMGADRIServer->primary.handle;   init.buffers_offset = pMGADRIServer->buffers.handle;   ret = drmMGAInitDMA( pMga->drmFD, &init );   if ( ret < 0 ) {      xf86DrvMsg( pScrn->scrnIndex, X_ERROR,		  "[drm] Failed to initialize DMA! (%d)\n", ret );      return FALSE;   }#if 0   /* FIXME: This is just here to clean up after the engine reset test    * in the kernel module.  Please remove it later...    */   pMga->GetQuiescence( pScrn );#endif   return TRUE;}