]> git.pld-linux.org Git - packages/X11.git/blame - X11-r128-busmstr2.patch
- another try
[packages/X11.git] / X11-r128-busmstr2.patch
CommitLineData
37f44e2a 1--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2004-08-08 14:22:29.000000000 +0200
2+++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2004-08-08 15:11:32.996891824 +0200
3@@ -314,6 +314,8 @@
4 unsigned char *AGP; /* Map */
5 int agpMode;
6
7+ CARD32 pciCommand;
8+
9 Bool CCEInUse; /* CCE is currently active */
10 int CCEMode; /* CCE mode that server/clients use */
11 int CCEFifoSize; /* Size of the CCE command FIFO */
12--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2004-08-08 14:22:29.000000000 +0200
13+++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2004-08-08 15:11:32.999891368 +0200
14@@ -440,6 +440,9 @@
15 int flags;
16 unsigned long agpBase;
17
18+ /* Save the old PCI command reg */
19+ info->pciCommand = pciReadLong(info->PciTag, PCI_CMD_STAT_REG);
20+
21 if (drmAgpAcquire(info->drmFD) < 0) {
22 xf86DrvMsg(pScreen->myNum, X_WARNING, "[agp] AGP not available\n");
23 return FALSE;
24@@ -623,6 +626,11 @@
25
26 OUTREG(R128_PCI_GART_PAGE, 1); /* Ensure AGP GART is used (for now) */
27
28+ /* Enable bus mastering in PCI config
29+ space */
30+ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG,
31+ info->pciCommand | PCI_CMD_MASTER_ENABLE);
32+
33 return TRUE;
34 }
35
36@@ -1333,6 +1341,9 @@
37 drmAgpFree(info->drmFD, info->agpMemHandle);
38 info->agpMemHandle = DRM_AGP_NO_HANDLE;
39 drmAgpRelease(info->drmFD);
40+
41+ /* Restore PCI command register */
42+ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, info->pciCommand);
43 }
44 if (info->pciMemHandle) {
45 drmScatterGatherFree(info->drmFD, info->pciMemHandle);
This page took 0.03332 seconds and 4 git commands to generate.