xserver: Branch 'pci-rework' - 8 commits
Ian Romanick
idr at kemper.freedesktop.org
Thu Jan 25 02:04:33 EET 2007
exa/exa.h | 6 +-
exa/exa_migration.c | 2
exa/exa_offscreen.c | 70 +++++++++++++++++++++++++++++-----
exa/exa_priv.h | 3 +
hw/xfree86/common/xf86Module.h | 2
hw/xfree86/common/xf86pciBus.c | 71 -----------------------------------
hw/xfree86/int10/generic.c | 56 +++++++++++++++++++++++++++
hw/xfree86/loader/xf86sym.c | 1
hw/xfree86/os-support/bus/Pci.c | 41 --------------------
hw/xfree86/os-support/bus/Pci.h | 8 ---
hw/xfree86/os-support/bus/axpPci.c | 28 -------------
hw/xfree86/os-support/bus/linuxPci.c | 52 -------------------------
hw/xfree86/os-support/bus/sparcPci.c | 24 -----------
hw/xfree86/os-support/bus/xf86Pci.h | 1
randr/randrstr.h | 3 +
randr/rrcrtc.c | 27 +++++++++++++
randr/rrpointer.c | 26 ------------
randr/rrxinerama.c | 6 +-
18 files changed, 158 insertions(+), 269 deletions(-)
New commits:
diff-tree 24506ea65be4cb29c5e1486aa0a529a40ce5c230 (from fdb3a0798f0d17e72ec7293d59a7a81b5ffdf95b)
Author: Ian Romanick <idr at us.ibm.com>
Date: Wed Jan 24 15:33:49 2007 -0800
Move xf86ReadLegacyBIOS to the one place that uses it.
xf86ReadLegacyBIOS is only used by one function in int10/generic.c.
Move a generic implementation of that function there, rename it to
read_legcay_BIOS, and delete all remnants of it from all other places.
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index b3a9460..6a04711 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -62,6 +62,60 @@ static void UnmapVRam(xf86Int10InfoPtr p
static void *sysMem = NULL;
+/**
+ * Read legacy VGA video BIOS associated with specified domain.
+ *
+ * Attempts to read up to 128KiB of legacy VGA video BIOS.
+ *
+ * \return
+ * The number of bytes read on success or -1 on failure.
+ *
+ * \bug
+ * PCI ROMs can contain multiple BIOS images (e.g., OpenFirmware, x86 VGA,
+ * etc.). How do we know that \c pci_device_read_rom will return the
+ * legacy VGA BIOS image?
+ */
+static int
+read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf)
+{
+ const ADDRESS Base = 0xC0000;
+ const int Len = 0x10000 * 2;
+ const int pagemask = getpagesize() - 1;
+ const ADDRESS offset = Base & ~pagemask;
+ const unsigned long size = ((Base + Len + pagemask) & ~pagemask) - offset;
+ unsigned char *ptr, *src;
+ int len;
+
+
+ /* Try to use the civilized PCI interface first.
+ */
+ if (pci_device_read_rom(dev, Buf) == 0) {
+ return dev->rom_size;
+ }
+
+ ptr = xf86MapDomainMemory(-1, VIDMEM_READONLY, dev, offset, size);
+
+ if (!ptr)
+ return -1;
+
+ /* Using memcpy() here can hang the system */
+ src = ptr + (Base - offset);
+ for (len = 0; len < (Len / 2); len++) {
+ Buf[len] = src[len];
+ }
+
+ if ((Buf[0] == 0x55) && (Buf[1] == 0xAA) && (Buf[2] > 0x80)) {
+ for ( /* empty */ ; len < Len; len++) {
+ Buf[len] = src[len];
+ }
+ }
+
+ xf86UnMapVidMem(-1, ptr, size);
+
+ return Len;
+}
+
+
xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
@@ -216,7 +270,7 @@ xf86ExtendedInitInt10(int entityIndex, i
*/
vbiosMem = (char *)base + V_BIOS;
(void)memset(vbiosMem, 0, 2 * V_BIOS_SIZE);
- if (xf86ReadLegacyVideoBIOS(pInt->dev, vbiosMem) < V_BIOS_SIZE) {
+ if (read_legacy_video_BIOS(pInt->dev, vbiosMem) < V_BIOS_SIZE) {
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x0C0000.\n");
}
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 75181f2..952e7fe 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -249,7 +249,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86UnMapVidMem)
SYMFUNC(xf86MapReadSideEffects)
SYMFUNC(xf86MapDomainMemory)
- SYMFUNC(xf86ReadLegacyVideoBIOS)
SYMFUNC(xf86UDelay)
SYMFUNC(xf86IODelay)
SYMFUNC(xf86SlowBcopy)
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index a53f344..31e9023 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -23,8 +23,6 @@
* xf86MapDomainMemory() - Like xf86MapPciMem() but can handle
* domain/host address translation
* xf86MapLegacyIO() - Maps PCI I/O spaces
- * xf86ReadLegacyVideoBIOS() - Like xf86ReadPciBIOS() but can handle
- * domain/host address translation
*
* The actual PCI backend driver is selected by the pciInit() function
* (see below) using either compile time definitions, run-time checks,
@@ -305,43 +303,4 @@ xf86MapLegacyIO(struct pci_device *dev)
return 0;
}
-_X_EXPORT int
-xf86ReadLegacyVideoBIOS(struct pci_device *dev, unsigned char *Buf)
-{
- const unsigned Len = (2 * 0x10000);
- ADDRESS Base = 0xC0000;
- int ret, length, rlength;
-
- /* Read in 64kB chunks */
- ret = 0;
-
- for (length = 0x10000; length > 0; /* empty */) {
- rlength = xf86ReadBIOS(Base, 0, & Buf[ret], length);
- if (rlength < 0) {
- ret = rlength;
- break;
- }
-
- ret += rlength;
- length -= rlength;
- Base += rlength;
- }
-
- if ((Buf[0] == 0x55) && (Buf[1] == 0xAA) && (Buf[2] > 0x80)) {
- for (length = 0x10000; length > 0; /* empty */) {
- rlength = xf86ReadBIOS(Base, 0, & Buf[ret], length);
- if (rlength < 0) {
- ret = rlength;
- break;
- }
-
- ret += rlength;
- length -= rlength;
- Base += rlength;
- }
- }
-
- return ret;
-}
-
#endif /* INCLUDE_XF86_NO_DOMAIN */
diff --git a/hw/xfree86/os-support/bus/axpPci.c b/hw/xfree86/os-support/bus/axpPci.c
index e7e996a..1f15477 100644
--- a/hw/xfree86/os-support/bus/axpPci.c
+++ b/hw/xfree86/os-support/bus/axpPci.c
@@ -361,34 +361,6 @@ xf86MapLegacyIO(struct pci_device *dev)
return pDomain->mapped_io;
}
-_X_EXPORT int
-xf86ReadLegacyVideoBIOS(PCITAG Tag, unsigned char *Buf)
-{
- const unsigned long pagemask = xf86getpagesize() - 1;
- const ADDRESS Base = 0xC0000;
- const int Len = 0x20000;
- const ADDRESS MapBase = Base & ~pagemask;
- unsigned long MapSize = ((Base + Len + pagemask) & ~pagemask) - MapBase;
- unsigned char *MappedAddr;
- int i;
-
-
- /*
- * VIDMEM_MMIO in order to get sparse mapping on sparse memory systems
- * so we can use mmio functions to read (that way we can really get byte
- * at a time reads on dense memory systems with byte/word instructions.
- */
- MappedAddr = xf86MapDomainMemory(-1, VIDMEM_READONLY | VIDMEM_MMIO,
- Tag, MapBase, MapSize);
-
- for (i = 0; i < Len; i++) {
- *Buf++ = xf86ReadMmio8(MappedAddr, Base - MapBase + i);
- }
-
- xf86UnMapVidMem(-1, MappedAddr, MapSize);
- return Len;
-}
-
resPtr
xf86PciBusAccWindowsFromOS(void)
{
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index ec8ae01..46ca083 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -547,54 +547,6 @@ xf86MapLegacyIO(struct pci_device *dev)
return (IOADDRESS)DomainMmappedIO[domain];
}
-/**
- * Read legacy VGA video BIOS associated with specified domain.
- *
- * Attempts to read up to 128KiB of legacy VGA video BIOS.
- *
- * \return
- * The number of bytes read on success or -1 on failure.
- */
-_X_EXPORT int
-xf86ReadLegacyVideoBIOS(struct pci_device *dev, unsigned char *Buf)
-{
- const ADDRESS Base = 0xC0000;
- const int Len = 0x10000 * 2;
- const int pagemask = getpagesize() - 1;
- const ADDRESS offset = Base & ~pagemask;
- const unsigned long size = ((Base + Len + pagemask) & ~pagemask) - offset;
- unsigned char *ptr, *src;
- int len;
-
-
- /* Try to use the civilized PCI interface first.
- */
- if (pci_device_read_rom(dev, Buf) == 0) {
- return dev->rom_size;
- }
-
- ptr = xf86MapDomainMemory(-1, VIDMEM_READONLY, dev, offset, size);
-
- if (!ptr)
- return -1;
-
- /* Using memcpy() here can hang the system */
- src = ptr + (Base - offset);
- for (len = 0; len < (Len / 2); len++) {
- Buf[len] = src[len];
- }
-
- if ((Buf[0] == 0x55) && (Buf[1] == 0xAA) && (Buf[2] > 0x80)) {
- for ( /* empty */ ; len < Len; len++) {
- Buf[len] = src[len];
- }
- }
-
- xf86UnMapVidMem(-1, ptr, size);
-
- return Len;
-}
-
resPtr
xf86BusAccWindowsFromOS(void)
{
diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c
index f09ed9f..82b1d89 100644
--- a/hw/xfree86/os-support/bus/sparcPci.c
+++ b/hw/xfree86/os-support/bus/sparcPci.c
@@ -648,30 +648,6 @@ xf86MapLegacyIO(int ScreenNum, int Flags
return (IOADDRESS)pDomain->io + Base;
}
-_X_EXPORT int
-xf86ReadLegacyVideoBIOS(PCITAG Tag, ADDRESS Base, int Len, unsigned char *Buf)
-{
- unsigned char *ptr, *src;
- ADDRESS offset;
- unsigned long size;
- int len;
-
- /* Ensure page boundaries */
- offset = Base & ~pagemask;
- size = ((Base + Len + pagemask) & ~pagemask) - offset;
-
- ptr = xf86MapDomainMemory(-1, VIDMEM_READONLY, Tag, offset, size);
-
- /* Using memcpy() here hangs the system */
- src = ptr + (Base - offset);
- for (len = Len; len-- > 0;)
- *Buf++ = *src++;
-
- xf86UnMapVidMem(-1, ptr, size);
-
- return Len;
-}
-
resPtr
xf86BusAccWindowsFromOS(void)
{
diff --git a/hw/xfree86/os-support/bus/xf86Pci.h b/hw/xfree86/os-support/bus/xf86Pci.h
index eef3d2e..2b8a4f7 100644
--- a/hw/xfree86/os-support/bus/xf86Pci.h
+++ b/hw/xfree86/os-support/bus/xf86Pci.h
@@ -261,6 +261,5 @@ extern int pciNumBuses;
pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev,
ADDRESS Base, unsigned long Size);
IOADDRESS xf86MapLegacyIO(struct pci_device *dev);
-int xf86ReadLegacyVideoBIOS(struct pci_device *dev, unsigned char *Buf);
#endif /* _XF86PCI_H */
diff-tree fdb3a0798f0d17e72ec7293d59a7a81b5ffdf95b (from parents)
Merge: 39b51e1bfc4924fc3bda4342ef9c6c0125d9f4fa a53586eebc166e35c1f48942205832810061daee
Author: Ian Romanick <idr at us.ibm.com>
Date: Wed Jan 24 14:49:39 2007 -0800
Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
diff-tree a53586eebc166e35c1f48942205832810061daee (from 7a12952fd437b105ea0d013d680f9c3a775a183c)
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 24 13:36:25 2007 -0800
Warning fix for RRCrtcSetRotations().
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 098fbe3..c84ec61 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -460,6 +460,7 @@ RRCrtcSetRotations (RRCrtcPtr crtc,
Rotation rotations)
{
crtc->rotations = rotations;
+ return TRUE;
}
/*
diff-tree 7a12952fd437b105ea0d013d680f9c3a775a183c (from b6b855932109b4bc3454f07bef8cb079d79ca369)
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 24 13:34:29 2007 -0800
Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA.
This is a new behavior for version 2.1 of EXA, and only takes effect if the
driver has requested that. Otherwise, the previous behavior remains the same.
diff --git a/exa/exa.h b/exa/exa.h
index b043c12..bf723f7 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -39,7 +39,7 @@
#include "fb.h"
#define EXA_VERSION_MAJOR 2
-#define EXA_VERSION_MINOR 0
+#define EXA_VERSION_MINOR 1
#define EXA_VERSION_RELEASE 0
typedef struct _ExaOffscreenArea ExaOffscreenArea;
@@ -73,8 +73,8 @@ struct _ExaOffscreenArea {
typedef struct _ExaDriver {
/**
* exa_major and exa_minor should be set by the driver to the version of
- * EXA which the driver was compiled for (or configures itself at runtime to
- * support). This allows EXA to extend the structure for new features
+ * EXA which the driver was compiled for (or configures itself at runtime
+ * to support). This allows EXA to extend the structure for new features
* without breaking ABI for drivers compiled against older versions.
*/
int exa_major, exa_minor;
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index d24a1bf..eedc5fd 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -249,7 +249,7 @@ exaCopyDirtyToFb (PixmapPtr pPixmap)
* Called when the memory manager decides it's time to kick the pixmap out of
* framebuffer entirely.
*/
-static void
+void
exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
{
PixmapPtr pPixmap = area->privData;
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index fd3599e..7708dd7 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -81,15 +81,14 @@ ExaOffscreenKickOut (ScreenPtr pScreen,
* @param save callback for when the area is evicted from memory
* @param privdata private data for the save callback.
*
- * Allocates offscreen memory from the device associated with pScreen. size and
- * align deteremine where and how large the allocated area is, and locked will
- * mark whether it should be held in card memory. privdata may be any pointer
- * for the save callback when the area is removed.
+ * Allocates offscreen memory from the device associated with pScreen. size
+ * and align deteremine where and how large the allocated area is, and locked
+ * will mark whether it should be held in card memory. privdata may be any
+ * pointer for the save callback when the area is removed.
*
- * Note that locked areas do get evicted on VT switch, because during that time
- * all offscreen memory becomes inaccessible. This may change in the future,
- * but drivers should be aware of this and provide a callback to mark that their
- * locked allocation was evicted, and then restore it if necessary on EnterVT.
+ * Note that locked areas do get evicted on VT switch unless the driver
+ * requested version 2.1 or newer behavior. In that case, the save callback is
+ * still called.
*/
ExaOffscreenArea *
exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
@@ -256,6 +255,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, in
return area;
}
+/**
+ * Ejects all offscreen areas, and uninitializes the offscreen memory manager.
+ */
void
ExaOffscreenSwapOut (ScreenPtr pScreen)
{
@@ -283,12 +285,56 @@ ExaOffscreenSwapOut (ScreenPtr pScreen)
ExaOffscreenFini (pScreen);
}
+/** Ejects all pixmaps managed by EXA. */
+static void
+ExaOffscreenEjectPixmaps (ScreenPtr pScreen)
+{
+ ExaScreenPriv (pScreen);
+
+ ExaOffscreenValidate (pScreen);
+ /* loop until a single free area spans the space */
+ for (;;)
+ {
+ ExaOffscreenArea *area;
+
+ for (area = pExaScr->info->offScreenAreas; area != NULL;
+ area = area->next)
+ {
+ if (area->state == ExaOffscreenRemovable &&
+ area->save == exaPixmapSave)
+ {
+ (void) ExaOffscreenKickOut (pScreen, area);
+ ExaOffscreenValidate (pScreen);
+ break;
+ }
+ }
+ if (area == NULL)
+ break;
+ }
+ ExaOffscreenValidate (pScreen);
+}
+
void
ExaOffscreenSwapIn (ScreenPtr pScreen)
{
exaOffscreenInit (pScreen);
}
+/**
+ * Prepares EXA for disabling of FB access, or restoring it.
+ *
+ * In version 2.1, the disabling results in pixmaps being ejected, while other
+ * allocations remain. With this plus the prevention of migration while
+ * swappedOut is set, EXA by itself should not cause any access of the
+ * framebuffer to occur while swapped out. Any remaining issues are the
+ * responsibility of the driver.
+ *
+ * Prior to version 2.1, all allocations, including locked ones, are ejected
+ * when access is disabled, and the allocator is torn down while swappedOut
+ * is set. This is more drastic, and caused implementation difficulties for
+ * many drivers that could otherwise handle the lack of FB access while
+ * swapped out.
+ */
void
exaEnableDisableFBAccess (int index, Bool enable)
{
@@ -296,10 +342,14 @@ exaEnableDisableFBAccess (int index, Boo
ExaScreenPriv (pScreen);
if (!enable) {
- ExaOffscreenSwapOut (pScreen);
+ if (pExaScr->info->exa_minor < 1)
+ ExaOffscreenSwapOut (pScreen);
+ else
+ ExaOffscreenEjectPixmaps (pScreen);
pExaScr->swappedOut = TRUE;
} else {
- ExaOffscreenSwapIn (pScreen);
+ if (pExaScr->info->exa_minor < 1)
+ ExaOffscreenSwapIn (pScreen);
pExaScr->swappedOut = FALSE;
}
}
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 403d4b6..984cb66 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -412,4 +412,7 @@ exaGlyphs (CARD8 op,
void
exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
+void
+exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area);
+
#endif /* EXAPRIV_H */
diff-tree b6b855932109b4bc3454f07bef8cb079d79ca369 (from 788cfce911793a26aed16f38f30678ecee82c873)
Author: Keith Packard <keithp at keithp.com>
Date: Thu Jan 25 00:29:20 2007 +0800
Make Xinearama screen information reflect CRTC rotation.
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 99022c3..5058212 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -549,6 +549,9 @@ Bool
RRCrtcSetRotations (RRCrtcPtr crtc,
Rotation rotations);
+void
+RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
+
/*
* Destroy a Crtc at shutdown
*/
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index cfd4da9..098fbe3 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -397,6 +397,32 @@ RRCrtcGammaNotify (RRCrtcPtr crtc)
return TRUE; /* not much going on here */
}
+/**
+ * Returns the width/height that the crtc scans out from the framebuffer
+ */
+void
+RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height)
+{
+ if (crtc->mode == NULL) {
+ *width = 0;
+ *height = 0;
+ return;
+ }
+
+ switch (crtc->rotation & 0xf) {
+ case RR_Rotate_0:
+ case RR_Rotate_180:
+ *width = crtc->mode->mode.width;
+ *height = crtc->mode->mode.height;
+ break;
+ case RR_Rotate_90:
+ case RR_Rotate_270:
+ *width = crtc->mode->mode.height;
+ *height = crtc->mode->mode.width;
+ break;
+ }
+}
+
/*
* Set the size of the gamma table at server startup time
*/
diff --git a/randr/rrpointer.c b/randr/rrpointer.c
index 2a5ae7d..802dcb2 100644
--- a/randr/rrpointer.c
+++ b/randr/rrpointer.c
@@ -22,32 +22,6 @@
#include "randrstr.h"
-/**
- * Returns the width/height that the crtc scans out from the framebuffer
- */
-static void
-RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height)
-{
- if (crtc->mode == NULL) {
- *width = 0;
- *height = 0;
- return;
- }
-
- switch (crtc->rotation & 0xf) {
- case RR_Rotate_0:
- case RR_Rotate_180:
- *width = crtc->mode->mode.width;
- *height = crtc->mode->mode.height;
- break;
- case RR_Rotate_90:
- case RR_Rotate_270:
- *width = crtc->mode->mode.height;
- *height = crtc->mode->mode.width;
- break;
- }
-}
-
/*
* When the pointer moves, check to see if the specified position is outside
* any of theavailable CRTCs and move it to a 'sensible' place if so, where
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 8b95145..1db27f1 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -290,10 +290,12 @@ ProcRRXineramaQueryScreens(ClientPtr cli
RRCrtcPtr crtc = pScrPriv->crtcs[i];
if (RRXineramaCrtcActive (crtc))
{
+ int width, height;
+ RRCrtcGetScanoutSize (crtc, &width, &height);
scratch.x_org = crtc->x;
scratch.y_org = crtc->y;
- scratch.width = crtc->mode->mode.width;
- scratch.height = crtc->mode->mode.height;
+ scratch.width = width;
+ scratch.height = height;
if(client->swapped) {
register int n;
swaps(&scratch.x_org, n);
diff-tree 39b51e1bfc4924fc3bda4342ef9c6c0125d9f4fa (from parents)
Merge: 637b19b3ee7345c2d449ce94ceabe998d817c02e 788cfce911793a26aed16f38f30678ecee82c873
Author: Ian Romanick <idr at us.ibm.com>
Date: Tue Jan 23 13:25:56 2007 -0800
Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
diff-tree 788cfce911793a26aed16f38f30678ecee82c873 (from 2dc866252c84ed0e7b3afa25e8a5312f448d405b)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Tue Jan 23 10:15:22 2007 +0100
Bump video driver ABI version to 1.2.
This is necessary because server-1.2-branch bumped to 1.1 for xf86CVTMode and
we have xf86XVFillKeyHelperDrawable on top of that.
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 3c3247e..2811839 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -84,7 +84,7 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(1, 1)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(1, 2)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(1, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
diff-tree 637b19b3ee7345c2d449ce94ceabe998d817c02e (from a232e4ae938fa3a68f7614995676eda7929260db)
Author: Ian Romanick <idr at us.ibm.com>
Date: Mon Jan 22 09:58:33 2007 -0800
Eliminate pciControlBridge, pciGetBridgeBuses, and pciGetBridgeResources.
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 953be48..21a57ae 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -353,38 +353,6 @@ pciBusAccessDisable(BusAccPtr ptr)
}
#undef MASKBITS
-/* move to OS layer */
-static void
-pciDrvBusAccessEnable(BusAccPtr ptr)
-{
-#if 0
- int bus = ptr->busdep.pci.bus;
-
-#ifdef DEBUG
- ErrorF("pciDrvBusAccessEnable: bus=%d\n", bus);
-#endif
- (*pciBusInfo[bus]->funcs->pciControlBridge)(bus,
- PCI_PCI_BRIDGE_VGA_EN,
- PCI_PCI_BRIDGE_VGA_EN);
-#endif
-}
-
-/* move to OS layer */
-static void
-pciDrvBusAccessDisable(BusAccPtr ptr)
-{
-#if 0
- int bus = ptr->busdep.pci.bus;
-
-#ifdef DEBUG
- ErrorF("pciDrvBusAccessDisable: bus=%d\n", bus);
-#endif
- (*pciBusInfo[bus]->funcs->pciControlBridge)(bus,
- PCI_PCI_BRIDGE_VGA_EN, 0);
-#endif
-}
-
-
static void
pciSetBusAccess(BusAccPtr ptr)
{
@@ -494,34 +462,6 @@ restorePciBusState(BusAccPtr ptr)
}
#undef MASKBITS
-/* move to OS layer */
-static void
-savePciDrvBusState(BusAccPtr ptr)
-{
-#if 0
- int bus = ptr->busdep.pci.bus;
-
- ptr->busdep.pci.save.control =
- (*pciBusInfo[bus]->funcs->pciControlBridge)(bus, 0, 0);
- /* Allow master aborts to complete normally on this bus */
- (*pciBusInfo[bus]->funcs->pciControlBridge)(bus,
- PCI_PCI_BRIDGE_MASTER_ABORT_EN,
- 0);
-#endif
-}
-
-/* move to OS layer */
-static void
-restorePciDrvBusState(BusAccPtr ptr)
-{
-#if 0
- int bus = ptr->busdep.pci.bus;
-
- (*pciBusInfo[bus]->funcs->pciControlBridge)(bus, (CARD16)(-1),
- ptr->busdep.pci.save.control);
-#endif
-}
-
/*
* xf86Bus.c interface
@@ -619,16 +559,7 @@ initPciBusState(void)
pbap->set_f = pciSetBusAccess;
- if ((secondary >= 0) && (secondary < pciNumBuses) &&
- (pBusInfo = pciBusInfo[secondary]) &&
- pBusInfo->funcs->pciControlBridge) {
- pbap->type = BUS_PCI;
- pbap->save_f = savePciDrvBusState;
- pbap->restore_f = restorePciDrvBusState;
- pbap->enable_f = pciDrvBusAccessEnable;
- pbap->disable_f = pciDrvBusAccessDisable;
- savePciDrvBusState(pbap);
- } else switch (subclass) {
+ switch (subclass) {
case PCI_SUBCLASS_BRIDGE_HOST:
pbap->type = BUS_PCI;
break;
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 59ad6a1..9eb536d 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -301,14 +301,6 @@ extern void XF86SCANPCI_WRAPPER(scanpciW
*/
typedef struct pci_bus_funcs {
ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS);
- /*
- * The next three are optional. If NULL, the corresponding function is
- * to be performed generically.
- */
- CARD16 (*pciControlBridge)(int, CARD16, CARD16);
- void (*pciGetBridgeBuses)(int, int *, int *, int *);
- /* Use pointer's to avoid #include recursion */
- void (*pciGetBridgeResources)(int, pointer *, pointer *, pointer *);
} pciBusFuncs_t, *pciBusFuncs_p;
/*
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 9959ebb..ec8ae01 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -77,10 +77,6 @@ static pciBusFuncs_t linuxFuncs0 = {
/* pciAddrBusToHost */ linuxTransAddrBusToHost,
#endif /* __sparc64__ */
#endif
-
-/* pciControlBridge */ NULL,
-/* pciGetBridgeBuses */ NULL,
-/* pciGetBridgeResources */ NULL,
};
static pciBusInfo_t linuxPci0 = {
More information about the xorg-commit
mailing list