ChangeLog        |  141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac     |    8 +--
 debian/changelog |   13 +++++
 debian/control   |    5 -
 src/ark.h        |   12 +++-
 src/ark_accel.c  |    6 +-
 src/ark_driver.c |  108 ++++++++++++++++++++++++------------------
 7 files changed, 233 insertions(+), 60 deletions(-)

New commits:
commit 00495b90e2ee5c18fd3834dea60fa50a8eac0af9
Author: Cyril Brulebois <k...@debian.org>
Date:   Mon Mar 19 21:23:30 2012 +0000

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index ee053f2..9e9fdd9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-ark (1:0.7.4-1) UNRELEASED; urgency=low
+xserver-xorg-video-ark (1:0.7.4-1) unstable; urgency=low
 
   * New upstream release.
   * Actually merge upstream master up to da0262acee (one extra commit) to
@@ -9,7 +9,7 @@ xserver-xorg-video-ark (1:0.7.4-1) UNRELEASED; urgency=low
   * Add explicit build-dep on libpciaccess-dev, which is pulled by
     xserver-xorg-dev, just to make sure.
 
- -- Cyril Brulebois <k...@debian.org>  Mon, 19 Mar 2012 21:16:38 +0000
+ -- Cyril Brulebois <k...@debian.org>  Mon, 19 Mar 2012 21:23:25 +0000
 
 xserver-xorg-video-ark (1:0.7.3-2) unstable; urgency=low
 

commit 9c6f1732ccc85a27e79146c1f1bd62c7505a5eb8
Author: Cyril Brulebois <k...@debian.org>
Date:   Mon Mar 19 22:23:22 2012 +0100

    Add explicit build-dep on libpciaccess-dev, which is pulled by 
xserver-xorg-dev, just to make sure.

diff --git a/debian/changelog b/debian/changelog
index 33df645..ee053f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ xserver-xorg-video-ark (1:0.7.4-1) UNRELEASED; urgency=low
     build-deps.
   * Drop x11proto-randr-dev and x11proto-render-dev build-deps
     accordingly.
+  * Add explicit build-dep on libpciaccess-dev, which is pulled by
+    xserver-xorg-dev, just to make sure.
 
  -- Cyril Brulebois <k...@debian.org>  Mon, 19 Mar 2012 21:16:38 +0000
 
diff --git a/debian/control b/debian/control
index 8f43a71..bd366a8 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,8 @@ Build-Depends:
  x11proto-core-dev,
  x11proto-fonts-dev,
  x11proto-xext-dev,
- xutils-dev (>= 1:7.5+4)
+ xutils-dev (>= 1:7.5+4),
+ libpciaccess-dev (>= 0.12.901),
 Standards-Version: 3.9.1
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-ark
 Vcs-Browser: 
http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-ark.git

commit 45725e58ecd2aae17398ab5225af1f1c41916232
Author: Cyril Brulebois <k...@debian.org>
Date:   Mon Mar 19 21:21:18 2012 +0000

    Drop x11proto-randr-dev and x11proto-render-dev build-deps accordingly.

diff --git a/debian/changelog b/debian/changelog
index 7595be1..33df645 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ xserver-xorg-video-ark (1:0.7.4-1) UNRELEASED; urgency=low
   * Actually merge upstream master up to da0262acee (one extra commit) to
     get rid of unneeded checks in configure.ac, letting us drop unneeded
     build-deps.
+  * Drop x11proto-randr-dev and x11proto-render-dev build-deps
+    accordingly.
 
  -- Cyril Brulebois <k...@debian.org>  Mon, 19 Mar 2012 21:16:38 +0000
 
diff --git a/debian/control b/debian/control
index d9b5bec..8f43a71 100644
--- a/debian/control
+++ b/debian/control
@@ -11,8 +11,6 @@ Build-Depends:
  xserver-xorg-dev (>= 2:1.9.4),
  x11proto-core-dev,
  x11proto-fonts-dev,
- x11proto-randr-dev,
- x11proto-render-dev,
  x11proto-xext-dev,
  xutils-dev (>= 1:7.5+4)
 Standards-Version: 3.9.1

commit 7549d7357cc43eb2697dcda57dcf6acc79f46b0c
Author: Cyril Brulebois <k...@debian.org>
Date:   Mon Mar 19 21:18:53 2012 +0000

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 20c5867..4b677a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,144 @@
+commit da0262acee5ea37ea8c69ebadbf5e9e34d83b5f3
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Feb 16 18:39:50 2012 -0500
+
+    Don't check for unneeded proto headers.
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit e7baf1df0bbc45e1cd697f5df959586ab27103f9
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 18:04:34 2012 -0500
+
+    xf86-video-ark 0.7.4
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit c2667fb882429f9393b0700a2befe6dde4523f02
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 18:03:16 2012 -0500
+
+    Change types of FBBase/MMIOBase to pointer, remove casts
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 99ed41779e28bace7c3321a6d05e6436d4784c48
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 17:57:42 2012 -0500
+
+    Use pci_device_map_legacy rather than xf86MapDomainMemory
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 5634e78e42d14ab2325854093a42536844cae07f
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 17:44:36 2012 -0500
+
+    Fix typo in 5ab0bf04
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit c043cc44316f655c9f267bd20d1ea3e3e2b2da91
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 17:32:12 2012 -0500
+
+    Use unsigned long rather than deprecated IOADDRESS
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 1cac2174beb340f9a8b868818a5261b80435d3eb
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 17:31:26 2012 -0500
+
+    Remove uses of xf86PciInfo.h
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit bd0aa75692cc421bfeada64239fc381c40bc2ec9
+Author: Matt Turner <matts...@gmail.com>
+Date:   Thu Jan 26 17:19:36 2012 -0500
+
+    Add &component=Driver/ark to Bugzilla link
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 97a1aa4b460e6ffda16704954012063c094d770b
+Author: Matt Turner <matts...@gmail.com>
+Date:   Mon Sep 26 22:48:08 2011 -0400
+
+    Remove if(E != NULL) checks around free(E)
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 70321db733c380a3b5f2198d733d75916f54c10b
+Author: Matt Turner <matts...@gmail.com>
+Date:   Mon Sep 26 22:46:51 2011 -0400
+
+    Remove xalloc/xcalloc/xrealloc/xfree
+    
+    Signed-off-by: Matt Turner <matts...@gmail.com>
+
+commit 5ab0bf04c400f3d7d97c931b5d9e1f0318cc6f59
+Author: Adam Jackson <a...@redhat.com>
+Date:   Mon Dec 19 17:44:49 2011 -0500
+
+    Fix for new vgaHW ABI
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit 075a675e424cc2fbf7ab65e086b111ecfca7105f
+Author: Adam Jackson <a...@redhat.com>
+Date:   Mon Dec 19 16:11:53 2011 -0500
+
+    Make failure to XAA non-fatal
+    
+    No shadowfb support in this driver yet.
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit d9492762b862aa02392a011ed70e38e77e33ee40
+Author: Adam Jackson <a...@redhat.com>
+Date:   Thu Nov 17 16:22:16 2011 -0500
+
+    Adapt to videoabi 12
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit 9d3769bed020e9796e51411c63de337da5073bb4
+Author: Ondrej Zary <li...@rainbow-software.org>
+Date:   Fri Dec 3 19:23:51 2010 -0500
+
+    Don't assume that FB address registers are initialized properly
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=28249
+    
+    ark driver does not work with Hercules Stingray 64 card (ark2000pv).
+    X fails to start with:
+    
+    [...]
+    (II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
+    0x0000
+    (II) ark(0): Creating default Display subsection in Screen section
+            "Default Screen Section" for depth/fbbpp 24/32
+    (==) ark(0): Depth 24, (--) framebuffer bpp 32
+    (==) ark(0): RGB weight 888
+    (==) ark(0): Default visual is TrueColor
+    (**) ark(0): Chipset: "ark2000pv"
+    (--) ark(0): Framebuffer @ 0xe5e50000
+    (==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
+    (--) ark(0): Detected 2048 bytes video ram
+    [...]
+    Fatal server error:
+    AddScreen/ScreenInit failed for driver 0
+    
+    Comparing with lspci, the framebuffer address is wrong:
+    00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] 
(prog-if 00 [VGA controller])
+       Flags: medium devsel
+       Memory at e5000000 (32-bit, prefetchable) [size=4M]
+       [virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
+    
+    Reviewed-by: Adam Jackson <a...@redhat.com>
+
 commit 5013a760db93d08b0bb87b6ad2537b1073cedf36
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Jul 23 14:35:43 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index 906e7cd..7595be1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-ark (1:0.7.4-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+  * Actually merge upstream master up to da0262acee (one extra commit) to
+    get rid of unneeded checks in configure.ac, letting us drop unneeded
+    build-deps.
+
+ -- Cyril Brulebois <k...@debian.org>  Mon, 19 Mar 2012 21:16:38 +0000
+
 xserver-xorg-video-ark (1:0.7.3-2) unstable; urgency=low
 
   * Switch to dh:

commit da0262acee5ea37ea8c69ebadbf5e9e34d83b5f3
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Feb 16 18:39:50 2012 -0500

    Don't check for unneeded proto headers.
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/configure.ac b/configure.ac
index f859488..8d3d470 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,8 +53,6 @@ AC_ARG_WITH(xorg-module-dir, [  --with-xorg-module-dir=DIR ],
 AC_SUBST(moduledir)
 
 # Store the list of server defined optional extensions in REQUIRED_MODULES
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
-XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
 XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Obtain compiler/linker options for the driver dependencies

commit e7baf1df0bbc45e1cd697f5df959586ab27103f9
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 18:04:34 2012 -0500

    xf86-video-ark 0.7.4
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/configure.ac b/configure.ac
index 0eb7121..f859488 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-ark],
-        [0.7.3],
+        [0.7.4],
         
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/ark],
         [xf86-video-ark])
 AC_CONFIG_SRCDIR([Makefile.am])

commit c2667fb882429f9393b0700a2befe6dde4523f02
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 18:03:16 2012 -0500

    Change types of FBBase/MMIOBase to pointer, remove casts
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark.h b/src/ark.h
index f1bdb35..7462876 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -39,8 +39,8 @@ typedef struct _ARKRec {
 #endif
        EntityInfoPtr           pEnt;
        CARD32                  IOAddress;
-       unsigned char *         FBBase;
-       unsigned char *         MMIOBase;
+       pointer                 FBBase;
+       pointer                 MMIOBase;
        unsigned long           videoRam;
        OptionInfoPtr           Options;
        unsigned int            Flags;
diff --git a/src/ark_driver.c b/src/ark_driver.c
index 1f4589c..cda8cdc 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -1037,10 +1037,10 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
 
        (void) pci_device_map_legacy(pARK->PciInfo, 0xb8000, 0x8000,
                                     PCI_DEV_MAP_FLAG_WRITABLE,
-                                    (void **)&pARK->MMIOBase);
+                                    &pARK->MMIOBase);
 
        {
-               void** result = (void**)&pARK->FBBase;
+               void** result = &pARK->FBBase;
                int err = pci_device_map_range(pARK->PciInfo,
                                               
pARK->PciInfo->regions[0].base_addr,
                                               pScrn->videoRam * 1024,
@@ -1074,7 +1074,7 @@ static void ARKUnmapMem(ScrnInfoPtr pScrn)
        vgaHWUnmapMem(pScrn);
 
 #ifndef XSERVER_LIBPCIACCESS
-       xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pARK->FBBase,
+       xf86UnMapVidMem(pScrn->scrnIndex, pARK->FBBase,
                        pScrn->videoRam * 1024);
 #else
        pci_device_unmap_range(pARK->PciInfo, pARK->FBBase, pScrn->videoRam * 
1024);

commit 99ed41779e28bace7c3321a6d05e6436d4784c48
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 17:57:42 2012 -0500

    Use pci_device_map_legacy rather than xf86MapDomainMemory
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/configure.ac b/configure.ac
index cbd61e3..0eb7121 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,7 +69,7 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
 CPPFLAGS="$SAVE_CPPFLAGS"
 
 if test "x$XSERVER_LIBPCIACCESS" = xyes; then
-    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901])
 fi
 AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
diff --git a/src/ark_driver.c b/src/ark_driver.c
index cf0242c..1f4589c 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -1035,8 +1035,9 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
                                     pScrn->videoRam * 1024);
 #else
 
-       pARK->MMIOBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO,
-                                            pARK->PciInfo, 0xb8000, 0x8000);
+       (void) pci_device_map_legacy(pARK->PciInfo, 0xb8000, 0x8000,
+                                    PCI_DEV_MAP_FLAG_WRITABLE,
+                                    (void **)&pARK->MMIOBase);
 
        {
                void** result = (void**)&pARK->FBBase;

commit 5634e78e42d14ab2325854093a42536844cae07f
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 17:44:36 2012 -0500

    Fix typo in 5ab0bf04
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark_driver.c b/src/ark_driver.c
index 1c68b86..cf0242c 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -258,7 +258,7 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
                return FALSE;
 
        hwp = VGAHWPTR(pScrn);
-       vgaHWASetStdFuncs(hwp);
+       vgaHWSetStdFuncs(hwp);
        vgaHWGetIOBase(hwp);
 
        pScrn->monitor = pScrn->confScreen->monitor;

commit c043cc44316f655c9f267bd20d1ea3e3e2b2da91
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 17:32:12 2012 -0500

    Use unsigned long rather than deprecated IOADDRESS
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark_accel.c b/src/ark_accel.c
index 385a424..5ab75f0 100644
--- a/src/ark_accel.c
+++ b/src/ark_accel.c
@@ -46,7 +46,7 @@ static int curx, cury, cmd_flags;
 
 static void ARKSync(ScrnInfoPtr pScrn)
 {
-       IOADDRESS port = 0x3cb;
+       unsigned long port = 0x3cb;
 #if ABI_VIDEODRV_VERSION < 12
        port += pScrn->domainIOBase + 0x3cb;
 #endif
diff --git a/src/ark_driver.c b/src/ark_driver.c
index a39b760..1c68b86 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -82,8 +82,8 @@ static void ARKLoadPalette(ScrnInfoPtr pScrn, int numColors,
 static void ARKWriteMode(ScrnInfoPtr pScrn, vgaRegPtr pVga, ARKRegPtr new);
 
 /* helpers */
-static unsigned char get_daccomm(IOADDRESS);
-static unsigned char set_daccom(IOADDRESS, unsigned char comm);
+static unsigned char get_daccomm(unsigned long);
+static unsigned char set_daccom(unsigned long, unsigned char comm);
 
 
 _X_EXPORT DriverRec ARK =
@@ -580,8 +580,8 @@ static void ARKSave(ScrnInfoPtr pScrn)
        ARKPtr pARK = ARKPTR(pScrn);
        ARKRegPtr save = &pARK->SavedRegs;
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS isaIOBase = PIOOFFSET;
-       IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
+       unsigned long isaIOBase = PIOOFFSET;
+       unsigned long vgaIOBase = isaIOBase + hwp->IOBase;
 
        vgaHWUnlock(hwp);
        vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_ALL);
@@ -645,8 +645,8 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr 
mode)
        int multiplexing, dac16, modepitch;
        vgaHWPtr hwp = VGAHWPTR(pScrn);
        vgaRegPtr pVga = &hwp->ModeReg;
-       IOADDRESS isaIOBase = PIOOFFSET;
-       IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
+       unsigned long isaIOBase = PIOOFFSET;
+       unsigned long vgaIOBase = isaIOBase + hwp->IOBase;
        unsigned char tmp;
        int offset;
 
@@ -895,7 +895,7 @@ static void ARKAdjustFrame(int scrnIndex, int x, int y, int 
flags)
        ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
        ARKPtr pARK = ARKPTR(pScrn);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS vgaIOBase = PIOOFFSET + hwp->IOBase;
+       unsigned long vgaIOBase = PIOOFFSET + hwp->IOBase;
        int base;
 
        base = ((y * pScrn->displayWidth + x) *
@@ -922,8 +922,8 @@ static void ARKWriteMode(ScrnInfoPtr pScrn, vgaRegPtr pVga, 
ARKRegPtr new)
 {
        ARKPtr pARK = ARKPTR(pScrn);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS isaIOBase = PIOOFFSET;
-       IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
+       unsigned long isaIOBase = PIOOFFSET;
+       unsigned long vgaIOBase = isaIOBase + hwp->IOBase;
 
        vgaHWProtect(pScrn, TRUE);
 
@@ -1119,7 +1119,7 @@ static void ARKLoadPalette(ScrnInfoPtr pScrn, int 
numColors,
                           int *indicies, LOCO *colors,
                           VisualPtr pVisual)
 {
-       IOADDRESS isaIOBase = 0;
+       unsigned long isaIOBase = 0;
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
        isaIOBase += pScrn->domainIOBase;
 #endif
@@ -1145,7 +1145,7 @@ static void ARKFreeScreen(int scrnIndex, int flags)
 }
 
 
-static unsigned char get_daccomm(IOADDRESS isaIOBase)
+static unsigned char get_daccomm(unsigned long isaIOBase)
 {
        unsigned char tmp;
 
@@ -1161,7 +1161,7 @@ static unsigned char get_daccomm(IOADDRESS isaIOBase)
 }
 
 
-static unsigned char set_daccom(IOADDRESS isaIOBase, unsigned char comm)
+static unsigned char set_daccom(unsigned long isaIOBase, unsigned char comm)
 {
 #if 0
        outb(isaIOBase + 0x3c8, 0);

commit 1cac2174beb340f9a8b868818a5261b80435d3eb
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 17:31:26 2012 -0500

    Remove uses of xf86PciInfo.h
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark.h b/src/ark.h
index 077f93b..f1bdb35 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -7,10 +7,15 @@
 
 #include "xf86.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "xaa.h"
 #include "vgaHW.h"
 
+#define PCI_VENDOR_ARK                 0xEDD8
+#define PCI_CHIP_1000PV                        0xA091
+#define PCI_CHIP_2000PV                        0xA099
+#define PCI_CHIP_2000MT                        0xA0A1
+#define PCI_CHIP_2000MI                        0xA0A9
+
 typedef struct _ARKRegRec {
        unsigned char           sr10, sr11, sr12, sr13, sr14,
                                sr15, sr16, sr17, sr18, sr20,
diff --git a/src/ark_accel.c b/src/ark_accel.c
index fb6aff9..385a424 100644
--- a/src/ark_accel.c
+++ b/src/ark_accel.c
@@ -35,7 +35,6 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xaa.h"
-#include "xf86PciInfo.h"
 #include "compiler.h"
 
 #include "ark.h"
diff --git a/src/ark_driver.c b/src/ark_driver.c
index caad4c8..a39b760 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -34,7 +34,6 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "xf86fbman.h"
 #include "xf86cmap.h"
 #include "compiler.h"

commit bd0aa75692cc421bfeada64239fc381c40bc2ec9
Author: Matt Turner <matts...@gmail.com>
Date:   Thu Jan 26 17:19:36 2012 -0500

    Add &component=Driver/ark to Bugzilla link
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/configure.ac b/configure.ac
index 2142ab6..cbd61e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-ark],
         [0.7.3],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+        
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/ark],
         [xf86-video-ark])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 97a1aa4b460e6ffda16704954012063c094d770b
Author: Matt Turner <matts...@gmail.com>
Date:   Mon Sep 26 22:48:08 2011 -0400

    Remove if(E != NULL) checks around free(E)
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark_driver.c b/src/ark_driver.c
index 87d2754..caad4c8 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -171,9 +171,6 @@ static Bool ARKGetRec(ScrnInfoPtr pScrn)
 
 static void ARKFreeRec(ScrnInfoPtr pScrn)
 {
-       if (!pScrn->driverPrivate)
-               return;
-
        free(pScrn->driverPrivate);
        pScrn->driverPrivate = NULL;
 }

commit 70321db733c380a3b5f2198d733d75916f54c10b
Author: Matt Turner <matts...@gmail.com>
Date:   Mon Sep 26 22:46:51 2011 -0400

    Remove xalloc/xcalloc/xrealloc/xfree
    
    Signed-off-by: Matt Turner <matts...@gmail.com>

diff --git a/src/ark_driver.c b/src/ark_driver.c
index e8d320c..87d2754 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -174,7 +174,7 @@ static void ARKFreeRec(ScrnInfoPtr pScrn)
        if (!pScrn->driverPrivate)
                return;
 
-       xfree(pScrn->driverPrivate);
+       free(pScrn->driverPrivate);
        pScrn->driverPrivate = NULL;
 }
 
@@ -208,7 +208,7 @@ static Bool ARKProbe(DriverPtr drv, int flags)
                                        devSections, numDevSections, drv,
                                        &usedChips);
 
-       xfree(devSections);
+       free(devSections);
 
        if (numUsed <= 0)
                return FALSE;
@@ -235,7 +235,7 @@ static Bool ARKProbe(DriverPtr drv, int flags)
                foundScreen = TRUE;
        }
 
-       xfree(usedChips);
+       free(usedChips);
 
        return foundScreen;
 }
@@ -306,7 +306,7 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
        pARK = ARKPTR(pScrn);
 
        xf86CollectOptions(pScrn, NULL);
-       if (!(pARK->Options = xalloc(sizeof(ARKOptions))))
+       if (!(pARK->Options = malloc(sizeof(ARKOptions))))
                return FALSE;
        memcpy(pARK->Options, ARKOptions, sizeof(ARKOptions));
        xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pARK->Options);
@@ -355,7 +355,7 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
                pARK->ChipRev = pARK->PciInfo->revision;
 #endif
        }
-       xfree(pEnt);
+       free(pEnt);
 
        xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Chipset: \"%s\"\n", 
pScrn->chipset);
 

commit 5ab0bf04c400f3d7d97c931b5d9e1f0318cc6f59
Author: Adam Jackson <a...@redhat.com>
Date:   Mon Dec 19 17:44:49 2011 -0500

    Fix for new vgaHW ABI
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/src/ark_driver.c b/src/ark_driver.c
index 5fe648e..e8d320c 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -262,6 +262,7 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
                return FALSE;
 
        hwp = VGAHWPTR(pScrn);
+       vgaHWASetStdFuncs(hwp);
        vgaHWGetIOBase(hwp);
 
        pScrn->monitor = pScrn->confScreen->monitor;

commit 075a675e424cc2fbf7ab65e086b111ecfca7105f
Author: Adam Jackson <a...@redhat.com>
Date:   Mon Dec 19 16:11:53 2011 -0500

    Make failure to XAA non-fatal
    
    No shadowfb support in this driver yet.
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/src/ark_driver.c b/src/ark_driver.c
index b40200c..5fe648e 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -471,8 +471,9 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
 
        if (!pARK->NoAccel) {
                if (!xf86LoadSubModule(pScrn, "xaa")) {
-                       ARKFreeRec(pScrn);
-                       return FALSE;
+                       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                                  "XAA not available\n");
+                       pARK->NoAccel = 1;
                }
        }
 

commit d9492762b862aa02392a011ed70e38e77e33ee40
Author: Adam Jackson <a...@redhat.com>
Date:   Thu Nov 17 16:22:16 2011 -0500

    Adapt to videoabi 12
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/src/ark_accel.c b/src/ark_accel.c
index 8963e16..fb6aff9 100644
--- a/src/ark_accel.c
+++ b/src/ark_accel.c
@@ -47,7 +47,10 @@ static int curx, cury, cmd_flags;
 
 static void ARKSync(ScrnInfoPtr pScrn)
 {
-       IOADDRESS port = pScrn->domainIOBase + 0x3cb;
+       IOADDRESS port = 0x3cb;
+#if ABI_VIDEODRV_VERSION < 12
+       port += pScrn->domainIOBase + 0x3cb;
+#endif
 
        for (;;) {
                if (!(inb(port) & 0x40))
diff --git a/src/ark_driver.c b/src/ark_driver.c
index fec3e1a..b40200c 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -49,6 +49,12 @@
 #include "xf86Resources.h"
 #endif
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+#define PIOOFFSET hwp->PIOOffset
+#else
+#define PIOOFFSET 0
+#endif
+
 #include <string.h>
 
 /*
@@ -358,10 +364,10 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
 #endif
 
        /* unlock CRTC[0-7] */
-       outb(hwp->PIOOffset + hwp->IOBase + 4, 0x11);
-       tmp = inb(hwp->PIOOffset + hwp->IOBase + 5);
-       outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
-       modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
+       outb(PIOOFFSET + hwp->IOBase + 4, 0x11);
+       tmp = inb(PIOOFFSET + hwp->IOBase + 5);
+       outb(PIOOFFSET + hwp->IOBase + 5, tmp & 0x7f);
+       modinx(PIOOFFSET + 0x3c4, 0x1d, 0x01, 0x01);
 
 #ifndef XSERVER_LIBPCIACCESS
        pScrn->memPhysBase = pARK->PciInfo->memBase[0];
@@ -378,7 +384,7 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
        if (!pScrn->videoRam) {
                unsigned char sr10;
 
-               sr10 = rdinx(hwp->PIOOffset + 0x3c4, 0x10);
+               sr10 = rdinx(PIOOFFSET + 0x3c4, 0x10);
                if (pARK->Chipset == PCI_CHIP_1000PV) {
                        if ((sr10 & 0x40) == 0)
                                pScrn->videoRam = 1024;
@@ -403,9 +409,9 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
        {
                int man_id, dev_id;
 
-               inb(hwp->PIOOffset + 0x3c6);            /* skip cmd register */
-               man_id = inb(hwp->PIOOffset + 0x3c6);   /* manufacturer id */
-               dev_id = inb(hwp->PIOOffset + 0x3c6);   /* device id */
+               inb(PIOOFFSET + 0x3c6);         /* skip cmd register */
+               man_id = inb(PIOOFFSET + 0x3c6);        /* manufacturer id */
+               dev_id = inb(PIOOFFSET + 0x3c6);        /* device id */
                if (man_id == 0x84 && dev_id == 0x98) {
                        pARK->ramdac = ZOOMDAC;
                        pARK->dac_width = 16;
@@ -576,7 +582,7 @@ static void ARKSave(ScrnInfoPtr pScrn)
        ARKPtr pARK = ARKPTR(pScrn);
        ARKRegPtr save = &pARK->SavedRegs;
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS isaIOBase = hwp->PIOOffset;
+       IOADDRESS isaIOBase = PIOOFFSET;
        IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
 
        vgaHWUnlock(hwp);
@@ -641,7 +647,7 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr 
mode)
        int multiplexing, dac16, modepitch;
        vgaHWPtr hwp = VGAHWPTR(pScrn);
        vgaRegPtr pVga = &hwp->ModeReg;
-       IOADDRESS isaIOBase = hwp->PIOOffset;
+       IOADDRESS isaIOBase = PIOOFFSET;
        IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
        unsigned char tmp;
        int offset;
@@ -891,7 +897,7 @@ static void ARKAdjustFrame(int scrnIndex, int x, int y, int 
flags)
        ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
        ARKPtr pARK = ARKPTR(pScrn);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS vgaIOBase = hwp->PIOOffset + hwp->IOBase;
+       IOADDRESS vgaIOBase = PIOOFFSET + hwp->IOBase;
        int base;
 
        base = ((y * pScrn->displayWidth + x) *
@@ -918,7 +924,7 @@ static void ARKWriteMode(ScrnInfoPtr pScrn, vgaRegPtr pVga, 
ARKRegPtr new)
 {
        ARKPtr pARK = ARKPTR(pScrn);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
-       IOADDRESS isaIOBase = hwp->PIOOffset;
+       IOADDRESS isaIOBase = PIOOFFSET;
        IOADDRESS vgaIOBase = isaIOBase + hwp->IOBase;
 
        vgaHWProtect(pScrn, TRUE);
@@ -1115,7 +1121,10 @@ static void ARKLoadPalette(ScrnInfoPtr pScrn, int 
numColors,
                           int *indicies, LOCO *colors,
                           VisualPtr pVisual)
 {
-       IOADDRESS isaIOBase = pScrn->domainIOBase;
+       IOADDRESS isaIOBase = 0;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+       isaIOBase += pScrn->domainIOBase;
+#endif
        int i, index;
 
        for (i=0; i<numColors; i++) {

commit 9d3769bed020e9796e51411c63de337da5073bb4
Author: Ondrej Zary <li...@rainbow-software.org>
Date:   Fri Dec 3 19:23:51 2010 -0500

    Don't assume that FB address registers are initialized properly
    
    https://bugs.freedesktop.org/show_bug.cgi?id=28249
    
    ark driver does not work with Hercules Stingray 64 card (ark2000pv).
    X fails to start with:
    
    [...]
    (II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
    0x0000
    (II) ark(0): Creating default Display subsection in Screen section
            "Default Screen Section" for depth/fbbpp 24/32
    (==) ark(0): Depth 24, (--) framebuffer bpp 32
    (==) ark(0): RGB weight 888
    (==) ark(0): Default visual is TrueColor
    (**) ark(0): Chipset: "ark2000pv"
    (--) ark(0): Framebuffer @ 0xe5e50000
    (==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
    (--) ark(0): Detected 2048 bytes video ram
    [...]
    Fatal server error:
    AddScreen/ScreenInit failed for driver 0
    
    Comparing with lspci, the framebuffer address is wrong:
    00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 
00 [VGA controller])
        Flags: medium devsel
        Memory at e5000000 (32-bit, prefetchable) [size=4M]
        [virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
    
    Reviewed-by: Adam Jackson <a...@redhat.com>

diff --git a/src/ark.h b/src/ark.h
index de301dc..077f93b 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -34,7 +34,6 @@ typedef struct _ARKRec {
 #endif
        EntityInfoPtr           pEnt;
        CARD32                  IOAddress;
-       CARD32                  FBAddress;
        unsigned char *         FBBase;
        unsigned char *         MMIOBase;
        unsigned long           videoRam;
diff --git a/src/ark_driver.c b/src/ark_driver.c
index 5de3b9a..fec3e1a 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -363,14 +363,14 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
        outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
        modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
 
-       /* use membase's later on ??? */
-       pARK->FBAddress = (rdinx(hwp->PIOOffset + 0x3c4, 0x13) << 16) +
-                         (rdinx(hwp->PIOOffset + 0x3c4, 0x14) << 24);
-
-       pScrn->memPhysBase = pARK->FBAddress;
+#ifndef XSERVER_LIBPCIACCESS
+       pScrn->memPhysBase = pARK->PciInfo->memBase[0];
+#else
+       pScrn->memPhysBase = pARK->PciInfo->regions[0].base_addr;
+#endif
 
        xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Framebuffer @ 0x%lx\n",
-                  (unsigned long)pARK->FBAddress);
+                  (unsigned long)pScrn->memPhysBase);
 
        if (!xf86SetGamma(pScrn, gzeros))
                return FALSE;
@@ -748,8 +748,13 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr 
mode)
        new->sr10 = rdinx(isaIOBase + 0x3c4, 0x10) & ~0x1f;
        new->sr10 |= 0x1f;
 
-       new->sr13 = pARK->FBAddress >> 16;
-       new->sr14 = pARK->FBAddress >> 24;
+#ifndef XSERVER_LIBPCIACCESS
+       new->sr13 = pARK->PciInfo->memBase[0] >> 16;
+       new->sr14 = pARK->PciInfo->memBase[0] >> 24;
+#else
+       new->sr13 = pARK->PciInfo->regions[0].base_addr >> 16;
+       new->sr14 = pARK->PciInfo->regions[0].base_addr >> 24;
+#endif
 
        new->sr12 = rdinx(isaIOBase + 0x3c4, 0x12) & ~0x03;
        switch (pScrn->videoRam) {
@@ -1022,7 +1027,7 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
                                             pARK->PciTag, 0xb8000, 0x8000);
 
        pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
-                                    pARK->PciTag, pARK->FBAddress,
+                                    pARK->PciTag, pARK->PciInfo->memBase[0],
                                     pScrn->videoRam * 1024);
 #else
 
@@ -1032,14 +1037,17 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
        {
                void** result = (void**)&pARK->FBBase;
                int err = pci_device_map_range(pARK->PciInfo,
-                                              pARK->FBAddress,
+                                              
pARK->PciInfo->regions[0].base_addr,
                                               pScrn->videoRam * 1024,
                                               PCI_DEV_MAP_FLAG_WRITABLE |
                                               PCI_DEV_MAP_FLAG_WRITE_COMBINE,
                                               result);
                
-               if (err) 
+               if (err) {
+                       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                          "Cound not map framebuffer: %d\n", err);
                        return FALSE;
+               }
        }
 #endif
 


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1s9kvb-0000a8...@vasks.debian.org

Reply via email to