diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2006-08-14 17:55:14 +0300 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2007-01-28 01:24:21 +0200 |
commit | 87cf2f1874ca8a7cc492d2e2b6918ba69a8aa713 (patch) | |
tree | ac278f565376b0fee6d90184c15c26bc44bc4c92 /src/atipreinit.c | |
parent | 0b31333c9147af21c50493872779da12a3668e5d (diff) |
Minor refactoring of module (un)loading for TV_OUT.
Diffstat (limited to 'src/atipreinit.c')
-rw-r--r-- | src/atipreinit.c | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/src/atipreinit.c b/src/atipreinit.c index b525918..cb5ba13 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -178,7 +178,7 @@ ATIPreInit #ifndef AVOID_CPIO xf86Int10InfoPtr pInt10Info = NULL; - vbeInfoPtr pVBE; + vbeInfoPtr pVBE = NULL; pointer pInt10Module, pDDCModule = NULL, pVBEModule = NULL; #endif /* AVOID_CPIO */ @@ -301,14 +301,7 @@ ATIPreInit ATIProcessOptions(pScreenInfo, pATI); } -#ifdef AVOID_CPIO - - else /* if (flags & PROBE_DETECT) */ - { - return TRUE; - } - -#else /* AVOID_CPIO */ +#ifndef AVOID_CPIO #ifdef TV_OUT @@ -349,17 +342,7 @@ ATIPreInit if ((pVBE = VBEInit(pInt10Info, pATI->iEntity))) { ConfiguredMonitor = vbeDoEDID(pVBE, pDDCModule); -#ifdef TV_OUT - pATI->pInt10 = pInt10Info; - pATI->pVBE = pVBE; - pVBE = NULL; -#else - vbeFree(pVBE); -#endif /* TV_OUT */ } -#ifndef TV_OUT - xf86UnloadSubModule(pVBEModule); -#endif /* TV_OUT */ } if (!(flags & PROBE_DETECT)) @@ -383,20 +366,21 @@ ATIPreInit } #ifndef TV_OUT + /* De-activate VBE */ + vbeFree(pVBE); + xf86UnloadSubModule(pVBEModule); + /* De-activate int10 */ xf86FreeInt10(pInt10Info); xf86UnloadSubModule(pInt10Module); #else + pATI->pInt10 = pInt10Info; + pATI->pVBE = pVBE; + pVBE = NULL; pInt10Info = NULL; #endif /* TV_OUT */ - if (flags & PROBE_DETECT) - { - xf86UnloadSubModule(pDDCModule); - return TRUE; - } - - if (ConfiguredMonitor) + if (ConfiguredMonitor && !(flags & PROBE_DETECT)) { xf86PrintEDID(ConfiguredMonitor); xf86SetDDCproperties(pScreenInfo, ConfiguredMonitor); @@ -407,6 +391,11 @@ ATIPreInit #endif /* AVOID_CPIO */ + if (flags & PROBE_DETECT) + { + return TRUE; + } + pATI->Block0Base = 0; /* Might no longer be valid */ if ((pVideo = pATI->PCIInfo)) { |