summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordok666 <dok666>2003-05-09 18:34:21 +0000
committerdok666 <dok666>2003-05-09 18:34:21 +0000
commit266cf70fdef11feba1cef86101680e9963ed2526 (patch)
tree8669984fdd17a2e032b8be0e6a88388a8815feb8
parent289373820cc2a30be5cd8c7af2c37790b2630ce0 (diff)
Read back AGP mode to report correct rate to user.
-rw-r--r--src/mesa/drivers/dri/mga/server/mga_dri.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c
index f872f6df33..c7aee8e56a 100644
--- a/src/mesa/drivers/dri/mga/server/mga_dri.c
+++ b/src/mesa/drivers/dri/mga/server/mga_dri.c
@@ -160,6 +160,15 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
fprintf( stderr,
"[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x]\n",
mode, vendor, device );
+
+ if (mode & MGA_AGP_4X_MODE)
+ pMga->agpMode = 4;
+ else if (mode & MGA_AGP_2X_MODE)
+ pMga->agpMode = 2;
+ else if (mode & MGA_AGP_1X_MODE)
+ pMga->agpMode = 1;
+ else
+ pMga->agpMode = 0;
if ( pMga->Chipset == PCI_CHIP_MGAG200 ) {
switch ( pMga->agpMode ) {