summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/xf86-video-r128/0001-Fix-output-detection-on-non-x86-and-allow-override.patch197
-rw-r--r--user/xf86-video-r128/0002-Only-try-to-init-XAA-when-XAA-is-available.patch34
-rw-r--r--user/xf86-video-r128/0003-Disable-Int10-support-on-all-non-x86-arches.patch48
-rw-r--r--user/xf86-video-r128/APKBUILD14
-rw-r--r--user/xf86-video-r128/xaa.patch21
5 files changed, 288 insertions, 26 deletions
diff --git a/user/xf86-video-r128/0001-Fix-output-detection-on-non-x86-and-allow-override.patch b/user/xf86-video-r128/0001-Fix-output-detection-on-non-x86-and-allow-override.patch
new file mode 100644
index 000000000..83f70bef6
--- /dev/null
+++ b/user/xf86-video-r128/0001-Fix-output-detection-on-non-x86-and-allow-override.patch
@@ -0,0 +1,197 @@
+From c0d6b63859c4ef67bc87cf2efae1d608db176286 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Sat, 11 Nov 2023 21:15:29 -0600
+Subject: [PATCH 1/3] Fix output detection on non-x86 and allow override
+
+This exposes a new option, "ForceOutput", which is read when the VBIOS is
+inaccessible. With this change, r128 is usable on at least PPC systems.
+
+Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
+---
+ man/r128.man | 4 ++++
+ src/r128.h | 2 +-
+ src/r128_driver.c | 29 ++---------------------
+ src/r128_options.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/r128_output.c | 11 ++++++++-
+ 5 files changed, 76 insertions(+), 29 deletions(-)
+ create mode 100644 src/r128_options.h
+
+diff --git a/man/r128.man b/man/r128.man
+index a93157a..c465531 100644
+--- a/man/r128.man
++++ b/man/r128.man
+@@ -94,6 +94,10 @@ Beware that this may damage your panel, so use this
+ .B at your own risk.
+ The default depends on the device.
+ .TP
++.BI "Option \*qForceOutput\*q \*q" integer \*q
++Force a specific output layout. This option is only read when the video card BIOS is
++inaccessible (typically on non-x86 architectures). This allows you to override the
++default output layout, which is a single VGA output on port 0.
+ .BI "Option \*qPanelWidth\*q \*q" integer \*q
+ .TP
+ .BI "Option \*qPanelHeight\*q \*q" integer \*q
+diff --git a/src/r128.h b/src/r128.h
+index 6ab6beb..1ddb0f9 100644
+--- a/src/r128.h
++++ b/src/r128.h
+@@ -66,7 +66,7 @@
+ #undef R128DRI
+ #endif
+
+-#if R128DRI
++#ifdef R128DRI
+ #define _XF86DRI_SERVER_
+ #include "r128_dripriv.h"
+ #include "dri.h"
+diff --git a/src/r128_driver.c b/src/r128_driver.c
+index 6791290..213b948 100644
+--- a/src/r128_driver.c
++++ b/src/r128_driver.c
+@@ -67,6 +67,7 @@
+
+ /* Driver data structures */
+ #include "r128.h"
++#include "r128_options.h"
+ #include "r128_probe.h"
+ #include "r128_reg.h"
+ #include "r128_version.h"
+@@ -114,33 +115,6 @@ static Bool R128SaveScreen(ScreenPtr pScreen, int mode);
+ static void R128Save(ScrnInfoPtr pScrn);
+ static void R128Restore(ScrnInfoPtr pScrn);
+
+-typedef enum {
+- OPTION_NOACCEL,
+- OPTION_FBDEV,
+- OPTION_DAC_6BIT,
+- OPTION_VGA_ACCESS,
+- OPTION_SHOW_CACHE,
+- OPTION_SW_CURSOR,
+- OPTION_VIDEO_KEY,
+- OPTION_PANEL_WIDTH,
+- OPTION_PANEL_HEIGHT,
+- OPTION_PROG_FP_REGS,
+-#ifdef R128DRI
+- OPTION_XV_DMA,
+- OPTION_IS_PCI,
+- OPTION_CCE_PIO,
+- OPTION_NO_SECURITY,
+- OPTION_USEC_TIMEOUT,
+- OPTION_AGP_MODE,
+- OPTION_AGP_SIZE,
+- OPTION_RING_SIZE,
+- OPTION_BUFFER_SIZE,
+- OPTION_PAGE_FLIP,
+-#endif
+- OPTION_ACCELMETHOD,
+- OPTION_RENDERACCEL
+-} R128Opts;
+-
+ static const OptionInfoRec R128Options[] = {
+ { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE },
+@@ -166,6 +140,7 @@ static const OptionInfoRec R128Options[] = {
+ #endif
+ { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
+ { OPTION_RENDERACCEL, "RenderAccel", OPTV_BOOLEAN, {0}, FALSE },
++ { OPTION_FORCEOUTPUT, "ForceOutput", OPTV_INTEGER, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
+ };
+
+diff --git a/src/r128_options.h b/src/r128_options.h
+new file mode 100644
+index 0000000..cce765b
+--- /dev/null
++++ b/src/r128_options.h
+@@ -0,0 +1,59 @@
++/*
++ * Copyright 2023 A. Wilcox, Tulsa, Oklahoma.
++ *
++ * All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation on the rights to use, copy, modify, merge,
++ * publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so,
++ * subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR
++ * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef _R128_OPTIONS_H_
++#define _R128_OPTIONS_H_ 1
++
++typedef enum {
++ OPTION_NOACCEL,
++ OPTION_FBDEV,
++ OPTION_DAC_6BIT,
++ OPTION_VGA_ACCESS,
++ OPTION_SHOW_CACHE,
++ OPTION_SW_CURSOR,
++ OPTION_VIDEO_KEY,
++ OPTION_PANEL_WIDTH,
++ OPTION_PANEL_HEIGHT,
++ OPTION_PROG_FP_REGS,
++#ifdef R128DRI
++ OPTION_XV_DMA,
++ OPTION_IS_PCI,
++ OPTION_CCE_PIO,
++ OPTION_NO_SECURITY,
++ OPTION_USEC_TIMEOUT,
++ OPTION_AGP_MODE,
++ OPTION_AGP_SIZE,
++ OPTION_RING_SIZE,
++ OPTION_BUFFER_SIZE,
++ OPTION_PAGE_FLIP,
++#endif
++ OPTION_ACCELMETHOD,
++ OPTION_RENDERACCEL,
++ OPTION_FORCEOUTPUT
++} R128Opts;
++
++#endif /* _R128_OPTIONS_H_ */
+diff --git a/src/r128_output.c b/src/r128_output.c
+index 1d98fb9..05b8c1f 100644
+--- a/src/r128_output.c
++++ b/src/r128_output.c
+@@ -44,6 +44,7 @@
+ #endif
+
+ #include "r128.h"
++#include "r128_options.h"
+ #include "r128_probe.h"
+ #include "r128_reg.h"
+
+@@ -425,7 +426,15 @@ void R128GetConnectorInfoFromBIOS(ScrnInfoPtr pScrn, R128OutputType *otypes)
+
+ /* non-x86 platform */
+ if (!info->VBIOS) {
+- otypes[0] = OUTPUT_VGA;
++ int outputs;
++ xf86GetOptValInteger(info->Options, OPTION_FORCEOUTPUT, &outputs);
++ if (outputs) {
++ otypes[0] = outputs & 0x3;
++ otypes[1] = (outputs >> 2) & 0x3;
++ } else {
++ otypes[0] = OUTPUT_VGA;
++ }
++ return;
+ }
+
+ bios_header = R128_BIOS16(0x48);
+--
+2.39.3 (Apple Git-145)
+
diff --git a/user/xf86-video-r128/0002-Only-try-to-init-XAA-when-XAA-is-available.patch b/user/xf86-video-r128/0002-Only-try-to-init-XAA-when-XAA-is-available.patch
new file mode 100644
index 000000000..5a2167609
--- /dev/null
+++ b/user/xf86-video-r128/0002-Only-try-to-init-XAA-when-XAA-is-available.patch
@@ -0,0 +1,34 @@
+From 4f9f1ba9d55dd946b81c7bbb640a24010b4ce16c Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Sat, 11 Nov 2023 21:19:07 -0600
+Subject: [PATCH 2/3] Only try to init XAA when XAA is available
+
+---
+ src/r128_driver.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/r128_driver.c b/src/r128_driver.c
+index 213b948..109c290 100644
+--- a/src/r128_driver.c
++++ b/src/r128_driver.c
+@@ -1862,14 +1862,15 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
+ }
+
+ if (!info->noAccel) {
++#ifdef HAVE_XAA_H
+ if (R128XAAAccelInit(pScreen)) {
+ info->accelOn = TRUE;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "XAA acceleration enabled.\n");
+- } else {
++ } else
++#endif
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Acceleration disabled.\n");
+- }
+ }
+ }
+ }
+--
+2.39.3 (Apple Git-145)
+
diff --git a/user/xf86-video-r128/0003-Disable-Int10-support-on-all-non-x86-arches.patch b/user/xf86-video-r128/0003-Disable-Int10-support-on-all-non-x86-arches.patch
new file mode 100644
index 000000000..cd8b6887a
--- /dev/null
+++ b/user/xf86-video-r128/0003-Disable-Int10-support-on-all-non-x86-arches.patch
@@ -0,0 +1,48 @@
+From 4d54c24e7637a82838b5b79caa8a09bbeb8f0d99 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Sat, 11 Nov 2023 21:25:09 -0600
+Subject: [PATCH 3/3] Disable Int10 support on all non-x86 arches
+
+---
+ src/r128_driver.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/r128_driver.c b/src/r128_driver.c
+index 109c290..499ecd5 100644
+--- a/src/r128_driver.c
++++ b/src/r128_driver.c
+@@ -961,7 +961,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
+
+ static Bool R128PreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
+ {
+-#if !defined(__powerpc__) && !defined(__alpha__) && !defined(__sparc__)
++#if defined(__i386__) || defined(__x86_64__)
+ R128InfoPtr info = R128PTR(pScrn);
+ vbeInfoPtr pVbe;
+ #endif
+@@ -969,8 +969,8 @@ static Bool R128PreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
+ if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE;
+ if (!xf86LoadSubModule(pScrn, "i2c")) return FALSE;
+
+-#if defined(__powerpc__) || defined(__alpha__) || defined(__sparc__)
+- /* Int10 is broken on PPC and some Alphas */
++#if !defined(__i386__) && !defined(__x86_64__)
++ /* Int10 is broken on non-x86 */
+ return TRUE;
+ #else
+ if (xf86LoadSubModule(pScrn, "vbe")) {
+@@ -1006,9 +1006,9 @@ static Bool R128PreInitCursor(ScrnInfoPtr pScrn)
+
+ static Bool R128PreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10)
+ {
++#if defined(__i386__) || defined(__x86_64__)
+ R128InfoPtr info = R128PTR(pScrn);
+-#if !defined(__powerpc__) && !defined(__alpha__)
+- /* int10 is broken on some Alphas and powerpc */
++ /* int10 is broken on non-x86 */
+ if (xf86LoadSubModule(pScrn, "int10")) {
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
+ *ppInt10 = xf86InitInt10(info->pEnt->index);
+--
+2.39.3 (Apple Git-145)
+
diff --git a/user/xf86-video-r128/APKBUILD b/user/xf86-video-r128/APKBUILD
index 0e6702994..80d5a6922 100644
--- a/user/xf86-video-r128/APKBUILD
+++ b/user/xf86-video-r128/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xf86-video-r128
-pkgver=6.12.0
+pkgver=6.12.1
pkgrel=0
pkgdesc="ATi Rage 128 video driver for X11"
url="https://www.X.Org/"
@@ -10,8 +10,10 @@ license="X11 AND MIT"
depends=""
makedepends="util-macros xorgproto-dev xorg-server-dev"
subpackages="$pkgname-doc"
-source="https://www.x.org/releases/individual/driver/xf86-video-r128-$pkgver.tar.bz2
- xaa.patch
+source="https://www.x.org/releases/individual/driver/xf86-video-r128-$pkgver.tar.xz
+ 0001-Fix-output-detection-on-non-x86-and-allow-override.patch
+ 0002-Only-try-to-init-XAA-when-XAA-is-available.patch
+ 0003-Disable-Int10-support-on-all-non-x86-arches.patch
"
build() {
@@ -33,5 +35,7 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="0e667e2cfa8a87a00846361d86528c93754c403c812b66798953fa4c857b2143b2c4c44885da467e7f910d8cb910b69492cdcb6f25e2197bae6617364d152e38 xf86-video-r128-6.12.0.tar.bz2
-45104ea2da49933f6d40834badb58c4db8706a9bf3080df7b2538f4cb1e7964b900c10b47386b9502bb4abee796b5f40f30252d1526e26d860b833c4dabca8ba xaa.patch"
+sha512sums="18b2408fe68161c32f84c7147717f8e6c6377e81e9d59e2f098843c54cd0ae757aab5059568da8c71ef38100807d56ee22447417c236c1b3deea292bb676e700 xf86-video-r128-6.12.1.tar.xz
+2b4e4769ef05a2daa552a15adc92ba2b8fc3417e6e43111715ea0c8b0c7a77a97e94b858f3062cf71a73beed0a6f487e765b505e96b7636d881dc10afe4eba5e 0001-Fix-output-detection-on-non-x86-and-allow-override.patch
+490f598f268d3ab3c19deed1f1f1d64a5f4c628cb8fb0f15448942480f13517ad7a3eeabcc9fcb3a98e9988aef96870c44ec4d96743fd742050971387e11cb67 0002-Only-try-to-init-XAA-when-XAA-is-available.patch
+f5871aa1cf8231bd8c983cb78c0602991facef4be04aa12d3f08258cf40c9e1087c55f275efb4e27dc934e55b40805a18acfcc8454ab97dd75adaeb5a09917b9 0003-Disable-Int10-support-on-all-non-x86-arches.patch"
diff --git a/user/xf86-video-r128/xaa.patch b/user/xf86-video-r128/xaa.patch
deleted file mode 100644
index 3ede81203..000000000
--- a/user/xf86-video-r128/xaa.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- xf86-video-r128-6.12.0/src/r128_driver.c.old 2019-01-05 15:59:11.340000000 +0000
-+++ xf86-video-r128-6.12.0/src/r128_driver.c 2019-01-05 16:16:10.810000000 +0000
-@@ -1887,14 +1887,16 @@
- }
-
- if (!info->noAccel) {
-+#ifdef HAVE_XAA_H
- if (R128XAAAccelInit(pScreen)) {
- info->accelOn = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "XAA acceleration enabled.\n");
-- } else {
-+ } else
-+#endif
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Acceleration disabled.\n");
-- }
-+
- }
- }
- }