From 266cf70fdef11feba1cef86101680e9963ed2526 Mon Sep 17 00:00:00 2001 From: dok666 Date: Fri, 9 May 2003 18:34:21 +0000 Subject: Read back AGP mode to report correct rate to user. --- src/mesa/drivers/dri/mga/server/mga_dri.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ) { -- cgit v1.2.3