]>
Commit | Line | Data |
---|---|---|
14ad0a6f | 1 | Index: r128.h |
2 | =================================================================== | |
3 | RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v | |
4 | retrieving revision 1.8 | |
5 | diff -u -r1.8 r128.h | |
6 | --- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2000/12/08 19:15:33 1.8 | |
7 | +++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2001/03/02 20:16:38 | |
8 | @@ -280,6 +280,8 @@ | |
9 | unsigned char *AGP; /* Map */ | |
10 | int agpMode; | |
11 | ||
12 | + CARD32 pciCommand; | |
13 | + | |
14 | Bool CCEInUse; /* CCE is currently active */ | |
15 | int CCEMode; /* CCE mode that server/clients use */ | |
16 | int CCEFifoSize; /* Size of the CCE command FIFO */ | |
17 | Index: r128_dri.c | |
18 | =================================================================== | |
19 | RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v | |
20 | retrieving revision 1.7 | |
21 | diff -u -r1.7 r128_dri.c | |
22 | --- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2000/12/12 17:17:12 1.7 | |
23 | +++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2001/03/02 20:16:38 | |
24 | @@ -403,6 +403,9 @@ | |
25 | int s, l; | |
26 | int flags; | |
27 | ||
28 | + /* Save the old PCI command reg */ | |
29 | + info->pciCommand = pciReadLong(info->PciTag, PCI_CMD_STAT_REG); | |
30 | + | |
31 | if (drmAgpAcquire(info->drmFD) < 0) { | |
32 | xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not available\n"); | |
33 | return FALSE; | |
34 | @@ -576,6 +579,11 @@ | |
35 | OUTREG(R128_AGP_BASE, info->ringHandle); /* Ring buf is at AGP offset 0 */ | |
36 | OUTREG(R128_AGP_CNTL, cntl); | |
37 | ||
38 | + /* Enable bus mastering in PCI config | |
39 | + space */ | |
40 | + pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, | |
41 | + info->pciCommand | PCI_CMD_MASTER_ENABLE); | |
42 | + | |
43 | return TRUE; | |
44 | } | |
45 | ||
46 | @@ -1020,6 +1028,9 @@ | |
47 | drmAgpFree(info->drmFD, info->agpMemHandle); | |
48 | info->agpMemHandle = 0; | |
49 | drmAgpRelease(info->drmFD); | |
50 | + | |
51 | + /* Restore PCI command register */ | |
52 | + pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, info->pciCommand); | |
53 | } | |
54 | ||
55 | /* De-allocate all DRI resources */ |