diff options
| author | Francisco Jerez <currojerez@gmail.com> | 2008-12-11 16:21:17 +0100 | 
|---|---|---|
| committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-17 17:16:01 -0200 | 
| commit | 6f972c9022fc3a315b60246a69399807443d2ca0 (patch) | |
| tree | 70e0974ee3a61022672c64b4c5b80d6868b79fdb | |
| parent | 1fc340dcf0abd7fa0837fef2c711aaec4fa8bcb8 (diff) | |
Fall back to UseBIOS off when VBEInit fails.
| -rw-r--r-- | src/smi_driver.c | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/src/smi_driver.c b/src/smi_driver.c index 0f39436..b5c6249 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -717,6 +717,11 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)  	    xf86LoaderReqSymLists(vbeSymbols, NULL);  	    pSmi->pVbe = VBEInit(pSmi->pInt10, pEnt->index);  	} + +	if(!pSmi->pVbe){ +	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "VBE initialization failed: falling back to UseBIOS disabled.\n"); +	    pSmi->useBIOS = FALSE; +	}      }      xf86RegisterResources(pEnt->index, NULL, ResExclusive); @@ -934,9 +939,11 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)      SMI_EnableVideo(pScrn);      SMI_UnmapMem(pScrn); -    if(pSmi->useBIOS){ +    if(pSmi->pVbe){         vbeFree(pSmi->pVbe);         pSmi->pVbe = NULL; +    } +    if(pSmi->pInt10){         xf86FreeInt10(pSmi->pInt10);         pSmi->pInt10 = NULL;      } @@ -1827,14 +1834,14 @@ SMI_CloseScreen(int scrnIndex, ScreenPtr pScreen)  	exaDriverFini(pScreen);  	pSmi->EXADriverPtr = NULL;      } -    if (pSmi->pInt10 != NULL) { -	xf86FreeInt10(pSmi->pInt10); -	pSmi->pInt10 = NULL; -    }      if (pSmi->pVbe != NULL) {  	vbeFree(pSmi->pVbe);  	pSmi->pVbe = NULL;      } +    if (pSmi->pInt10 != NULL) { +	xf86FreeInt10(pSmi->pInt10); +	pSmi->pInt10 = NULL; +    }      if (pSmi->ptrAdaptor != NULL) {  	xfree(pSmi->ptrAdaptor);      } | 
