xserver-xorg-video-ark: Changes to 'upstream-experimental'
.cvsignore | 19 -------------------
.gitignore | 20 ++++++++++++++++++++
configure.ac | 15 ++++++++++++++-
src/.cvsignore | 6 ------
src/.gitignore | 6 ++++++
src/ark.h | 13 ++++++++-----
src/ark_accel.c | 1 -
src/ark_driver.c | 39 ++++++++++++++++++++++++++++++++++++---
src/ark_reg.h | 1 -
9 files changed, 84 insertions(+), 36 deletions(-)
New commits:
commit 2a5d9ade17e5d084b25bf2afdc42d9d2d2147f49
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Mar 19 13:17:03 2008 -0400
ark 0.7.0
diff --git a/configure.ac b/configure.ac
index 71a35cc..987ae70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-ark],
- 0.6.0,
+ 0.7.0,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-ark)
commit d6bed919dd458459079ff88a61665a0fb21be7ba
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Mar 19 13:15:33 2008 -0400
Death to RCS tags.
diff --git a/src/ark.h b/src/ark.h
index fbbef48..de301dc 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ark/ark.h,v 1.2 2001/01/29 15:15:44 keithp Exp $ */
/*
* ark
*/
diff --git a/src/ark_accel.c b/src/ark_accel.c
index 315226d..8963e16 100644
--- a/src/ark_accel.c
+++ b/src/ark_accel.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ark/ark_accel.c,v 1.6 2002/01/25 21:55:56 tsi Exp $ */
/*
* Copyright 2000 Ani Joshi <ajoshi@unixbox.com>
*
diff --git a/src/ark_driver.c b/src/ark_driver.c
index 24418ff..9b0f797 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ark/ark_driver.c,v 1.22 2003/08/23 15:02:53 dawes Exp $ */
/*
* Copyright 2000 Ani Joshi <ajoshi@unixbox.com>
*
diff --git a/src/ark_reg.h b/src/ark_reg.h
index 91a9301..f773244 100644
--- a/src/ark_reg.h
+++ b/src/ark_reg.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ark/ark_reg.h,v 1.2 2002/01/04 21:05:51 tsi Exp $ */
#ifndef _ARK_REG_H
#define _ARK_REG_H
commit c87ab37ba6b06d81f024800f776cd20ff5a3a5b1
Author: Dave Airlie <airlied@clockmaker.usersys.redhat.com>
Date: Mon Mar 10 10:13:42 2008 +1000
ark: add basic pciaccess support
diff --git a/configure.ac b/configure.ac
index 87a7472..71a35cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,10 +62,23 @@ AC_SUBST([CFLAGS])
AC_SUBST([INCLUDES])
# Checks for libraries.
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
+ [#include "xorg-server.h"])
+CPPFLAGS="$SAVE_CPPFLAGS"
# Checks for header files.
AC_HEADER_STDC
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+fi
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+
DRIVER_NAME=ark
AC_SUBST([DRIVER_NAME])
diff --git a/src/ark.h b/src/ark.h
index eed1553..fbbef48 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -27,8 +27,12 @@ typedef struct _ARKRegRec {
typedef struct _ARKRec {
+#ifndef XSERVER_LIBPCIACCESS
pciVideoPtr PciInfo;
PCITAG PciTag;
+#else
+ struct pci_device *PciInfo;
+#endif
EntityInfoPtr pEnt;
CARD32 IOAddress;
CARD32 FBAddress;
diff --git a/src/ark_driver.c b/src/ark_driver.c
index e5ee7e5..24418ff 100644
--- a/src/ark_driver.c
+++ b/src/ark_driver.c
@@ -366,7 +366,11 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipID override: 0x%04X\n",
pARK->Chipset);
} else {
+#ifndef XSERVER_LIBPCIACCESS
pARK->Chipset = pARK->PciInfo->chipType;
+#else
+ pARK->Chipset = pARK->PciInfo->device_id;
+#endif
pScrn->chipset = (char *)xf86TokenToString(ARKChipsets,
pARK->Chipset);
}
@@ -375,15 +379,21 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
pARK->ChipRev = pEnt->device->chipRev;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
pARK->ChipRev);
- } else
+ } else {
+#ifndef XSERVER_LIBPCIACCESS
pARK->ChipRev = pARK->PciInfo->chipRev;
-
+#else
+ pARK->ChipRev = pARK->PciInfo->revision;
+#endif
+ }
xfree(pEnt);
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Chipset: \"%s\"\n", pScrn->chipset);
+#ifndef XSERVER_LIBPCIACCESS
pARK->PciTag = pciTag(pARK->PciInfo->bus, pARK->PciInfo->device,
pARK->PciInfo->func);
+#endif
/* unlock CRTC[0-7] */
outb(hwp->PIOOffset + hwp->IOBase + 4, 0x11);
@@ -1048,12 +1058,32 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
/* extended to cover MMIO space at 0xB8000 */
hwp->MapSize = 0x20000;
+#ifndef XSERVER_LIBPCIACCESS
pARK->MMIOBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO,
pARK->PciTag, 0xb8000, 0x8000);
pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pARK->PciTag, pARK->FBAddress,
pScrn->videoRam * 1024);
+#else
+
+ pARK->MMIOBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO,
+ pARK->PciInfo, 0xb8000, 0x8000);
+
+ {
+ void** result = (void**)&pARK->FBBase;
+ int err = pci_device_map_range(pARK->PciInfo,
+ pARK->FBAddress,
+ pScrn->videoRam * 1024,
+ PCI_DEV_MAP_FLAG_WRITABLE |
+ PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ result);
+
+ if (err)
+ return FALSE;
+ }
+#endif
+
if (!pARK->FBBase) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Cound not map framebuffer\n");
@@ -1071,8 +1101,12 @@ static void ARKUnmapMem(ScrnInfoPtr pScrn)
/* XXX vgaHWMapMem() isn't called explicitly, so is this correct? */
vgaHWUnmapMem(pScrn);
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pARK->FBBase,
pScrn->videoRam * 1024);
+#else
+ pci_device_unmap_range(pARK->PciInfo, pARK->FBBase, pScrn->videoRam * 1024);
+#endif
}
commit f09baa348b5d1a499f23e553c67bc0674c7c6512
Author: James Cloos <cloos@jhcloos.com>
Date: Mon Sep 3 05:52:27 2007 -0400
Add *~ to .gitignore to skip patch/emacs droppings
diff --git a/.gitignore b/.gitignore
index fb1befd..2df4a8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ libtool
ltmain.sh
missing
stamp-h1
+*~
commit b62f233658cca6c6f2226fc8614322f8e609cdae
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Aug 23 19:25:43 2007 -0400
Rename .cvsignore to .gitignore
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index fb1befd..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-Makefile
-Makefile.in
-*.la
-*.lo
-aclocal.m4
-autom4te.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-missing
-stamp-h1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fb1befd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+Makefile
+Makefile.in
+*.la
+*.lo
+aclocal.m4
+autom4te.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644
index 9730646..0000000
--- a/src/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..9730646
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,6 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.la
+*.lo
commit ba3948fcd33f8497cca9c8c72bc777b92d50858d
Author: Brice Goglin <bgoglin@debian.org>
Date: Tue Aug 7 10:18:07 2007 +0200
Define VERSION* using PACKAGE_VERSION*
diff --git a/src/ark.h b/src/ark.h
index 0219c5c..eed1553 100644
--- a/src/ark.h
+++ b/src/ark.h
@@ -55,10 +55,10 @@ typedef struct _ARKRec {
#define DRIVER_NAME "ark"
-#define DRIVER_VERSION "0.6.0"
-#define VERSION_MAJOR 0
-#define VERSION_MINOR 6
-#define PATCHLEVEL 0
+#define DRIVER_VERSION PACKAGE_VERSION
+#define VERSION_MAJOR PACKAGE_VERSION_MAJOR
+#define VERSION_MINOR PACKAGE_VERSION_MINOR
+#define PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
#define ARK_VERSION ((VERSION_MAJOR << 24) | \
(VERSION_MINOR << 16) | \
PATCHLEVEL)
Reply to: