xserver/hw/kdrive/ati ati_dri.c,1.8,1.9

Eric Anholt <xserver-commit-u7BhqnqprCWvj1b/[email protected]>
Newsgroups gmane.comp.freedesktop.xserver.cvs
Message-ID <[email protected]>
Committed by: anholt

Update of /cvs/xserver/xserver/hw/kdrive/ati
In directory gabe:/tmp/cvs-serv12540/hw/kdrive/ati

Modified Files:
	ati_dri.c 
Log Message:
Fix handling of is_agp.  is_agp is whether the card is actually AGP,
while using_agp should say whether AGP is being used as part of DMA/DRI.


Index: ati_dri.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_dri.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ati_dri.c	12 Sep 2004 19:52:51 -0000	1.8
+++ ati_dri.c	12 Sep 2004 20:02:10 -0000	1.9
@@ -422,7 +422,7 @@
 
 	drmInfo.func                = DRM_R128_INIT_CCE;
 	drmInfo.sarea_priv_offset   = sizeof(XF86DRISAREARec);
-	drmInfo.is_pci              = !atic->is_agp;
+	drmInfo.is_pci              = !atis->using_agp;
 	drmInfo.cce_mode            = R128_PM4_64BM_64VCBM_64INDBM;
 	drmInfo.cce_secure          = TRUE;
 	drmInfo.ring_size           = atis->ringSize * 1024 * 1024;
@@ -471,7 +471,7 @@
 	    drmInfo.func             = DRM_RADEON_INIT_CP;
 
 	drmInfo.sarea_priv_offset   = sizeof(XF86DRISAREARec);
-	drmInfo.is_pci              = !atic->is_agp;
+	drmInfo.is_pci              = !atis->using_agp;
 	drmInfo.cp_mode             = RADEON_CSQ_PRIBM_INDBM;
 	drmInfo.gart_size           = atis->gartSize * 1024 * 1024;
 	drmInfo.ring_size           = atis->ringSize * 1024 * 1024;
@@ -515,7 +515,7 @@
 	else
 		size = R128_BUFFER_SIZE;
 
-	if (atic->is_agp)
+	if (atis->using_agp)
 		type = DRM_AGP_BUFFER;
 	else
 		type = DRM_SG_BUFFER;
@@ -727,14 +727,15 @@
 	    &scratch_int, &scratch_int, &scratch_ptr);
 
 	/* Initialize AGP */
+	atis->using_agp = atic->is_agp;
 	if (atic->is_agp && !ATIDRIAgpInit(pScreen)) {
-		atic->is_agp = FALSE;
+		atis->using_agp = FALSE;
 		ErrorF("[agp] AGP failed to initialize; falling back to PCI mode.\n");
 		ErrorF("[agp] Make sure your kernel's AGP support is loaded and functioning.\n");
 	}
 
 	/* Initialize PCIGART */
-	if (!atic->is_agp && !ATIDRIPciInit(pScreen)) {
+	if (!atis->using_agp && !ATIDRIPciInit(pScreen)) {
 		ATIDRICloseScreen(pScreen);
 		return FALSE;
 	}
@@ -759,7 +760,6 @@
 R128DRIFinishScreenInit(ScreenPtr pScreen)
 {
 	KdScreenPriv(pScreen);
-	ATICardInfo(pScreenPriv);
 	ATIScreenInfo(pScreenPriv);
 	R128SAREAPrivPtr pSAREAPriv;
 	R128DRIPtr       pR128DRI;
@@ -791,7 +791,7 @@
 	pR128DRI->depth             = pScreenPriv->screen->fb[0].depth;
 	pR128DRI->bpp               = pScreenPriv->screen->fb[0].bitsPerPixel;
 
-	pR128DRI->IsPCI             = !atic->is_agp;
+	pR128DRI->IsPCI             = !atis->using_agp;
 	pR128DRI->AGPMode           = atis->agpMode;
 
 	pR128DRI->frontOffset       = atis->frontOffset;
@@ -867,7 +867,7 @@
 	pRADEONDRI->depth             = pScreenPriv->screen->fb[0].depth;
 	pRADEONDRI->bpp               = pScreenPriv->screen->fb[0].bitsPerPixel;
 
-	pRADEONDRI->IsPCI             = !atic->is_agp;
+	pRADEONDRI->IsPCI             = !atis->using_agp;
 	pRADEONDRI->AGPMode           = atis->agpMode;
 
 	pRADEONDRI->frontOffset       = atis->frontOffset;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.