xserver/hw/kdrive/ati ati_draw.c,1.23,1.24

Eric Anholt xserver-commit at pdx.freedesktop.org
Sun Sep 12 16:22:34 PDT 2004


Committed by: anholt

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

Modified Files:
	ati_draw.c 
Log Message:
- Fix a segfault on VT switch with DRI.  Still dies due to cursor
  allocation troubles.
- Move the RemoveBlockAndWakeupHandlers to match
  RegisterBlockAndWakeupHandlers.
- Enable R100 trapezoid "acceleration" when DRI is working, so that it
  can be exposed and worked on.


Index: ati_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_draw.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ati_draw.c	12 Sep 2004 22:21:12 -0000	1.23
+++ ati_draw.c	12 Sep 2004 23:22:31 -0000	1.24
@@ -677,7 +677,8 @@
 	/* When the server is going to sleep, make sure that all DMA data has
 	 * been flushed.
 	 */
-	ATIFlushIndirect(atis, 1);
+	if (atis->indirectBuffer)
+		ATIFlushIndirect(atis, 1);
 }
 
 static void
@@ -770,17 +771,11 @@
 			atis->kaa.PrepareComposite = R128PrepareComposite;
 			atis->kaa.Composite = R128Composite;
 			atis->kaa.DoneComposite = R128DoneComposite;
-			/*atis->kaa.PrepareTrapezoids = R128PrepareTrapezoids;
-			atis->kaa.Trapezoids = R128Trapezoids;
-			atis->kaa.DoneTrapezoids = R128DoneTrapezoids;*/
 		} else if (atic->is_r100) {
 			atis->kaa.CheckComposite = R100CheckComposite;
 			atis->kaa.PrepareComposite = R100PrepareComposite;
 			atis->kaa.Composite = RadeonComposite;
 			atis->kaa.DoneComposite = RadeonDoneComposite;
-			/*atis->kaa.PrepareTrapezoids = RadeonPrepareTrapezoids;
-			atis->kaa.Trapezoids = RadeonTrapezoids;
-			atis->kaa.DoneTrapezoids = RadeonDoneTrapezoids;*/
 		} else if (0 && atic->is_r200) { /* XXX */
 			atis->kaa.CheckComposite = R200CheckComposite;
 			atis->kaa.PrepareComposite = R200PrepareComposite;
@@ -788,6 +783,19 @@
 			atis->kaa.DoneComposite = RadeonDoneComposite;
 		}
 	}
+#ifdef USE_DRI
+	if (atis->using_dri) {
+		if (!atic->is_radeon) {
+			/*atis->kaa.PrepareTrapezoids = R128PrepareTrapezoids;
+			atis->kaa.Trapezoids = R128Trapezoids;
+			atis->kaa.DoneTrapezoids = R128DoneTrapezoids;*/
+		} else if (atic->is_r100) {
+			atis->kaa.PrepareTrapezoids = RadeonPrepareTrapezoids;
+			atis->kaa.Trapezoids = RadeonTrapezoids;
+			atis->kaa.DoneTrapezoids = RadeonDoneTrapezoids;
+		}
+	}
+#endif /* USE_DRI */
 
 	atis->kaa.UploadToScreen = ATIUploadToScreen;
 
@@ -809,8 +817,6 @@
 void
 ATIDrawDisable(ScreenPtr pScreen)
 {
-	RemoveBlockAndWakeupHandlers (ATIBlockHandler, ATIWakeupHandler,
-				      pScreen);
 
 	ATIDMATeardown(pScreen);
 }
@@ -827,6 +833,9 @@
 	}
 #endif /* USE_DRI */
 
+	RemoveBlockAndWakeupHandlers(ATIBlockHandler, ATIWakeupHandler,
+	    pScreen);
+
 	kaaDrawFini(pScreen);
 }
 



More information about the xserver-commit mailing list