90 lines
2.3 KiB
Diff
90 lines
2.3 KiB
Diff
From 9bbf539cee8b899c09454a433b8e6fca349400df Mon Sep 17 00:00:00 2001
|
|
From: Daniel Kolesa <daniel@octaforge.org>
|
|
Date: Mon, 22 Feb 2021 21:08:26 +0100
|
|
Subject: [PATCH] only attempt to use VBE on x86
|
|
|
|
---
|
|
src/mga_driver.c | 10 ++++++++--
|
|
src/mga_merge.c | 2 +-
|
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git src/mga_driver.c src/mga_driver.c
|
|
index 94183db..68f911f 100644
|
|
--- src/mga_driver.c
|
|
+++ src/mga_driver.c
|
|
@@ -77,7 +77,9 @@
|
|
|
|
#include "xf86DDC.h"
|
|
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
#include "vbe.h"
|
|
+#endif
|
|
|
|
#include "fb.h"
|
|
#include "dixstruct.h"
|
|
@@ -1378,6 +1380,7 @@ MGAdoDDC(ScrnInfoPtr pScrn)
|
|
pMga->ddc1Read ) ;
|
|
from = "DDC1";
|
|
}
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
if (!MonInfo){
|
|
vbeInfoPtr pVbe;
|
|
if (xf86LoadSubModule(pScrn, "vbe")) {
|
|
@@ -1387,6 +1390,7 @@ MGAdoDDC(ScrnInfoPtr pScrn)
|
|
from = "VBE";
|
|
}
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
if (MonInfo) {
|
|
@@ -1418,12 +1422,14 @@ MGAdoDDC(ScrnInfoPtr pScrn)
|
|
void
|
|
MGAProbeDDC(ScrnInfoPtr pScrn, int index)
|
|
{
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
vbeInfoPtr pVbe;
|
|
if (xf86LoadSubModule(pScrn, "vbe")) {
|
|
pVbe = VBEInit(NULL,index);
|
|
ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
|
|
vbeFree(pVbe);
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
Bool
|
|
@@ -1905,7 +1911,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
|
|
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Enabling KVM\n");
|
|
}
|
|
|
|
-#if !defined(__powerpc__)
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
pMga->softbooted = FALSE;
|
|
Default = (pMga->chip_attribs->dual_head_possible
|
|
&& !pMga->Primary && !pMga->SecondCrtc);
|
|
@@ -2251,7 +2257,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
|
|
*/
|
|
(*pMga->PreInit)(pScrn);
|
|
|
|
-#if !defined(__powerpc__)
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
/* Read and print the Monitor DDC info */
|
|
pScrn->monitor->DDC = MGAdoDDC(pScrn);
|
|
diff --git src/mga_merge.c src/mga_merge.c
|
|
index 64c85b4..62a6330 100644
|
|
--- src/mga_merge.c
|
|
+++ src/mga_merge.c
|
|
@@ -406,7 +406,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
|
|
*/
|
|
(*pMga->PreInit)(pScrn);
|
|
|
|
-#if !defined(__powerpc__)
|
|
+#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
/* Read and print the Monitor DDC info */
|
|
/* pScrn->monitor->DDC = MGAdoDDC(pScrn);*/ /*FIXME: have to try this*/
|
|
--
|
|
2.30.1
|
|
|