summaryrefslogtreecommitdiff
path: root/driver/xf86-video-i740/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-10-12 20:41:54 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-10-12 20:41:54 +0000
commitedd2e677bd33cd716b7bc9a22afd6f3046c3e4c5 (patch)
treed3c38c52f60d67c7a3c7e7c5f8c218bb36be46c3 /driver/xf86-video-i740/src
parentc69a15350f218a8967a0fddd53f15da64d88dc94 (diff)
xf86-video-i740 1.2.0
Diffstat (limited to 'driver/xf86-video-i740/src')
-rw-r--r--driver/xf86-video-i740/src/Makefile.am1
-rw-r--r--driver/xf86-video-i740/src/Makefile.in10
-rw-r--r--driver/xf86-video-i740/src/i740.h5
-rw-r--r--driver/xf86-video-i740/src/i740_accel.c1
-rw-r--r--driver/xf86-video-i740/src/i740_cursor.c1
-rw-r--r--driver/xf86-video-i740/src/i740_dga.c1
-rw-r--r--driver/xf86-video-i740/src/i740_dga.h1
-rw-r--r--driver/xf86-video-i740/src/i740_driver.c59
-rw-r--r--driver/xf86-video-i740/src/i740_i2c.c1
-rw-r--r--driver/xf86-video-i740/src/i740_io.c1
-rw-r--r--driver/xf86-video-i740/src/i740_macros.h1
-rw-r--r--driver/xf86-video-i740/src/i740_reg.h1
-rw-r--r--driver/xf86-video-i740/src/i740_video.c1
13 files changed, 65 insertions, 19 deletions
diff --git a/driver/xf86-video-i740/src/Makefile.am b/driver/xf86-video-i740/src/Makefile.am
index 39470b221..6f084aa25 100644
--- a/driver/xf86-video-i740/src/Makefile.am
+++ b/driver/xf86-video-i740/src/Makefile.am
@@ -38,5 +38,6 @@ i740_drv_la_SOURCES = \
i740_i2c.c \
i740_io.c \
i740_macros.h \
+ i740_pcirename.h \
i740_reg.h \
i740_video.c
diff --git a/driver/xf86-video-i740/src/Makefile.in b/driver/xf86-video-i740/src/Makefile.in
index 2798b6a7e..b03bc8310 100644
--- a/driver/xf86-video-i740/src/Makefile.in
+++ b/driver/xf86-video-i740/src/Makefile.in
@@ -126,6 +126,7 @@ DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -159,6 +160,7 @@ MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -167,19 +169,26 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
+XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
+XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
@@ -241,6 +250,7 @@ i740_drv_la_SOURCES = \
i740_i2c.c \
i740_io.c \
i740_macros.h \
+ i740_pcirename.h \
i740_reg.h \
i740_video.c
diff --git a/driver/xf86-video-i740/src/i740.h b/driver/xf86-video-i740/src/i740.h
index 6db051513..12a5597da 100644
--- a/driver/xf86-video-i740/src/i740.h
+++ b/driver/xf86-video-i740/src/i740.h
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740.h,v 1.7 2002/10/23 16:08:36 tsi Exp $ */
/*
* Authors:
@@ -36,6 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _I740_H_
#define _I740_H_
+#include "i740_pcirename.h"
+
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -99,7 +100,9 @@ typedef struct _I740Rec {
unsigned long MMIOAddr;
EntityInfoPtr pEnt;
pciVideoPtr PciInfo;
+#ifndef XSERVER_LIBPCIACCESS
PCITAG PciTag;
+#endif
int HasSGRAM;
I740RegRec SavedReg;
I740RegRec ModeReg;
diff --git a/driver/xf86-video-i740/src/i740_accel.c b/driver/xf86-video-i740/src/i740_accel.c
index c11bf8424..81c7565a6 100644
--- a/driver/xf86-video-i740/src/i740_accel.c
+++ b/driver/xf86-video-i740/src/i740_accel.c
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_accel.c,v 1.6 2002/01/25 21:56:02 tsi Exp $ */
/*
* Authors:
diff --git a/driver/xf86-video-i740/src/i740_cursor.c b/driver/xf86-video-i740/src/i740_cursor.c
index f3160b81e..b61fc5ba8 100644
--- a/driver/xf86-video-i740/src/i740_cursor.c
+++ b/driver/xf86-video-i740/src/i740_cursor.c
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_cursor.c,v 1.4 2000/02/23 04:47:13 martin Exp $ */
/*
* Authors:
diff --git a/driver/xf86-video-i740/src/i740_dga.c b/driver/xf86-video-i740/src/i740_dga.c
index 170e38fcb..19a6d0d0d 100644
--- a/driver/xf86-video-i740/src/i740_dga.c
+++ b/driver/xf86-video-i740/src/i740_dga.c
@@ -21,7 +21,6 @@
*
* Authors: Patrick LERDA
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_dga.c,v 1.1tsi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/driver/xf86-video-i740/src/i740_dga.h b/driver/xf86-video-i740/src/i740_dga.h
index 4f64ac3b9..4a4f8e815 100644
--- a/driver/xf86-video-i740/src/i740_dga.h
+++ b/driver/xf86-video-i740/src/i740_dga.h
@@ -21,6 +21,5 @@
*
* Authors: Patrick LERDA
*/
-/* $XFree86$ */
Bool I740DGAInit(ScreenPtr pScreen);
diff --git a/driver/xf86-video-i740/src/i740_driver.c b/driver/xf86-video-i740/src/i740_driver.c
index c21163ddc..8d66f2256 100644
--- a/driver/xf86-video-i740/src/i740_driver.c
+++ b/driver/xf86-video-i740/src/i740_driver.c
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_driver.c,v 1.49tsi Exp $ */
/*
* Authors:
@@ -142,9 +141,9 @@ static Bool I740UnmapMem(ScrnInfoPtr pScrn);
#define I740_VERSION 4000
#define I740_NAME "I740"
#define I740_DRIVER_NAME "i740"
-#define I740_MAJOR_VERSION 1
-#define I740_MINOR_VERSION 1
-#define I740_PATCHLEVEL 0
+#define I740_MAJOR_VERSION PACKAGE_VERSION_MAJOR
+#define I740_MINOR_VERSION PACKAGE_VERSION_MINOR
+#define I740_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
_X_EXPORT DriverRec I740 = {
I740_VERSION,
@@ -378,11 +377,13 @@ I740Probe(DriverPtr drv, int flags) {
return FALSE;
}
+#ifndef XSERVER_LIBPCIACCESS
/*
Since these Probing is just checking the PCI data the server already
collected.
*/
if (!xf86GetPciVideoInfo()) return FALSE;
+#endif
/* Look for Intel based chips */
numUsed = xf86MatchPciInstances(I740_NAME, PCI_VENDOR_INTEL,
@@ -508,8 +509,10 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
if (!vgaHWGetHWRec(pScrn)) return FALSE;
pI740->PciInfo = xf86GetPciInfoForEntity(pI740->pEnt->index);
+#ifndef XSERVER_LIBPCIACCESS
pI740->PciTag = pciTag(pI740->PciInfo->bus, pI740->PciInfo->device,
pI740->PciInfo->func);
+#endif
if (xf86RegisterResources(pI740->pEnt->index, 0, ResNone))
return FALSE;
@@ -598,7 +601,7 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
pI740->pEnt->device->chipID);
} else {
from = X_PROBED;
- pScrn->chipset = (char *)xf86TokenToString(I740Chipsets, pI740->PciInfo->chipType);
+ pScrn->chipset = (char *)xf86TokenToString(I740Chipsets, PCI_DEV_DEVICE_ID(pI740->PciInfo));
}
if (pI740->pEnt->device->chipRev >= 0) {
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
@@ -611,8 +614,8 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
pI740->LinearAddr = pI740->pEnt->device->MemBase;
from = X_CONFIG;
} else {
- if (pI740->PciInfo->memBase[1] != 0) {
- pI740->LinearAddr = pI740->PciInfo->memBase[0]&0xFF000000;
+ if (PCI_REGION_BASE(pI740->PciInfo, 0, REGION_MEM) != 0) {
+ pI740->LinearAddr = PCI_REGION_BASE(pI740->PciInfo, 0, REGION_MEM)&0xFF000000;
from = X_PROBED;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -628,8 +631,8 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
pI740->MMIOAddr = pI740->pEnt->device->IOBase;
from = X_CONFIG;
} else {
- if (pI740->PciInfo->memBase[1]) {
- pI740->MMIOAddr = pI740->PciInfo->memBase[1]&0xFFF80000;
+ if (PCI_REGION_BASE(pI740->PciInfo, 1, REGION_MEM)) {
+ pI740->MMIOAddr = PCI_REGION_BASE(pI740->PciInfo, 1, REGION_MEM)&0xFFF80000;
from = X_PROBED;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -871,18 +874,48 @@ static Bool I740MapMem(ScrnInfoPtr pScrn)
pI740 = I740PTR(pScrn);
+#ifndef XSERVER_LIBPCIACCESS
mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT;
pI740->MMIOBase = xf86MapPciMem(pScrn->scrnIndex, mmioFlags,
pI740->PciTag,
pI740->MMIOAddr,
0x80000);
+#else
+ {
+ void** result = (void**)&pI740->MMIOBase;
+ int err = pci_device_map_range(pI740->PciInfo,
+ pI740->MMIOAddr,
+ 0x80000,
+ PCI_DEV_MAP_FLAG_WRITABLE,
+ result);
+
+ if (err)
+ return FALSE;
+ }
+
+#endif
if (!pI740->MMIOBase) return FALSE;
+#ifndef XSERVER_LIBPCIACCESS
pI740->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pI740->PciTag,
pI740->LinearAddr,
pI740->FbMapSize);
+#else
+ {
+ void** result = (void**)&pI740->FbBase;
+ int err = pci_device_map_range(pI740->PciInfo,
+ pI740->LinearAddr,
+ pI740->FbMapSize,
+ PCI_DEV_MAP_FLAG_WRITABLE |
+ PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ result);
+
+ if (err)
+ return FALSE;
+ }
+#endif
if (!pI740->FbBase) return FALSE;
return TRUE;
@@ -894,10 +927,18 @@ static Bool I740UnmapMem(ScrnInfoPtr pScrn)
pI740 = I740PTR(pScrn);
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pI740->MMIOBase, 0x80000);
+#else
+ pci_device_unmap_range(pI740->PciInfo, pI740->MMIOBase, 0x80000);
+#endif
pI740->MMIOBase=0;
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pI740->FbBase, pI740->FbMapSize);
+#else
+ pci_device_unmap_range(pI740->PciInfo, pI740->FbBase, pI740->FbMapSize);
+#endif
pI740->FbBase = 0;
return TRUE;
}
diff --git a/driver/xf86-video-i740/src/i740_i2c.c b/driver/xf86-video-i740/src/i740_i2c.c
index e741eeb70..e57c7b09b 100644
--- a/driver/xf86-video-i740/src/i740_i2c.c
+++ b/driver/xf86-video-i740/src/i740_i2c.c
@@ -21,7 +21,6 @@
*
* Authors: Patrick LERDA
*/
-/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/driver/xf86-video-i740/src/i740_io.c b/driver/xf86-video-i740/src/i740_io.c
index bfa6a1069..2464d9821 100644
--- a/driver/xf86-video-i740/src/i740_io.c
+++ b/driver/xf86-video-i740/src/i740_io.c
@@ -24,7 +24,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_io.c,v 1.4 2002/01/25 21:56:03 tsi Exp $ */
/*
* Authors:
diff --git a/driver/xf86-video-i740/src/i740_macros.h b/driver/xf86-video-i740/src/i740_macros.h
index 84b4c199e..7b06d0d1f 100644
--- a/driver/xf86-video-i740/src/i740_macros.h
+++ b/driver/xf86-video-i740/src/i740_macros.h
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_macros.h,v 1.3 2002/01/25 21:56:03 tsi Exp $ */
/*
* Authors:
diff --git a/driver/xf86-video-i740/src/i740_reg.h b/driver/xf86-video-i740/src/i740_reg.h
index 28f6a161e..e14de53da 100644
--- a/driver/xf86-video-i740/src/i740_reg.h
+++ b/driver/xf86-video-i740/src/i740_reg.h
@@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_reg.h,v 1.1 1999/08/29 12:20:59 dawes Exp $ */
/*
* Authors:
diff --git a/driver/xf86-video-i740/src/i740_video.c b/driver/xf86-video-i740/src/i740_video.c
index e1aa5d02a..ad6c5f978 100644
--- a/driver/xf86-video-i740/src/i740_video.c
+++ b/driver/xf86-video-i740/src/i740_video.c
@@ -44,7 +44,6 @@
* 12 September 2002 - Better software scaling with some averaging, giving a
* nicer picture.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740_video.c,v 1.5tsi Exp $ */
/*