summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/ati
diff options
context:
space:
mode:
authorjhartmann <jhartmann>2001-02-12 16:11:09 +0000
committerjhartmann <jhartmann>2001-02-12 16:11:09 +0000
commit7da70ab795a6c27cd0cabc61db3a750c59f51053 (patch)
tree448c6c0d398bf49fd747123be20dd870d02fc325 /xc/programs/Xserver/hw/xfree86/drivers/ati
parent8da00b2d4357a2de8423ac0336645758b3933fdf (diff)
Added code to enable bus mastering to all the DMA drivers before kernel initialization
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/ati')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c7
3 files changed, 3 insertions, 8 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
index dcdf65cf4..a1247ab5e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
@@ -576,6 +576,8 @@ static Bool R128DRIAgpInit(R128InfoPtr info, ScreenPtr pScreen)
OUTREG(R128_AGP_BASE, info->ringHandle); /* Ring buf is at AGP offset 0 */
OUTREG(R128_AGP_CNTL, cntl);
+ xf86EnableBusMaster(info->PciTag);
+
return TRUE;
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
index ee49722fe..7a2285200 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
@@ -293,8 +293,6 @@ typedef struct {
unsigned char *AGP; /* Map */
int agpMode;
- CARD32 pciCommand;
-
Bool CPInUse; /* CP has been used by X server */
int CPMode; /* CP mode that server/clients use */
int CPFifoSize; /* Size of the CP command FIFO */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
index ac309734a..cad22ad8b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
@@ -817,9 +817,7 @@ static Bool RADEONDRIAgpInit(RADEONInfoPtr info, ScreenPtr pScreen)
/* Enable bus mastering in PCI config
space */
- info->pciCommand = pciReadLong(info->PciTag, PCI_CMD_STAT_REG);
- pciWriteLong(info->PciTag, PCI_CMD_STAT_REG,
- info->pciCommand | PCI_CMD_MASTER_ENABLE);
+ xf86EnableBusMaster(info->PciTag);
return TRUE;
}
@@ -1419,9 +1417,6 @@ void RADEONDRICloseScreen(ScreenPtr pScreen)
drmAgpRelease(info->drmFD);
}
- /* Restore PCI command register */
- pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, info->pciCommand);
-
/* De-allocate all DRI resources */
DRICloseScreen(pScreen);