[PATCH xf86-video-trident] Compilation fix for NEC PC-98x1 specific code inside trident_driver.c

Kevin Brace kevinbrace at gmx.com
Sat Feb 16 16:41:15 UTC 2019


Unfortunately, commit 122747b2317fa6f82add70701efa8f853989ca3d broke
the order of various NEC PC-98x1 specific initialization functions
that was compiled for X Servers up to ABI_VIDEODRV_VERSION < 12.
This commit fixes the issue.

Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/trident_driver.c |  122 +++++++++++++++++++++++++-------------------------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/src/trident_driver.c b/src/trident_driver.c
index 215b5e7..bc8a2b1 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -592,67 +592,6 @@ TRIDENTDisableMMIO(ScrnInfoPtr pScrn)
 }
 
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
-/* Initialize VGA Block for Trident Chip on PC-98x1 */
-static void
-PC98TRIDENTInit(ScrnInfoPtr pScrn)
-{
-    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-    switch (pTrident->Chipset) {
-    case TGUI9660:
-    case TGUI9680:
-    case PROVIDIA9682:
-        PC98TRIDENT96xxInit(pScrn);
-        break;
-    case CYBER9320:
-    case CYBER9385:
-        PC98TRIDENT9385Init(pScrn);
-        break;
-    default: /* Run 96xx code as default */
-        PC98TRIDENT96xxInit(pScrn);
-        break;
-    }
-}
-
-static void
-PC98TRIDENTEnable(ScrnInfoPtr pScrn)
-{
-    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-    switch (pTrident->Chipset) {
-    case TGUI9660:
-    case TGUI9680:
-    case PROVIDIA9682:
-        PC98TRIDENT96xxEnable(pScrn);
-        break;
-    case CYBER9320:
-    case CYBER9385:
-        PC98TRIDENT9385Enable(pScrn);
-        break;
-    default: /* Run 96xx code as default */
-        PC98TRIDENT96xxEnable(pScrn);
-        break;
-    }
-}
-
-static void
-PC98TRIDENTDisable(ScrnInfoPtr pScrn)
-{
-    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-    switch (pTrident->Chipset) {
-    case TGUI9660:
-    case TGUI9680:
-    case PROVIDIA9682:
-        PC98TRIDENT96xxDisable(pScrn);
-        break;
-    case CYBER9320:
-    case CYBER9385:
-        PC98TRIDENT9385Disable(pScrn);
-        break;
-    default: /* Run 96xx code as default */
-        PC98TRIDENT96xxDisable(pScrn);
-        break;
-    }
-}
-
 /* Initialize VGA Block for Cyber9385 on PC-98x1 */
 static void
 PC98TRIDENT9385Init(ScrnInfoPtr pScrn)
@@ -834,6 +773,67 @@ PC98TRIDENT96xxDisable(ScrnInfoPtr pScrn)
     outb(0x6A, 0x06);
     outb(0x68, 0x0F);
 }
+
+/* Initialize VGA Block for Trident Chip on PC-98x1 */
+static void
+PC98TRIDENTInit(ScrnInfoPtr pScrn)
+{
+    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+    switch (pTrident->Chipset) {
+    case TGUI9660:
+    case TGUI9680:
+    case PROVIDIA9682:
+        PC98TRIDENT96xxInit(pScrn);
+        break;
+    case CYBER9320:
+    case CYBER9385:
+        PC98TRIDENT9385Init(pScrn);
+        break;
+    default: /* Run 96xx code as default */
+        PC98TRIDENT96xxInit(pScrn);
+        break;
+    }
+}
+
+static void
+PC98TRIDENTEnable(ScrnInfoPtr pScrn)
+{
+    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+    switch (pTrident->Chipset) {
+    case TGUI9660:
+    case TGUI9680:
+    case PROVIDIA9682:
+        PC98TRIDENT96xxEnable(pScrn);
+        break;
+    case CYBER9320:
+    case CYBER9385:
+        PC98TRIDENT9385Enable(pScrn);
+        break;
+    default: /* Run 96xx code as default */
+        PC98TRIDENT96xxEnable(pScrn);
+        break;
+    }
+}
+
+static void
+PC98TRIDENTDisable(ScrnInfoPtr pScrn)
+{
+    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+    switch (pTrident->Chipset) {
+    case TGUI9660:
+    case TGUI9680:
+    case PROVIDIA9682:
+        PC98TRIDENT96xxDisable(pScrn);
+        break;
+    case CYBER9320:
+    case CYBER9385:
+        PC98TRIDENT9385Disable(pScrn);
+        break;
+    default: /* Run 96xx code as default */
+        PC98TRIDENT96xxDisable(pScrn);
+        break;
+    }
+}
 #endif
 
 /*
-- 
1.7.9.5



More information about the xorg-devel mailing list