xf86-video-ark 0.7.0

This commit is contained in:
matthieu 2008-08-23 17:08:44 +00:00
parent c6356dcae2
commit 2add905d6b
5 changed files with 58 additions and 11 deletions

View File

@ -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)
@ -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])

View File

@ -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
*/
@ -27,8 +26,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;
@ -55,10 +58,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)

View File

@ -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>
*

View File

@ -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>
*
@ -366,7 +365,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 +378,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 +1057,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 +1100,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
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ark/ark_reg.h,v 1.1 2000/11/14 17:28:13 dawes Exp $ */
#ifndef _ARK_REG_H
#define _ARK_REG_H