mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
467 lines
13 KiB
Diff
467 lines
13 KiB
Diff
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/README xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/README
|
|
--- xf86-video-vga-4.1.0/README 1970-01-01 00:00:00.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/README 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -0,0 +1,20 @@
|
|
+xf86-video-vga - Generic VGA video driver for the Xorg X server
|
|
+
|
|
+Please submit bugs & patches to the Xorg bugzilla:
|
|
+
|
|
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
|
+
|
|
+All questions regarding this software should be directed at the
|
|
+Xorg mailing list:
|
|
+
|
|
+ http://lists.freedesktop.org/mailman/listinfo/xorg
|
|
+
|
|
+The master development code repository can be found at:
|
|
+
|
|
+ git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vga
|
|
+
|
|
+ http://cgit.freedesktop.org/xorg/driver/xf86-video-vga
|
|
+
|
|
+For more information on the git code manager, see:
|
|
+
|
|
+ http://wiki.x.org/wiki/GitPage
|
|
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/autogen.sh xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/autogen.sh
|
|
--- xf86-video-vga-4.1.0/autogen.sh 1970-01-01 00:00:00.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/autogen.sh 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -0,0 +1,12 @@
|
|
+#! /bin/sh
|
|
+
|
|
+srcdir=`dirname $0`
|
|
+test -z "$srcdir" && srcdir=.
|
|
+
|
|
+ORIGDIR=`pwd`
|
|
+cd $srcdir
|
|
+
|
|
+autoreconf -v --install || exit 1
|
|
+cd $ORIGDIR || exit $?
|
|
+
|
|
+$srcdir/configure --enable-maintainer-mode "$@"
|
|
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/configure.ac xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/configure.ac
|
|
--- xf86-video-vga-4.1.0/configure.ac 2006-04-07 21:48:23.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/configure.ac 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -57,6 +57,30 @@
|
|
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
|
|
|
|
# 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"
|
|
+
|
|
+SAVE_CFLAGS="$CFLAGS"
|
|
+CFLAGS="$XORG_CFLAGS"
|
|
+AC_CHECK_DECL(xf86ConfigIsaEntity,
|
|
+ [AC_DEFINE(HAVE_ISA, 1, [Have ISA support])],
|
|
+ [],
|
|
+ [#include "xf86.h"])
|
|
+CFLAGS="$SAVE_CFLAGS"
|
|
+
|
|
+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)
|
|
+
|
|
+# Checks for libraries.
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_STDC
|
|
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/man/Makefile.am xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/man/Makefile.am
|
|
--- xf86-video-vga-4.1.0/man/Makefile.am 2005-12-06 22:48:40.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/man/Makefile.am 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -1,4 +1,3 @@
|
|
-# $Id: Makefile.am,v 1.5 2005/11/28 22:04:15 alanc Exp $
|
|
#
|
|
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
|
#
|
|
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/man/vga.man xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/man/vga.man
|
|
--- xf86-video-vga-4.1.0/man/vga.man 2004-04-23 19:53:24.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/man/vga.man 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -1,4 +1,4 @@
|
|
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vga/vga.man,v 1.2 2001/01/27 18:20:56 dawes Exp $
|
|
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vga/vga.man,v 1.3 2001/12/17 20:52:34 dawes Exp $
|
|
.\" shorthand for double quote that works everywhere.
|
|
.ds q \N'34'
|
|
.TH VGA __drivermansuffix__ __vendorversion__
|
|
@@ -60,6 +60,6 @@
|
|
when using those depths in a multi-head configuration where one or more
|
|
of the other screens is operating at a different depth.
|
|
.SH "SEE ALSO"
|
|
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
|
|
+__xservername__(1), __xconfigfile__(__filemansuffix__), Xserver(1), X(__miscmansuffix__)
|
|
.SH AUTHORS
|
|
Authors include: Marc La France, David Dawes, and Dirk Hohndel.
|
|
diff -ruN -x .cvsignore -x .gitignore -X xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/.gitignore xf86-video-vga-4.1.0/src/generic.c xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/src/generic.c
|
|
--- xf86-video-vga-4.1.0/src/generic.c 2006-04-07 21:48:01.000000000 +0000
|
|
+++ xf86-video-vga-1b4bf38991d91c94ce1f15aee185e152f88abb73/src/generic.c 2009-01-31 05:06:53.000000000 +0000
|
|
@@ -50,8 +50,13 @@
|
|
|
|
#include "fb.h"
|
|
|
|
+#if HAVE_XF4BPP
|
|
#include "xf4bpp.h"
|
|
+#endif
|
|
+
|
|
+#if HAVE_XF1BPP
|
|
#include "xf1bpp.h"
|
|
+#endif
|
|
|
|
#include "shadowfb.h"
|
|
|
|
@@ -62,6 +67,10 @@
|
|
#include "xf86Resources.h"
|
|
#include "xf86int10.h"
|
|
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+#include <pciaccess.h>
|
|
+#endif
|
|
+
|
|
/* Some systems #define VGA for their own purposes */
|
|
#undef VGA
|
|
|
|
@@ -79,10 +88,31 @@
|
|
#define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */
|
|
#endif
|
|
|
|
+/*
|
|
+ * This structure is used to wrap the screen's CloseScreen vector.
|
|
+ */
|
|
+typedef struct _GenericRec
|
|
+{
|
|
+ Bool ShadowFB;
|
|
+ Bool KGAUniversal;
|
|
+ CARD8 * ShadowPtr;
|
|
+ CARD32 ShadowPitch;
|
|
+ CloseScreenProcPtr CloseScreen;
|
|
+ OptionInfoPtr Options;
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+ struct pci_device *pciInfo;
|
|
+#endif
|
|
+} GenericRec, *GenericPtr;
|
|
+
|
|
+
|
|
/* Forward definitions */
|
|
static const OptionInfoRec *GenericAvailableOptions(int chipid, int busid);
|
|
static void GenericIdentify(int);
|
|
static Bool GenericProbe(DriverPtr, int);
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+static Bool GenericPciProbe(DriverPtr drv, int entity_num,
|
|
+ struct pci_device *dev, intptr_t match_data);
|
|
+#endif
|
|
static Bool GenericPreInit(ScrnInfoPtr, int);
|
|
static Bool GenericScreenInit(int, ScreenPtr, int, char **);
|
|
static Bool GenericSwitchMode(int, DisplayModePtr, int);
|
|
@@ -90,13 +120,33 @@
|
|
static Bool GenericEnterVT(int, int);
|
|
static void GenericLeaveVT(int, int);
|
|
static void GenericFreeScreen(int, int);
|
|
+#ifdef HAVE_ISA
|
|
static int VGAFindIsaDevice(GDevPtr dev);
|
|
+#endif
|
|
#ifdef SPECIAL_FB_BYTE_ACCESS
|
|
static Bool GenericMapMem(ScrnInfoPtr scrp);
|
|
#endif
|
|
|
|
static ModeStatus GenericValidMode(int, DisplayModePtr, Bool, int);
|
|
|
|
+static GenericPtr GenericGetRec(ScrnInfoPtr pScreenInfo);
|
|
+
|
|
+enum GenericTypes
|
|
+{
|
|
+ CHIP_VGA_GENERIC
|
|
+};
|
|
+
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+static const struct pci_id_match generic_device_match[] = {
|
|
+ {
|
|
+ PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
|
|
+ 0x00030000, 0x00ffffff, CHIP_VGA_GENERIC
|
|
+ },
|
|
+
|
|
+ { 0, 0, 0 },
|
|
+};
|
|
+#endif
|
|
+
|
|
/* The root of all evil... */
|
|
_X_EXPORT DriverRec VGA =
|
|
{
|
|
@@ -106,7 +156,13 @@
|
|
GenericProbe,
|
|
GenericAvailableOptions,
|
|
NULL,
|
|
- 0
|
|
+ 0,
|
|
+ NULL,
|
|
+
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+ generic_device_match,
|
|
+ GenericPciProbe
|
|
+#endif
|
|
};
|
|
|
|
typedef enum
|
|
@@ -146,8 +202,12 @@
|
|
#ifdef XFree86LOADER
|
|
static const char *miscfbSymbols[] =
|
|
{
|
|
+#if HAVE_XF1BPP
|
|
"xf1bppScreenInit",
|
|
+#endif
|
|
+#if HAVE_XF4BPP
|
|
"xf4bppScreenInit",
|
|
+#endif
|
|
NULL
|
|
};
|
|
#endif
|
|
@@ -210,7 +270,13 @@
|
|
if (!Initialised)
|
|
{
|
|
Initialised = TRUE;
|
|
- xf86AddDriver(&VGA, Module, 0);
|
|
+ xf86AddDriver(&VGA, Module,
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+ HaveDriverFuncs
|
|
+#else
|
|
+ 0
|
|
+#endif
|
|
+ );
|
|
LoaderRefSymLists(vgahwSymbols, miscfbSymbols, fbSymbols,
|
|
shadowfbSymbols, int10Symbols, NULL);
|
|
return (pointer)TRUE;
|
|
@@ -224,11 +290,6 @@
|
|
#endif
|
|
|
|
|
|
-enum GenericTypes
|
|
-{
|
|
- CHIP_VGA_GENERIC
|
|
-};
|
|
-
|
|
/* Supported chipsets */
|
|
static SymTabRec GenericChipsets[] =
|
|
{
|
|
@@ -236,17 +297,21 @@
|
|
{-1, NULL}
|
|
};
|
|
|
|
+#ifndef XSERVER_LIBPCIACCESS
|
|
static PciChipsets GenericPCIchipsets[] =
|
|
{
|
|
{CHIP_VGA_GENERIC, PCI_CHIP_VGA, RES_SHARED_VGA},
|
|
{-1, -1, RES_UNDEFINED},
|
|
};
|
|
+#endif
|
|
|
|
+#ifdef HAVE_ISA
|
|
static IsaChipsets GenericISAchipsets[] =
|
|
{
|
|
{CHIP_VGA_GENERIC, RES_EXCLUSIVE_VGA},
|
|
{-1, 0}
|
|
};
|
|
+#endif
|
|
|
|
static void
|
|
GenericIdentify(int flags)
|
|
@@ -267,6 +332,37 @@
|
|
* do a minimal probe for supported hardware.
|
|
*/
|
|
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+static Bool
|
|
+GenericPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
|
|
+ intptr_t match_data)
|
|
+{
|
|
+ ScrnInfoPtr pScrn;
|
|
+
|
|
+ pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL,
|
|
+ NULL, NULL, NULL, NULL, NULL);
|
|
+ if (pScrn != NULL) {
|
|
+ GenericPtr pGeneric = GenericGetRec(pScrn);
|
|
+
|
|
+ pScrn->driverVersion = VGA_VERSION_CURRENT;
|
|
+ pScrn->driverName = VGA_DRIVER_NAME;
|
|
+ pScrn->name = VGA_NAME;
|
|
+ pScrn->Probe = GenericProbe;
|
|
+ pScrn->PreInit = GenericPreInit;
|
|
+ pScrn->ScreenInit = GenericScreenInit;
|
|
+ pScrn->SwitchMode = GenericSwitchMode;
|
|
+ pScrn->AdjustFrame = GenericAdjustFrame;
|
|
+ pScrn->EnterVT = GenericEnterVT;
|
|
+ pScrn->LeaveVT = GenericLeaveVT;
|
|
+ pScrn->FreeScreen = GenericFreeScreen;
|
|
+
|
|
+ pGeneric->pciInfo = dev;
|
|
+ }
|
|
+
|
|
+ return (pScrn != NULL);
|
|
+}
|
|
+#endif
|
|
+
|
|
static Bool
|
|
GenericProbe(DriverPtr drv, int flags)
|
|
{
|
|
@@ -283,6 +379,7 @@
|
|
if ((numDevSections = xf86MatchDevice(VGA_NAME, &devSections)) <= 0)
|
|
return FALSE;
|
|
|
|
+#ifndef XSERVER_LIBPCIACCESS
|
|
/* PCI BUS */
|
|
if (xf86GetPciVideoInfo())
|
|
{
|
|
@@ -324,7 +421,9 @@
|
|
xfree(usedChips);
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
+#ifdef HAVE_ISA
|
|
/* Isa Bus */
|
|
numUsed = xf86MatchIsaInstances(VGA_NAME, GenericChipsets,
|
|
GenericISAchipsets, drv,
|
|
@@ -360,11 +459,13 @@
|
|
xfree(usedChips);
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
xfree(devSections);
|
|
return foundScreen;
|
|
}
|
|
|
|
+#ifdef HAVE_ISA
|
|
static int
|
|
VGAFindIsaDevice(GDevPtr dev)
|
|
{
|
|
@@ -390,20 +491,7 @@
|
|
|
|
return (int)CHIP_VGA_GENERIC;
|
|
}
|
|
-
|
|
-/*
|
|
- * This structure is used to wrap the screen's CloseScreen vector.
|
|
- */
|
|
-typedef struct _GenericRec
|
|
-{
|
|
- Bool ShadowFB;
|
|
- Bool KGAUniversal;
|
|
- CARD8 * ShadowPtr;
|
|
- CARD32 ShadowPitch;
|
|
- CloseScreenProcPtr CloseScreen;
|
|
- OptionInfoPtr Options;
|
|
-} GenericRec, *GenericPtr;
|
|
-
|
|
+#endif
|
|
|
|
static GenericPtr
|
|
GenericGetRec(ScrnInfoPtr pScreenInfo)
|
|
@@ -509,8 +597,14 @@
|
|
|
|
switch (pScreenInfo->depth)
|
|
{
|
|
- case 1: Module = "xf1bpp"; Sym = "xf1bppScreenInit"; break;
|
|
- case 4: Module = "xf4bpp"; Sym = "xf4bppScreenInit"; break;
|
|
+ case 1:
|
|
+#if HAVE_XF1BPP
|
|
+ Module = "xf1bpp"; Sym = "xf1bppScreenInit"; break;
|
|
+#endif
|
|
+ case 4:
|
|
+#if HAVE_XF4BPP
|
|
+ Module = "xf4bpp"; Sym = "xf4bppScreenInit"; break;
|
|
+#endif
|
|
case 8: Module = "fb"; break;
|
|
|
|
default:
|
|
@@ -673,6 +767,8 @@
|
|
/* Set display resolution */
|
|
xf86SetDpi(pScreenInfo, 0, 0);
|
|
|
|
+
|
|
+#if HAVE_XF1BPP && HAVE_XF4BPP
|
|
if (xf86ReturnOptValBool(pGenericPriv->Options, OPTION_SHADOW_FB, FALSE))
|
|
{
|
|
pGenericPriv->ShadowFB = TRUE;
|
|
@@ -688,7 +784,7 @@
|
|
"Enabling universal \"KGA\" treatment.\n");
|
|
}
|
|
|
|
-#ifdef SPECIAL_FB_BYTE_ACCESS
|
|
+# ifdef SPECIAL_FB_BYTE_ACCESS
|
|
if (!pGenericPriv->ShadowFB && (pScreenInfo->depth == 4))
|
|
{
|
|
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
|
@@ -696,8 +792,13 @@
|
|
" ShadowFB enabled.\n");
|
|
pGenericPriv->ShadowFB = TRUE;
|
|
}
|
|
+# endif
|
|
+
|
|
+#else
|
|
+ pGenericPriv->ShadowFB = TRUE;
|
|
#endif
|
|
|
|
+
|
|
if (pGenericPriv->ShadowFB)
|
|
{
|
|
pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
|
|
@@ -1378,6 +1479,7 @@
|
|
#endif
|
|
ShadowFBInit(pScreen, GenericRefreshArea1bpp);
|
|
}
|
|
+#if HAVE_XF1BPP
|
|
else
|
|
{
|
|
Inited = xf1bppScreenInit(pScreen, pvgaHW->Base,
|
|
@@ -1386,6 +1488,7 @@
|
|
pScreenInfo->xDpi, pScreenInfo->yDpi,
|
|
pScreenInfo->displayWidth);
|
|
}
|
|
+#endif
|
|
break;
|
|
case 4:
|
|
if (pGenericPriv->ShadowFB)
|
|
@@ -1410,6 +1513,7 @@
|
|
#endif
|
|
ShadowFBInit(pScreen, GenericRefreshArea4bpp);
|
|
}
|
|
+#if HAVE_XF4BPP
|
|
else
|
|
{
|
|
Inited = xf4bppScreenInit(pScreen, pvgaHW->Base,
|
|
@@ -1418,6 +1522,7 @@
|
|
pScreenInfo->xDpi, pScreenInfo->yDpi,
|
|
pScreenInfo->displayWidth);
|
|
}
|
|
+#endif
|
|
break;
|
|
case 8:
|
|
Inited = fbScreenInit(pScreen, pvgaHW->Base,
|
|
@@ -1579,6 +1684,9 @@
|
|
{
|
|
vgaHWPtr hwp = VGAHWPTR(scrp);
|
|
int scr_index = scrp->scrnIndex;
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+ GenericPtr pPriv = GenericGetRec(scrp);
|
|
+#endif
|
|
|
|
if (hwp->Base)
|
|
return TRUE;
|
|
@@ -1589,7 +1697,12 @@
|
|
if (hwp->MapPhys == 0)
|
|
hwp->MapPhys = VGA_DEFAULT_PHYS_ADDR;
|
|
|
|
- hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO, hwp->Tag,
|
|
+ hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO,
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
+ pPriv->pciInfo,
|
|
+#else
|
|
+ hwp->Tag,
|
|
+#endif
|
|
hwp->MapPhys, hwp->MapSize);
|
|
return hwp->Base != NULL;
|
|
}
|