File U_preinit-Don-t-bother-explicitly-loading-int10-vbe-will-do-it-for-us.patch of Package xf86-video-mach64.openSUSE_13.1_Update

From: Adam Jackson <ajax@redhat.com>
Date: Tue Apr 2 11:15:47 2013 -0400
Subject: [PATCH]preinit: Don't bother explicitly loading int10, vbe will do it for us
Patch-mainline: Upstream
Git-commit: fa18180cc5f6d84168ffca6b7b8e467a5c72da14
Git-repo: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-mach64
References: boo#736953
Signed-off-by: Egbert Eich <eich@suse.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 src/atipreinit.c | 51 ++++++++++-----------------------------------------
 1 file changed, 10 insertions(+), 41 deletions(-)

diff --git a/src/atipreinit.c b/src/atipreinit.c
index 0f5c785..e3048d2 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -531,9 +531,8 @@ ATIPreInit
 
 #ifndef AVOID_CPIO
 
-    xf86Int10InfoPtr pInt10Info = NULL;
     vbeInfoPtr       pVBE = NULL;
-    pointer          pInt10Module, pDDCModule = NULL, pVBEModule = NULL;
+    pointer          pVBEModule = NULL;
 
 #endif /* AVOID_CPIO */
 
@@ -657,42 +656,21 @@ ATIPreInit
 #endif /* TV_OUT */
 
     /*
-     * If there is an ix86-style BIOS, ensure its initialisation entry point
-     * has been executed, and retrieve DDC and VBE information from it.
+     * If VBE setup works, grab DDC from it
      */
-    if (!(pInt10Module = xf86LoadSubModule(pScreenInfo, "int10")))
-    {
-        xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
-            "Unable to load int10 module.\n");
-    }
-    else if (!(pInt10Info = xf86InitInt10(pATI->iEntity)))
-    {
-        xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
-             "Unable to initialise int10 interface.\n");
+    if (!(pVBEModule = xf86LoadSubModule(pScreenInfo, "vbe"))) {
+	xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
+		   "Unable to load vbe module.\n");
     }
     else
     {
-        if (!(pDDCModule = xf86LoadSubModule(pScreenInfo, "ddc")))
-        {
-            xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
-                "Unable to load ddc module.\n");
-        }
-        else
-        if (!(pVBEModule = xf86LoadSubModule(pScreenInfo, "vbe")))
-        {
-            xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
-                "Unable to load vbe module.\n");
-        }
-        else
-        {
-            if ((pVBE = VBEInit(pInt10Info, pATI->iEntity)))
-            {
-                ConfiguredMonitor = vbeDoEDID(pVBE, pDDCModule);
-            }
-        }
+	if ((pVBE = VBEInit(NULL, pATI->iEntity)))
+	    ConfiguredMonitor = vbeDoEDID(pVBE, NULL);
 
-        if (!(flags & PROBE_DETECT))
+        if (pVBE && !(flags & PROBE_DETECT))
         {
+	    xf86Int10InfoPtr pInt10Info = pVBE->pInt10;
+
             /* Validate, then make a private copy of, the initialised BIOS */
             CARD8 *pBIOS = xf86int10Addr(pInt10Info, pInt10Info->BIOSseg << 4);
 
@@ -715,15 +693,9 @@ ATIPreInit
     /* 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 (ConfiguredMonitor && !(flags & PROBE_DETECT))
@@ -732,9 +704,6 @@ ATIPreInit
         xf86SetDDCproperties(pScreenInfo, ConfiguredMonitor);
     }
 
-    /* DDC module is no longer needed at this point */
-    xf86UnloadSubModule(pDDCModule);
-
 #endif /* AVOID_CPIO */
 
     if (flags & PROBE_DETECT)
openSUSE Build Service is sponsored by