[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-rendition: Changes to 'upstream-experimental'



 configure.ac            |   16 +++-
 man/Makefile.am         |    1 
 man/rendition.man       |   12 +--
 src/accel.h             |    1 
 src/accelX.c            |    1 
 src/cmd2d.h             |    1 
 src/commonregs.h        |    1 
 src/cscode.h            |    1 
 src/hwcursor.c          |    1 
 src/hwcursor.h          |    1 
 src/rendition.c         |  189 ++++++++++++++++++++++++++++++++++++++----------
 src/rendition.h         |    1 
 src/rendition_options.h |    1 
 src/rendition_shadow.c  |    1 
 src/rendition_shadow.h  |    1 
 src/v1kregs.h           |    1 
 src/v1krisc.c           |    1 
 src/v1krisc.h           |    1 
 src/v2kregs.h           |    1 
 src/vboard.c            |    1 
 src/vboard.h            |    1 
 src/vloaduc.c           |    2 
 src/vloaduc.h           |    1 
 src/vmisc.c             |    1 
 src/vmisc.h             |    1 
 src/vmodes.c            |    1 
 src/vmodes.h            |    1 
 src/vos.h               |    1 
 src/vramdac.c           |    1 
 src/vramdac.h           |    1 
 src/vtypes.h            |    8 +-
 31 files changed, 182 insertions(+), 71 deletions(-)

New commits:
commit 6a565d3a8caad1d44e9cfc724fc8298b3ce023e5
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 14:50:31 2008 -0400

    rendition 4.2.0

diff --git a/configure.ac b/configure.ac
index 2908bf9..d5d2445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-rendition],
-        4.1.3,
+        4.2.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-rendition)
 

commit e943057ef844a7a3153b6158f3dd26ae02296e98
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 14:45:52 2008 -0400

    Fix includes to silence a warning.
    
    Patch from opensuse, although it has no attribution there.

diff --git a/src/vloaduc.c b/src/vloaduc.c
index 07993bb..67bf901 100644
--- a/src/vloaduc.c
+++ b/src/vloaduc.c
@@ -16,6 +16,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <unistd.h>
 #ifdef HAVE_ELF_H
 #include <elf.h>
 #endif

commit 34db3fdcff85f151843fcae7d0aa307697291d5e
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 14:41:58 2008 -0400

    Death to RCS tags.

diff --git a/src/accel.h b/src/accel.h
index e2cfba7..14bbe8b 100644
--- a/src/accel.h
+++ b/src/accel.h
@@ -3,7 +3,6 @@
  *
  * header file for accel.c
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accel.h,v 1.3 1999/11/19 13:54:44 hohndel Exp $ */
 
 #ifndef __ACCEL_H__
 #define __ACCEL_H__
diff --git a/src/accelX.c b/src/accelX.c
index 88a43ce..a499c56 100644
--- a/src/accelX.c
+++ b/src/accelX.c
@@ -3,7 +3,6 @@
  *
  * accelerator functions for X
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c,v 1.10 2001/06/15 21:22:54 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/cmd2d.h b/src/cmd2d.h
index 8290ac7..4f9cbf9 100644
--- a/src/cmd2d.h
+++ b/src/cmd2d.h
@@ -4,7 +4,6 @@
 /*
  * commands the 2d microcode offers
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/cmd2d.h,v 1.2 1999/10/14 04:43:14 dawes Exp $ */
 
 #define CMD_SETUP					32
 #define CMD_SET_PIX_REG				2
diff --git a/src/commonregs.h b/src/commonregs.h
index 8958bf1..d3e79a1 100644
--- a/src/commonregs.h
+++ b/src/commonregs.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/commonregs.h,v 1.1 1999/11/19 13:54:44 hohndel Exp $ */
 
 #ifndef __COMMONREGS_H__
 #define __COMMONREGS_H__
diff --git a/src/cscode.h b/src/cscode.h
index 7ffb578..a9b4e76 100644
--- a/src/cscode.h
+++ b/src/cscode.h
@@ -1,7 +1,6 @@
 /****************************************************************************\ 
  *       NOTE: This file generated automatically. Do not edit by hand!      *
 \****************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/cscode.h,v 1.3 1999/10/13 04:21:19 dawes Exp $ */
 
 #ifndef __CSCODE_H__
 #define __CSCODE_H__
diff --git a/src/hwcursor.c b/src/hwcursor.c
index 2c19a6e..c3b5ee8 100644
--- a/src/hwcursor.c
+++ b/src/hwcursor.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c,v 1.6 2000/02/25 21:03:00 dawes Exp $ */
 /*
  * includes
  */
diff --git a/src/hwcursor.h b/src/hwcursor.h
index 1387858..e0d742b 100644
--- a/src/hwcursor.h
+++ b/src/hwcursor.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.h,v 1.4 1999/11/19 13:54:45 hohndel Exp $ */
 /*
  * file hwcursor.h
  */
diff --git a/src/rendition.c b/src/rendition.c
index 513e716..594c7b8 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c,v 1.58 2003/11/03 05:11:26 tsi Exp $ */
 /*
  * Copyright (C) 1998 The XFree86 Project, Inc.  All Rights Reserved.
  *
diff --git a/src/rendition.h b/src/rendition.h
index 035ddb6..6dfb818 100644
--- a/src/rendition.h
+++ b/src/rendition.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h,v 1.5 2000/02/25 21:03:02 dawes Exp $ */
 
 #ifndef __RENDITION_H__
 #define __RENDITION_H__
diff --git a/src/rendition_options.h b/src/rendition_options.h
index c41db49..4708c93 100644
--- a/src/rendition_options.h
+++ b/src/rendition_options.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition_options.h,v 1.5 2001/05/04 19:05:42 dawes Exp $ */
 
 #ifndef __RENDITION_OPTION_H__
 #define __RENDITION_OPTION_H__
diff --git a/src/rendition_shadow.c b/src/rendition_shadow.c
index 30b8d2d..5f7a5f5 100644
--- a/src/rendition_shadow.c
+++ b/src/rendition_shadow.c
@@ -4,7 +4,6 @@
  * The functions used by ShadowFB
  * Based on code written by Mark Vojkovich <markv@valinux.com>
  */
-/* $XFree86$ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/rendition_shadow.h b/src/rendition_shadow.h
index ec74463..5d9634f 100644
--- a/src/rendition_shadow.h
+++ b/src/rendition_shadow.h
@@ -3,7 +3,6 @@
  *
  * headfile for rendition_shadow.c
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition_shadow.h,v 1.1 2000/03/01 00:25:25 dawes Exp $ */
 
 #ifndef __RENDITION_SHADOW_H__
 #define __RENDITION_SHADOW_H__
diff --git a/src/v1kregs.h b/src/v1kregs.h
index af1817b..9b3f93c 100644
--- a/src/v1kregs.h
+++ b/src/v1kregs.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v1kregs.h,v 1.4 1999/11/19 13:54:45 hohndel Exp $ */
 
 #ifndef __V1KREGS_H__
 #define __V1KREGS_H__
diff --git a/src/v1krisc.c b/src/v1krisc.c
index 39d0a35..2554263 100644
--- a/src/v1krisc.c
+++ b/src/v1krisc.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v1krisc.c,v 1.6 2000/03/31 20:13:25 dawes Exp $ */
 /*
  *
  */
diff --git a/src/v1krisc.h b/src/v1krisc.h
index 7301129..0b97f9e 100644
--- a/src/v1krisc.h
+++ b/src/v1krisc.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v1krisc.h,v 1.3 1999/10/13 04:21:21 dawes Exp $ */
 /*
  * file v1krisc.h
  *
diff --git a/src/v2kregs.h b/src/v2kregs.h
index d2b66be..5f6942c 100644
--- a/src/v2kregs.h
+++ b/src/v2kregs.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v2kregs.h,v 1.4 1999/11/19 13:54:46 hohndel Exp $ */
 #ifndef __V2KREGS_H__
 #define __V2KREGS_H__
 
diff --git a/src/vboard.c b/src/vboard.c
index 9dcecf4..49499e2 100644
--- a/src/vboard.c
+++ b/src/vboard.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vboard.c,v 1.18tsi Exp $ */
 /*
  * includes
  */
diff --git a/src/vboard.h b/src/vboard.h
index ddda206..aeeffd0 100644
--- a/src/vboard.h
+++ b/src/vboard.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vboard.h,v 1.6 2000/03/31 20:13:26 dawes Exp $ */
 
 /*
  * vboard.h
diff --git a/src/vloaduc.c b/src/vloaduc.c
index 9f3e17e..07993bb 100644
--- a/src/vloaduc.c
+++ b/src/vloaduc.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c,v 1.13tsi Exp $ */
 /*
  * includes
  */
diff --git a/src/vloaduc.h b/src/vloaduc.h
index 0c127d1..58d46c2 100644
--- a/src/vloaduc.h
+++ b/src/vloaduc.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.h,v 1.4 2000/03/31 20:13:27 dawes Exp $ */
 
 /*
  * file vloaduc.h
diff --git a/src/vmisc.c b/src/vmisc.c
index 0bd8c6a..6febd27 100644
--- a/src/vmisc.c
+++ b/src/vmisc.c
@@ -1,5 +1,4 @@
 /* Misc routines used elsewhere in driver */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c,v 1.3 2000/02/25 21:03:05 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/vmisc.h b/src/vmisc.h
index c104147..d21a03f 100644
--- a/src/vmisc.h
+++ b/src/vmisc.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h,v 1.3 2000/03/31 20:13:27 dawes Exp $ */
 
 #ifndef __VMISC_H__
 #define __VMISC_H__
diff --git a/src/vmodes.c b/src/vmodes.c
index 834bfc1..5faf257 100644
--- a/src/vmodes.c
+++ b/src/vmodes.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c,v 1.13 2002/12/11 17:23:33 dawes Exp $ */
 /*
  * file vmodes.c
  *
diff --git a/src/vmodes.h b/src/vmodes.h
index 3cb8669..5aca7d3 100644
--- a/src/vmodes.h
+++ b/src/vmodes.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.h,v 1.5 2002/04/04 14:05:45 eich Exp $ */
 /*
  * file vmodes.h
  *
diff --git a/src/vos.h b/src/vos.h
index e2ec54f..7b55f77 100644
--- a/src/vos.h
+++ b/src/vos.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vos.h,v 1.9 2002/01/25 21:56:07 tsi Exp $ */
 /*
  * file vos.h
  *
diff --git a/src/vramdac.c b/src/vramdac.c
index 9cb5409..7c8acbd 100644
--- a/src/vramdac.c
+++ b/src/vramdac.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c,v 1.18 2002/12/11 17:23:33 dawes Exp $ */
 /*
  * includes
  */
diff --git a/src/vramdac.h b/src/vramdac.h
index c7db3c1..b489707 100644
--- a/src/vramdac.h
+++ b/src/vramdac.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.h,v 1.6 2002/04/04 14:05:45 eich Exp $ */
 /*
  * file vramdac.h
  *
diff --git a/src/vtypes.h b/src/vtypes.h
index d6609d5..257870b 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vtypes.h,v 1.8 2001/10/28 03:33:44 tsi Exp $ */
 #ifndef _VTYPES_H_
 #define _VTYPES_H_
 

commit cfff99db2648d49e9c3af3cb9d965ea5f306b1f7
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Sat Mar 8 23:45:25 2008 +0100

    Makefile.am: nuke RCS Id

diff --git a/man/Makefile.am b/man/Makefile.am
index bf7ec17..f0eb29b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,3 @@
-# $Id$
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # 

commit 99011b4380991cd56987f75a6d48ee609d931b2a
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Feb 27 13:29:57 2008 +1000

    pciaccess: do unmap path

diff --git a/src/rendition.c b/src/rendition.c
index 07c5d85..513e716 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -1517,12 +1517,20 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
 static Bool
 renditionUnmapMem(ScrnInfoPtr pScreenInfo)
 {
+  renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
 #ifdef DEBUG
   ErrorF("Unmapping ...\n");
 #endif
+
+#ifndef XSERVER_LIBPCIACCESS
     xf86UnMapVidMem(pScreenInfo->scrnIndex,
-        RENDITIONPTR(pScreenInfo)->board.vmem_base, 
+        pRendition->board.vmem_base, 
 		    pScreenInfo->videoRam * 1024);
+#else
+    pci_device_unmap_range(pRendition->PciInfo, 
+			   pRendition->board.vmem_base,
+			   pScreenInfo->videoRam * 1024);
+#endif
     return TRUE;
 #ifdef DEBUG0
     ErrorF("Done\n");

commit 7e343a778d302474fef1d177006b54743ce0a394
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Feb 27 12:50:43 2008 +1000

    pciaccess: make auto-detect work

diff --git a/configure.ac b/configure.ac
index dc29381..2908bf9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,9 +46,6 @@ AC_ARG_WITH(xorg-module-dir,
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
-AC_ARG_ENABLE(pciaccess,     AS_HELP_STRING([--enable-pciaccess],
-                             [Enable use of libpciaccess (default: disabled)]),
-			     [PCIACCESS=$enableval], [PCIACCESS=no])
 
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -59,14 +56,21 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
-AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
-if test "x$PCIACCESS" = xyes; then
-    AC_DEFINE(PCIACCESS, 1, [Use libpciaccess])
-    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.7.0])
+# 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"])
+AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
+AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
+CPPFLAGS="$SAVE_CPPFLAGS"
+
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
     XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
 fi
-
-# Checks for libraries.
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
 # Checks for header files.
 AC_HEADER_STDC
diff --git a/src/rendition.c b/src/rendition.c
index 5bc6c9e..07c5d85 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -64,7 +64,7 @@
 #include "rendition_shadow.h"
 #include "vbe.h"
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 # include <pciaccess.h>
 # define DEVICE_ID(p)  (p)->device_id
 #else
@@ -109,7 +109,7 @@ static const int MAX_VTOTAL   = 2184;
 
 static const OptionInfoRec * renditionAvailableOptions(int, int);
 static void       renditionIdentify(int);
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 static Bool renditionPciProbe(DriverPtr drv, int entity_num,
     struct pci_device *dev, intptr_t match_data);
 #else
@@ -163,7 +163,7 @@ static SymTabRec renditionChipsets[] = {
     {-1,                   NULL}
 };
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 #define RENDITION_DEVICE_MATCH(d, i) \
     { 0x1163, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
 
@@ -185,7 +185,7 @@ _X_EXPORT DriverRec RENDITION={
     RENDITION_VERSION_CURRENT,
     "rendition",
     renditionIdentify,
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     NULL,
 #else
     renditionProbe,
@@ -195,7 +195,7 @@ _X_EXPORT DriverRec RENDITION={
     0,
     NULL,
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     rendition_device_match,
     renditionPciProbe
 #endif
@@ -333,7 +333,7 @@ renditionIdentify(int flags)
 
 
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 static Bool
 renditionPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
 		  intptr_t match_data)
@@ -570,7 +570,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
     if (pScreenInfo->numEntities != 1)
 	return FALSE;
 
-#ifndef PCIACCESS
+#ifndef XSERVER_LIBPCIACCESS
     /* allocate driver private structure */
     if (!renditionGetRec(pScreenInfo))
         return FALSE;
@@ -578,7 +578,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
 
     pRendition=RENDITIONPTR(pScreenInfo);
 
-#ifndef PCIACCESS
+#ifndef XSERVER_LIBPCIACCESS
     /* Get the entity, and make sure it is PCI. */
     pRendition->pEnt = xf86GetEntityInfo(pScreenInfo->entityList[0]);
     if (pRendition->pEnt->location.type != BUS_PCI)
@@ -605,7 +605,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
         xf86FreeInt10(pInt);
     }
 
-#ifndef PCIACCESS
+#ifndef XSERVER_LIBPCIACCESS
     /* Find the PCI info for this screen */
     pRendition->PciInfo = xf86GetPciInfoForEntity(pRendition->pEnt->index);
     pRendition->pcitag= pciTag(pRendition->PciInfo->bus,
@@ -740,7 +740,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
     pRendition->board.accel=0;
     pRendition->board.vgaio_base = pvgaHW->PIOOffset;
     pRendition->board.io_base = pRendition->board.vgaio_base 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 	+ pRendition->PciInfo->regions[1].base_addr;
 #else
 	+ pRendition->PciInfo->ioBase[1]
@@ -749,7 +749,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
     pRendition->board.mmio_base=0;
     pRendition->board.vmmio_base=0;
     pRendition->board.mem_size=0;
-#ifndef PCIACCESS
+#ifndef XSERVER_LIBPCIACCESS
     pRendition->board.mem_base=(vu8 *)pRendition->PciInfo->memBase[0];
 #endif
     pRendition->board.vmem_base=NULL;
@@ -769,7 +769,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
 	       "Rendition %s @ %lx/%lx\n",
 	       renditionChipsets[pRendition->board.chip==V1000_DEVICE ? 0:1]
 	       .name,
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 	       pRendition->PciInfo->regions[1].base_addr,
 	       pRendition->PciInfo->regions[0].base_addr
 #else
@@ -1461,13 +1461,13 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
     Bool WriteCombine;
     int mapOption;
     renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     int err;
 #endif
 
 #ifdef DEBUG
     ErrorF("Mapping ...\n");
-#ifndef PCIACCESS
+#ifndef XSERVER_LIBPCIACCESS
     ErrorF("%d %d %d %x %d\n", pScreenInfo->scrnIndex, VIDMEM_FRAMEBUFFER, 
 	   pRendition->pcitag,
 	   pRendition->board.mem_base, pScreenInfo->videoRam * 1024);
@@ -1495,7 +1495,7 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
 	mapOption = VIDMEM_MMIO;
     }
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     err = pci_device_map_region(pRendition->PciInfo, 0, TRUE);
     pRendition->board.vmem_base = pRendition->PciInfo->regions[0].memory;
 
diff --git a/src/vtypes.h b/src/vtypes.h
index 0f845ce..d6609d5 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -11,7 +11,7 @@
 #include <X11/Xmd.h>
 #include "xf86Pci.h"
 
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 #include <pciaccess.h>
 #endif
 
@@ -180,7 +180,7 @@ typedef struct _renditionRec
 {
     struct verite_board_t board;        /* information on the board */
     struct verite_modeinfo_t mode;      /* information on the mode */
-#ifdef PCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     struct pci_device * PciInfo;
 #else
     PCITAG pcitag;                      /* tag for the PCI config space */

commit 41cba91bc5572a66e8b6f09c9cf4c4c173b29f8f
Author: Brice Goglin <bgoglin@debian.org>
Date:   Tue Aug 7 12:10:15 2007 +0200

    RENDITION_VERSION* using PACKAGE_VERSION_*

diff --git a/src/rendition.c b/src/rendition.c
index a511698..5bc6c9e 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -80,10 +80,10 @@
 
 #define RENDITION_NAME            "RENDITION"
 #define RENDITION_DRIVER_NAME     "rendition"
-#define RENDITION_VERSION_NAME    "4.1.0"
-#define RENDITION_VERSION_MAJOR   4
-#define RENDITION_VERSION_MINOR   1
-#define RENDITION_PATCHLEVEL      0
+#define RENDITION_VERSION_NAME    PACKAGE_VERSION
+#define RENDITION_VERSION_MAJOR   PACKAGE_VERSION_MAJOR
+#define RENDITION_VERSION_MINOR   PACKAGE_VERSION_MINOR
+#define RENDITION_PATCHLEVEL      PACKAGE_VERSION_PATCHLEVEL
 #define RENDITION_VERSION_CURRENT ((RENDITION_VERSION_MAJOR << 24) | \
                  (RENDITION_VERSION_MINOR << 16) | RENDITION_PATCHLEVEL)
 

commit 73c1f290c1ed767a8c9340ca1404f89baace762e
Author: Ian Romanick <idr@us.ibm.com>
Date:   Tue Mar 6 09:22:44 2007 -0800

    Port driver to PCI-rework interfaces.
    
    Quick and dirty port to the PCI-rework interfaces.  Test on a V2100
    cards.  This is the only Rendition hardware to which I have access.
    V1000 and / or V2200 may be broken, but I doubt it.
    
    Comments in the source claim that acceleration is buggy, and it is
    disabled by default.  I *did not* do any testing with acceleration.

diff --git a/configure.ac b/configure.ac
index cb26177..dc29381 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,9 @@ AC_ARG_WITH(xorg-module-dir,
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
+AC_ARG_ENABLE(pciaccess,     AS_HELP_STRING([--enable-pciaccess],
+                             [Enable use of libpciaccess (default: disabled)]),
+			     [PCIACCESS=$enableval], [PCIACCESS=no])
 
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -56,6 +59,13 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
+AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
+if test "x$PCIACCESS" = xyes; then
+    AC_DEFINE(PCIACCESS, 1, [Use libpciaccess])
+    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.7.0])
+    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+fi
+
 # Checks for libraries.
 
 # Checks for header files.
diff --git a/src/rendition.c b/src/rendition.c
index 4cfcecb..a511698 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -64,6 +64,14 @@
 #include "rendition_shadow.h"
 #include "vbe.h"
 
+#ifdef PCIACCESS
+# include <pciaccess.h>
+# define DEVICE_ID(p)  (p)->device_id
+#else
+# define DEVICE_ID(p)  (p)->chipType
+#endif
+
+
 /*
  * defines
  */
@@ -101,7 +109,12 @@ static const int MAX_VTOTAL   = 2184;
 
 static const OptionInfoRec * renditionAvailableOptions(int, int);
 static void       renditionIdentify(int);
+#ifdef PCIACCESS
+static Bool renditionPciProbe(DriverPtr drv, int entity_num,
+    struct pci_device *dev, intptr_t match_data);
+#else
 static Bool       renditionProbe(DriverPtr, int);
+#endif
 static Bool       renditionPreInit(ScrnInfoPtr, int);
 static Bool       renditionScreenInit(int, ScreenPtr, int, char **);
 static Bool       renditionSwitchMode(int, DisplayModePtr, int);
@@ -150,21 +163,42 @@ static SymTabRec renditionChipsets[] = {
     {-1,                   NULL}
 };
 
+#ifdef PCIACCESS
+#define RENDITION_DEVICE_MATCH(d, i) \
+    { 0x1163, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
+
+static const struct pci_id_match rendition_device_match[] = {
+    RENDITION_DEVICE_MATCH(PCI_CHIP_V1000, CHIP_RENDITION_V1000),
+    RENDITION_DEVICE_MATCH(PCI_CHIP_V2x00, CHIP_RENDITION_V2x00),
+
+    { 0, 0, 0 }
+};
+#else
 static PciChipsets renditionPCIchipsets[] = {
   { CHIP_RENDITION_V1000, PCI_CHIP_V1000, RES_SHARED_VGA },
   { CHIP_RENDITION_V2x00, PCI_CHIP_V2x00, RES_SHARED_VGA },
   { -1,                   -1,             RES_UNDEFINED }
 };
+#endif
 
 _X_EXPORT DriverRec RENDITION={
     RENDITION_VERSION_CURRENT,
     "rendition",
     renditionIdentify,
+#ifdef PCIACCESS
+    NULL,
+#else
     renditionProbe,
+#endif
     renditionAvailableOptions,
     NULL,
     0,
-    NULL
+    NULL,
+
+#ifdef PCIACCESS
+    rendition_device_match,
+    renditionPciProbe
+#endif
 };
 
 static const char *vgahwSymbols[]={
@@ -299,6 +333,49 @@ renditionIdentify(int flags)
 
 
 
+#ifdef PCIACCESS
+static Bool
+renditionPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
+		  intptr_t match_data)
+{
+    ScrnInfoPtr pScrn;
+
+
+    /* Allocate a ScrnInfoRec and claim the slot */
+    pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, RES_SHARED_VGA,
+				NULL, NULL, NULL, NULL);
+    if (pScrn != NULL) {
+	renditionPtr pRendition;
+
+
+	pScrn->driverVersion = RENDITION_VERSION_CURRENT;
+	pScrn->driverName    = RENDITION_DRIVER_NAME;
+	pScrn->name          = RENDITION_NAME;
+	pScrn->Probe         = NULL;
+	pScrn->PreInit       = renditionPreInit;
+	pScrn->ScreenInit    = renditionScreenInit;
+	pScrn->SwitchMode    = renditionSwitchMode;
+	pScrn->AdjustFrame   = renditionAdjustFrame;
+	pScrn->EnterVT       = renditionEnterVT;
+	pScrn->LeaveVT       = renditionLeaveVT;
+	pScrn->FreeScreen    = renditionFreeScreen;
+	pScrn->ValidMode     = renditionValidMode;
+
+	/* allocate driver private structure */
+	pRendition = renditionGetRec(pScrn);
+	if (pRendition == NULL) {
+	    return FALSE;
+	}
+
+	pRendition->pEnt = xf86GetEntityInfo(entity_num);
+	pRendition->PciInfo = dev;
+    }
+
+    return (pScrn != NULL);
+}
+
+#else
+
 /*
  * This function is called once, at the start of the first server generation to
  * do a minimal probe for supported hardware.
@@ -356,7 +433,7 @@ renditionProbe(DriverPtr drv, int flags)
     }
     return foundScreen;
 }
-
+#endif
 
 #if 0
 static Bool
@@ -493,16 +570,20 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
     if (pScreenInfo->numEntities != 1)
 	return FALSE;
 
+#ifndef PCIACCESS
     /* allocate driver private structure */
     if (!renditionGetRec(pScreenInfo))
         return FALSE;
+#endif
 
     pRendition=RENDITIONPTR(pScreenInfo);
 
+#ifndef PCIACCESS
     /* Get the entity, and make sure it is PCI. */
     pRendition->pEnt = xf86GetEntityInfo(pScreenInfo->entityList[0]);
     if (pRendition->pEnt->location.type != BUS_PCI)
 	return FALSE;
+#endif
 
     if (flags & PROBE_DETECT) {
         ConfiguredMonitor = 
@@ -524,10 +605,12 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
         xf86FreeInt10(pInt);
     }
 
+#ifndef PCIACCESS
     /* Find the PCI info for this screen */
     pRendition->PciInfo = xf86GetPciInfoForEntity(pRendition->pEnt->index);
     pRendition->pcitag= pciTag(pRendition->PciInfo->bus,
                pRendition->PciInfo->device, pRendition->PciInfo->func);
+#endif
 
     /*
      * XXX This could be refined if some VGA memory resources are not
@@ -559,7 +642,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
 
         case 15:
         {
-            if (PCI_CHIP_V1000 != pRendition->PciInfo->chipType) {
+            if (PCI_CHIP_V1000 == DEVICE_ID(pRendition->PciInfo)) {
                 xf86DrvMsg( pScreenInfo->scrnIndex, X_ERROR,
                         "Given depth (%d) is not supported by this chipset.\n",
                         pScreenInfo->depth);
@@ -633,7 +716,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
     /* set various fields according to the given options */
     /* to be filled in <ml> */
 
-    if (PCI_CHIP_V1000==pRendition->PciInfo->chipType){
+    if (PCI_CHIP_V1000 == DEVICE_ID(pRendition->PciInfo)) {
       pRendition->board.chip=V1000_DEVICE;
     }
     else {
@@ -656,12 +739,19 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
 
     pRendition->board.accel=0;
     pRendition->board.vgaio_base = pvgaHW->PIOOffset;
-    pRendition->board.io_base =
-	pRendition->board.vgaio_base + pRendition->PciInfo->ioBase[1];
+    pRendition->board.io_base = pRendition->board.vgaio_base 
+#ifdef PCIACCESS
+	+ pRendition->PciInfo->regions[1].base_addr;
+#else
+	+ pRendition->PciInfo->ioBase[1]
+#endif
+	;
     pRendition->board.mmio_base=0;
     pRendition->board.vmmio_base=0;
     pRendition->board.mem_size=0;
+#ifndef PCIACCESS
     pRendition->board.mem_base=(vu8 *)pRendition->PciInfo->memBase[0];
+#endif
     pRendition->board.vmem_base=NULL;
     pRendition->board.init=0;
 
@@ -679,8 +769,14 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
 	       "Rendition %s @ %lx/%lx\n",
 	       renditionChipsets[pRendition->board.chip==V1000_DEVICE ? 0:1]
 	       .name,
+#ifdef PCIACCESS
+	       pRendition->PciInfo->regions[1].base_addr,
+	       pRendition->PciInfo->regions[0].base_addr
+#else
 	       pRendition->PciInfo->ioBase[1],
-	       pRendition->PciInfo->memBase[0]);
+	       pRendition->PciInfo->memBase[0]
+#endif
+	       );
 
     /* First of all get a "clean" starting state */
     verite_resetboard(pScreenInfo);
@@ -1365,13 +1461,18 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
     Bool WriteCombine;
     int mapOption;
     renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
+#ifdef PCIACCESS
+    int err;
+#endif
 
 #ifdef DEBUG
     ErrorF("Mapping ...\n");
+#ifndef PCIACCESS
     ErrorF("%d %d %d %x %d\n", pScreenInfo->scrnIndex, VIDMEM_FRAMEBUFFER, 
 	   pRendition->pcitag,
 	   pRendition->board.mem_base, pScreenInfo->videoRam * 1024);
 #endif
+#endif
 
     if (pRendition->board.chip == V1000_DEVICE){
 	/* Some V1000 boards are known to have problems with Write-Combining */
@@ -1394,12 +1495,19 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
 	mapOption = VIDMEM_MMIO;
     }
 
+#ifdef PCIACCESS
+    err = pci_device_map_region(pRendition->PciInfo, 0, TRUE);
+    pRendition->board.vmem_base = pRendition->PciInfo->regions[0].memory;
+
+    return (err == 0);
+#else
     pRendition->board.vmem_base=
         xf86MapPciMem(pScreenInfo->scrnIndex, mapOption,
 		      pRendition->pcitag,
 		      (unsigned long)pRendition->board.mem_base,
 		      pScreenInfo->videoRam * 1024);
     return TRUE;
+#endif
     
 #ifdef DEBUG0
     ErrorF("Done\n");
diff --git a/src/vtypes.h b/src/vtypes.h
index c9b9606..0f845ce 100644
--- a/src/vtypes.h
+++ b/src/vtypes.h
@@ -11,6 +11,9 @@
 #include <X11/Xmd.h>
 #include "xf86Pci.h"
 
+#ifdef PCIACCESS
+#include <pciaccess.h>
+#endif
 
 /*
  * defines
@@ -177,8 +180,12 @@ typedef struct _renditionRec
 {
     struct verite_board_t board;        /* information on the board */
     struct verite_modeinfo_t mode;      /* information on the mode */
+#ifdef PCIACCESS
+    struct pci_device * PciInfo;
+#else
     PCITAG pcitag;                      /* tag for the PCI config space */
     pciVideoPtr PciInfo;                /* PCI config data */
+#endif
     EntityInfoPtr pEnt;                 /* entity information */
     CloseScreenProcPtr CloseScreen;     /* wrap CloseScreen */
     xf86CursorInfoPtr CursorInfoRec;    /* Cursor data */

commit 1a2a9e76aa9b8fbd821c41fd67646a7c35180b48
Author: Ian Romanick <idr@us.ibm.com>
Date:   Tue Mar 6 09:16:44 2007 -0800

    Move renditionTypes, renditionChipsets, and renditionPCIchipsets earlier in file.

diff --git a/src/rendition.c b/src/rendition.c
index 5fcd6d3..4cfcecb 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -138,6 +138,24 @@ OptionInfoRec const renditionOptions[]={
     { -1,                NULL,      OPTV_NONE,    {0}, FALSE }
 };
 
+enum renditionTypes {
+    CHIP_RENDITION_V1000,
+    CHIP_RENDITION_V2x00
+};
+
+/* supported chipsets */
+static SymTabRec renditionChipsets[] = {
+    {CHIP_RENDITION_V1000, "V1000"},
+    {CHIP_RENDITION_V2x00, "V2x00"},
+    {-1,                   NULL}
+};
+
+static PciChipsets renditionPCIchipsets[] = {
+  { CHIP_RENDITION_V1000, PCI_CHIP_V1000, RES_SHARED_VGA },
+  { CHIP_RENDITION_V2x00, PCI_CHIP_V2x00, RES_SHARED_VGA },
+  { -1,                   -1,             RES_UNDEFINED }
+};


Reply to: