From 14ad0a6fadcac04d7494b6af342e3d19d0194601 Mon Sep 17 00:00:00 2001 From: kloczek Date: Sun, 25 Mar 2001 03:53:38 +0000 Subject: [PATCH] - merg from rawhide. Changed files: XFree86-agpgart-load.patch -> 1.1 XFree86-mga-busmstr.patch -> 1.1 XFree86-r128-busmstr2.patch -> 1.1 --- XFree86-agpgart-load.patch | 12 ++++++++ XFree86-mga-busmstr.patch | 27 ++++++++++++++++++ XFree86-r128-busmstr2.patch | 55 +++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 XFree86-agpgart-load.patch create mode 100644 XFree86-mga-busmstr.patch create mode 100644 XFree86-r128-busmstr2.patch diff --git a/XFree86-agpgart-load.patch b/XFree86-agpgart-load.patch new file mode 100644 index 0000000..2dba4e6 --- /dev/null +++ b/XFree86-agpgart-load.patch @@ -0,0 +1,12 @@ +--- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c.foo Thu Mar 1 10:30:43 2001 ++++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c Thu Mar 1 10:36:48 2001 +@@ -280,6 +280,9 @@ + + #if defined(XFree86Server) + if (!drmAvailable()) { ++ if (!xf86LoadKernelModule("agpgart")) { ++ ErrorF("[drm] failed to load kernel module \"agpgart\"\n"); ++ } + /* try to load the kernel module now */ + if (!xf86LoadKernelModule(name)) { + ErrorF("[drm] failed to load kernel module \"%s\"\n", diff --git a/XFree86-mga-busmstr.patch b/XFree86-mga-busmstr.patch new file mode 100644 index 0000000..3ca86a7 --- /dev/null +++ b/XFree86-mga-busmstr.patch @@ -0,0 +1,27 @@ +Index: mga_dri.c +=================================================================== +RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v +retrieving revision 1.14 +diff -u -r1.14 mga_dri.c +--- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c 2000/12/11 22:34:55 1.14 ++++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c 2001/03/02 20:13:06 +@@ -379,6 +379,7 @@ + int init_offset; + int i; + unsigned long mode_mask; ++ CARD32 pciCommand; + + switch(pMGA->Chipset) { + case PCI_CHIP_MGAG400: +@@ -782,6 +783,11 @@ + return FALSE; + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" ); ++ ++ /* Enable bus mastering in PCI config space */ ++ pciCommand = pciReadLong(pMGA->PciTag, PCI_CMD_STAT_REG); ++ pciWriteLong(pMGA->PciTag, PCI_CMD_STAT_REG, ++ pciCommand | PCI_CMD_MASTER_ENABLE); + + return TRUE; + } diff --git a/XFree86-r128-busmstr2.patch b/XFree86-r128-busmstr2.patch new file mode 100644 index 0000000..0245d70 --- /dev/null +++ b/XFree86-r128-busmstr2.patch @@ -0,0 +1,55 @@ +Index: r128.h +=================================================================== +RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v +retrieving revision 1.8 +diff -u -r1.8 r128.h +--- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2000/12/08 19:15:33 1.8 ++++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2001/03/02 20:16:38 +@@ -280,6 +280,8 @@ + unsigned char *AGP; /* Map */ + int agpMode; + ++ CARD32 pciCommand; ++ + Bool CCEInUse; /* CCE is currently active */ + int CCEMode; /* CCE mode that server/clients use */ + int CCEFifoSize; /* Size of the CCE command FIFO */ +Index: r128_dri.c +=================================================================== +RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v +retrieving revision 1.7 +diff -u -r1.7 r128_dri.c +--- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2000/12/12 17:17:12 1.7 ++++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2001/03/02 20:16:38 +@@ -403,6 +403,9 @@ + int s, l; + int flags; + ++ /* Save the old PCI command reg */ ++ info->pciCommand = pciReadLong(info->PciTag, PCI_CMD_STAT_REG); ++ + if (drmAgpAcquire(info->drmFD) < 0) { + xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not available\n"); + return FALSE; +@@ -576,6 +579,11 @@ + OUTREG(R128_AGP_BASE, info->ringHandle); /* Ring buf is at AGP offset 0 */ + OUTREG(R128_AGP_CNTL, cntl); + ++ /* Enable bus mastering in PCI config ++ space */ ++ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, ++ info->pciCommand | PCI_CMD_MASTER_ENABLE); ++ + return TRUE; + } + +@@ -1020,6 +1028,9 @@ + drmAgpFree(info->drmFD, info->agpMemHandle); + info->agpMemHandle = 0; + drmAgpRelease(info->drmFD); ++ ++ /* Restore PCI command register */ ++ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, info->pciCommand); + } + + /* De-allocate all DRI resources */ -- 2.44.0