void-packages/srcpkgs/xf86-video-cirrus/patches/no-vbe-non-x86.patch

115 lines
3.0 KiB
Diff

From d80ff575021b9ae5991435f07a7ce0a948bf4054 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Mon, 22 Feb 2021 21:16:35 +0100
Subject: [PATCH] only attempt to use VBE on x86
---
src/alp_driver.c | 8 ++++++++
src/cir_driver.c | 4 ++++
src/lg_driver.c | 4 ++++
3 files changed, 16 insertions(+)
diff --git src/alp_driver.c src/alp_driver.c
index bd5e52f..f478eb5 100644
--- src/alp_driver.c
+++ src/alp_driver.c
@@ -61,7 +61,9 @@
#include "xf86DDC.h"
+#if defined(__i386__) || defined(__x86_64__)
#include "xf86int10.h"
+#endif
#include "cir.h"
#define _ALP_PRIVATE_
@@ -469,7 +471,11 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
int depth_flags;
ClockRangePtr clockRanges;
char *s;
+#if defined(__i386__) || defined(__x86_64__)
xf86Int10InfoPtr pInt = NULL;
+#else
+ void *pInt = NULL;
+#endif
if (flags & PROBE_DETECT) {
cirProbeDDC( pScrn, xf86GetEntityInfo(pScrn->entityList[0])->index );
@@ -528,6 +534,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
if (!xf86IsPc98())
#endif
+#if defined(__i386__) || defined(__x86_64__)
if (xf86LoadSubModule(pScrn, "int10"))
{
xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
@@ -541,6 +548,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 0, REGION_MEM), 0x10);
PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 1, REGION_MEM), 0x14);
}
+#endif
/* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor;
diff --git src/cir_driver.c src/cir_driver.c
index 2df4a2e..d9c2f0c 100644
--- src/cir_driver.c
+++ src/cir_driver.c
@@ -31,7 +31,9 @@
#include "alp.h"
#include "lg.h"
+#if defined(__i386__) || defined(__x86_64__)
#include "vbe.h"
+#endif
/*
* Forward definitions for the functions that make up the driver.
@@ -428,6 +430,7 @@ CirUnmapMem(CirPtr pCir, int scrnIndex)
_X_EXPORT void
cirProbeDDC(ScrnInfoPtr pScrn, int index)
{
+#if defined(__i386__) || defined(__x86_64__)
vbeInfoPtr pVbe;
if (xf86LoadSubModule(pScrn, "vbe")) {
@@ -435,4 +438,5 @@ cirProbeDDC(ScrnInfoPtr pScrn, int index)
ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
vbeFree(pVbe);
}
+#endif
}
diff --git src/lg_driver.c src/lg_driver.c
index 589d14e..6bc3154 100644
--- src/lg_driver.c
+++ src/lg_driver.c
@@ -51,7 +51,9 @@
/* Needed by the Shadow Framebuffer */
#include "shadowfb.h"
+#if defined(__i386__) || defined(__x86_64__)
#include "xf86int10.h"
+#endif
#include "fb.h"
@@ -388,6 +390,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
PCI_DEV_FUNC(pCir->PciInfo));
#endif
+#if defined(__i386__) || defined(__x86_64__)
if (xf86LoadSubModule(pScrn, "int10")) {
xf86Int10InfoPtr int10InfoPtr;
@@ -396,6 +399,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
if (int10InfoPtr)
xf86FreeInt10(int10InfoPtr);
}
+#endif
/* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor;
--
2.30.1