aboutsummaryrefslogtreecommitdiffstats
path: root/community/xf86-video-savage
diff options
context:
space:
mode:
Diffstat (limited to 'community/xf86-video-savage')
-rw-r--r--community/xf86-video-savage/0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch45
-rw-r--r--community/xf86-video-savage/APKBUILD39
2 files changed, 84 insertions, 0 deletions
diff --git a/community/xf86-video-savage/0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch b/community/xf86-video-savage/0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch
new file mode 100644
index 0000000000..de93d6dc76
--- /dev/null
+++ b/community/xf86-video-savage/0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch
@@ -0,0 +1,45 @@
+From 0ece556daa8a88771b669d8104396abd9166d2d0 Mon Sep 17 00:00:00 2001
+From: Stefan Dirsch <sndirsch@suse.de>
+Date: Mon, 25 Jun 2018 15:55:06 +0200
+Subject: [PATCH] Add check for max[HV]Value to ValidMode hook
+
+xorg-server 1.20 removed this check, so implement this in the driver
+itself.
+
+Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ src/savage_driver.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/savage_driver.c b/src/savage_driver.c
+index 58a294d..3cda923 100644
+--- a/src/savage_driver.c
++++ b/src/savage_driver.c
+@@ -2034,8 +2034,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n",
+ mclk / 1000.0);
+
+- pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */
+- pScrn->maxVValue = 2048; /* 11 bits of v_total */
+ pScrn->virtualX = pScrn->display->virtualX;
+ pScrn->virtualY = pScrn->display->virtualY;
+
+@@ -3637,6 +3635,14 @@ static ModeStatus SavageValidMode(SCRN_ARG_TYPE arg, DisplayModePtr pMode,
+ (pMode->VDisplay > psav->PanelY)))
+ return MODE_PANEL;
+
++ /* 11 bits of h_total 8-pixel units */
++ if (pMode->HTotal > (2048 << 3))
++ return MODE_BAD_HVALUE;
++
++ /* 11 bits of v_total */
++ if (pMode->VTotal > 2048)
++ return MODE_BAD_VVALUE;
++
+ if (psav->UseBIOS) {
+ refresh = SavageGetRefresh(pMode);
+ return (SavageMatchBiosMode(pScrn,pMode->HDisplay,
+--
+2.18.0
+
diff --git a/community/xf86-video-savage/APKBUILD b/community/xf86-video-savage/APKBUILD
new file mode 100644
index 0000000000..8389ff667d
--- /dev/null
+++ b/community/xf86-video-savage/APKBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xf86-video-savage
+pkgver=2.3.9
+pkgrel=3
+pkgdesc="S3 Savage video driver"
+url="https://xorg.freedesktop.org"
+arch="all"
+license="MIT"
+subpackages="$pkgname-doc"
+depends=
+makedepends="xorg-server-dev libxi-dev util-macros libdrm-dev mesa-dev
+ xorgproto"
+source="https://www.x.org/releases/individual/driver/$pkgname-$pkgver.tar.bz2
+ 0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+sha512sums="35fe52651fe5799bbbc6e7b3608a655102547e8f8f2189288d3f5b477f819bfc56a9a8eef39813ca455e56076e4f7c36304480c3ccddbac6c794672828cf705a xf86-video-savage-2.3.9.tar.bz2
+485112d65bf36be55eca607daf3f05f637b29826d3fb915f92158c3564f3033f40a6078be8626bd9ea7cef1cb6900fed054496d0f803a048fada905fb179235a 0001-Add-check-for-max-HV-Value-to-ValidMode-hook.patch"