xserver-xorg-video-siliconmotion: Changes to 'debian-unstable'
debian/changelog | 9 +
debian/patches/fix-arm64-ftbfs.diff | 171 ++++++++++++++++++++++++++++++++++++
debian/patches/fix-screeninit.diff | 27 +++++
debian/patches/series | 3
4 files changed, 209 insertions(+), 1 deletion(-)
New commits:
commit 3b4496ad308ea3107f8887fef4a507288f0d68f2
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 9 13:56:41 2017 +0200
fix-arm64-ftbfs.diff: Fix arm64 build, possibly also hppa, m68k, sh4.
diff --git a/debian/changelog b/debian/changelog
index 689dd82..e25d4da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xserver-xorg-video-siliconmotion (1:1.7.9-2) UNRELEASED; urgency=medium
* fix-screeninit.diff: Fix driver crashing xserver 1.19. Thanks Steven
Chamberlain! (Closes: #853153)
+ * fix-arm64-ftbfs.diff: Fix arm64 build, possibly also hppa, m68k,
+ sh4.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 09 Mar 2017 13:22:22 +0200
diff --git a/debian/patches/fix-arm64-ftbfs.diff b/debian/patches/fix-arm64-ftbfs.diff
new file mode 100644
index 0000000..8aeec45
--- /dev/null
+++ b/debian/patches/fix-arm64-ftbfs.diff
@@ -0,0 +1,171 @@
+From eee8fd4c489a693344da0bba14cfa54c54610b89 Mon Sep 17 00:00:00 2001
+From: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
+Date: Thu, 9 Mar 2017 13:31:34 +0200
+Subject: [PATCH] Fix build against xorg server 1.17 on certain architectures
+
+Fixes at least arm64, likely also hppa, m68k, sh4.
+
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
+---
+ src/regsmi.h | 18 ++++++++++++++++++
+ src/smi.h | 2 ++
+ src/smi_driver.c | 19 +++++++++----------
+ src/smilynx_crtc.c | 6 +++---
+ src/smilynx_hw.c | 5 ++---
+ 5 files changed, 34 insertions(+), 16 deletions(-)
+
+diff --git a/src/regsmi.h b/src/regsmi.h
+index 5dd0320..69205ba 100644
+--- a/src/regsmi.h
++++ b/src/regsmi.h
+@@ -64,8 +64,13 @@ VGAIN8_INDEX(SMIPtr pSmi, int indexPort, int dataPort, CARD8 index)
+ MMIO_OUT8(pSmi->IOBase, indexPort, index);
+ return(MMIO_IN8(pSmi->IOBase, dataPort));
+ } else {
++#ifdef XSERVER_LIBPCIACCESS
++ pci_io_write8(pSmi->io, indexPort, index);
++ return pci_io_read8(pSmi->io, dataPort);
++#else
+ outb(pSmi->PIOBase + indexPort, index);
+ return(inb(pSmi->PIOBase + dataPort));
++#endif
+ }
+ }
+
+@@ -76,8 +81,13 @@ VGAOUT8_INDEX(SMIPtr pSmi, int indexPort, int dataPort, CARD8 index, CARD8 data)
+ MMIO_OUT8(pSmi->IOBase, indexPort, index);
+ MMIO_OUT8(pSmi->IOBase, dataPort, data);
+ } else {
++#ifdef XSERVER_LIBPCIACCESS
++ pci_io_write8(pSmi->io, indexPort, index);
++ pci_io_write8(pSmi->io, dataPort, data);
++#else
+ outb(pSmi->PIOBase + indexPort, index);
+ outb(pSmi->PIOBase + dataPort, data);
++#endif
+ }
+ }
+
+@@ -87,7 +97,11 @@ VGAIN8(SMIPtr pSmi, int port)
+ if (pSmi->IOBase) {
+ return(MMIO_IN8(pSmi->IOBase, port));
+ } else {
++#ifdef XSERVER_LIBPCIACCESS
++ return pci_io_read8(pSmi->io, port);
++#else
+ return(inb(pSmi->PIOBase + port));
++#endif
+ }
+ }
+
+@@ -97,7 +111,11 @@ VGAOUT8(SMIPtr pSmi, int port, CARD8 data)
+ if (pSmi->IOBase) {
+ MMIO_OUT8(pSmi->IOBase, port, data);
+ } else {
++#ifdef XSERVER_LIBPCIACCESS
++ pci_io_write8(pSmi->io, port, data);
++#else
+ outb(pSmi->PIOBase + port, data);
++#endif
+ }
+ }
+
+diff --git a/src/smi.h b/src/smi.h
+index 2742c8d..1f20a2d 100644
+--- a/src/smi.h
++++ b/src/smi.h
+@@ -171,6 +171,8 @@ typedef struct
+ pciVideoPtr PciInfo; /* PCI info vars */
+ #ifndef XSERVER_LIBPCIACCESS
+ PCITAG PciTag;
++#else
++ struct pci_io_handle *io;
+ #endif
+ int Chipset; /* Chip info, set using PCI
+ above */
+diff --git a/src/smi_driver.c b/src/smi_driver.c
+index 8949cae..6bdf64d 100644
+--- a/src/smi_driver.c
++++ b/src/smi_driver.c
+@@ -446,6 +446,9 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
+ pSmi->PIOBase = hwp->PIOOffset;
+ #else
+ pSmi->PIOBase = 0;
++#ifdef XSERVER_LIBPCIACCESS
++ pSmi->io = hwp->io;
++#endif
+ #endif
+
+ xf86ErrorFVerb(VERBLEV, "\tSMI_PreInit vgaCRIndex=%x, vgaIOBase=%x, "
+@@ -2022,16 +2025,14 @@ SMI_EnableMmio(ScrnInfoPtr pScrn)
+ vgaHWSetStdFuncs(hwp);
+
+ /* Enable linear mode */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x18);
+- tmp = inb(pSmi->PIOBase + VGA_SEQ_DATA);
++ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x18);
+ pSmi->SR18Value = tmp; /* PDR#521 */
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, tmp | 0x11);
++ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x18, tmp | 0x11);
+
+ /* Enable 2D/3D Engine and Video Processor */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x21);
+- tmp = inb(pSmi->PIOBase + VGA_SEQ_DATA);
++ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21);
+ pSmi->SR21Value = tmp; /* PDR#521 */
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, tmp & ~0x03);
++ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, tmp & ~0x03);
+ }
+
+ LEAVE();
+@@ -2050,12 +2051,10 @@ SMI_DisableMmio(ScrnInfoPtr pScrn)
+ vgaHWSetStdFuncs(hwp);
+
+ /* Disable 2D/3D Engine and Video Processor */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x21);
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, pSmi->SR21Value); /* PDR#521 */
++ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, pSmi->SR21Value); /* PDR#521 */
+
+ /* Disable linear mode */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x18);
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, pSmi->SR18Value); /* PDR#521 */
++ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x18, pSmi->SR18Value); /* PDR#521 */
+ }
+
+ LEAVE();
+diff --git a/src/smilynx_crtc.c b/src/smilynx_crtc.c
+index fb7183c..f4d8b4e 100644
+--- a/src/smilynx_crtc.c
++++ b/src/smilynx_crtc.c
+@@ -619,9 +619,9 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crtc,
+ xf86ExecX86int10(pSmi->pInt10);
+
+ /* Enable linear mode. */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x18);
+- tmp = inb(pSmi->PIOBase + VGA_SEQ_DATA);
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, tmp | 0x01);
++ VGAOUT8(pSmi, VGA_SEQ_INDEX, 0x18);
++ tmp = VGAIN8(pSmi, VGA_SEQ_DATA);
++ VGAOUT8(pSmi, VGA_SEQ_DATA, tmp | 0x01);
+
+ /* Enable DPR/VPR registers. */
+ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21);
+diff --git a/src/smilynx_hw.c b/src/smilynx_hw.c
+index b2ee8a5..40aa5a4 100644
+--- a/src/smilynx_hw.c
++++ b/src/smilynx_hw.c
+@@ -365,9 +365,8 @@ SMILynx_WriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, SMIRegPtr restore)
+ xf86ExecX86int10(pSmi->pInt10);
+
+ /* Enable linear mode. */
+- outb(pSmi->PIOBase + VGA_SEQ_INDEX, 0x18);
+- tmp = inb(pSmi->PIOBase + VGA_SEQ_DATA);
+- outb(pSmi->PIOBase + VGA_SEQ_DATA, tmp | 0x01);
++ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x18);
++ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x18, tmp | 0x01);
+
+ /* Enable DPR/VPR registers. */
+ tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21);
+--
+2.7.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 2cb8dbc..e399b4e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
fix-screeninit.diff
+fix-arm64-ftbfs.diff
commit 4daff52705529bd4c5ccf11c340977b42f1b07a2
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 9 13:26:12 2017 +0200
fix-screeninit.diff: Fix driver crashing xserver 1.19. Thanks Steven Chamberlain! (Closes: #853153)
diff --git a/debian/changelog b/debian/changelog
index b9c8632..689dd82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-siliconmotion (1:1.7.9-2) UNRELEASED; urgency=medium
+
+ * fix-screeninit.diff: Fix driver crashing xserver 1.19. Thanks Steven
+ Chamberlain! (Closes: #853153)
+
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 09 Mar 2017 13:22:22 +0200
+
xserver-xorg-video-siliconmotion (1:1.7.9-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/fix-screeninit.diff b/debian/patches/fix-screeninit.diff
new file mode 100644
index 0000000..1ef5ab0
--- /dev/null
+++ b/debian/patches/fix-screeninit.diff
@@ -0,0 +1,27 @@
+Author: Steven Chamberlain <steven@pyro.eu.org>
+Description: Don't crash on ScreenInit with xserver 1.19
+
+diff --git a/src/smi_driver.c b/src/smi_driver.c
+index 8949cae..5023e63 100644
+--- a/src/smi_driver.c
++++ b/src/smi_driver.c
+@@ -1787,6 +1787,9 @@ SMI_ScreenInit(SCREEN_INIT_ARGS_DECL)
+ "Hardware cursor initialization failed\n");
+ }
+
++ if(!xf86CrtcScreenInit(pScreen))
++ LEAVE(FALSE);
++
+ /* Initialise default colormap */
+ if (!miCreateDefColormap(pScreen))
+ LEAVE(FALSE);
+@@ -1810,9 +1813,6 @@ SMI_ScreenInit(SCREEN_INIT_ARGS_DECL)
+
+ SMI_InitVideo(pScreen);
+
+- if(!xf86CrtcScreenInit(pScreen))
+- LEAVE(FALSE);
+-
+ /* Report any unused options (only for the first generation) */
+ if (serverGeneration == 1) {
+ xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
diff --git a/debian/patches/series b/debian/patches/series
index fdffa2a..2cb8dbc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# placeholder
+fix-screeninit.diff
Reply to: