Commit 57981758 authored by anholt's avatar anholt
Browse files

check and set DRM_AGP_NO_HANDLE consistently

Obtained from:	sourceforge.net CVS
parent 186d5da2
......@@ -1329,10 +1329,10 @@ void R128DRICloseScreen(ScreenPtr pScreen)
drmUnmap(info->ring, info->ringMapSize);
info->ring = NULL;
}
if (info->agpMemHandle!=DRM_AGP_NO_HANDLE) {
if (info->agpMemHandle != DRM_AGP_NO_HANDLE) {
drmAgpUnbind(info->drmFD, info->agpMemHandle);
drmAgpFree(info->drmFD, info->agpMemHandle);
info->agpMemHandle = 0;
info->agpMemHandle = DRM_AGP_NO_HANDLE;
drmAgpRelease(info->drmFD);
}
if (info->pciMemHandle) {
......
......@@ -1389,10 +1389,10 @@ void MGADRICloseScreen( ScreenPtr pScreen )
pMGADRIServer->agpTextures.map = NULL;
}
if ( pMGADRIServer->agp.handle ) {
if ( pMGADRIServer->agp.handle != DRM_AGP_NO_HANDLE ) {
drmAgpUnbind( pMga->drmFD, pMGADRIServer->agp.handle );
drmAgpFree( pMga->drmFD, pMGADRIServer->agp.handle );
pMGADRIServer->agp.handle = 0;
pMGADRIServer->agp.handle = DRM_AGP_NO_HANDLE;
drmAgpRelease( pMga->drmFD );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment