summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-09-12 23:22:31 +0000
committerEric Anholt <anholt@freebsd.org>2004-09-12 23:22:31 +0000
commit80dc84d067c5af29e33a0c7ac62eecc8ba4e0871 (patch)
tree1df266bcd7647718de3054c43b002b3dfe600314 /hw
parentab50679aabdda9e6197568f745d02fe1e65c7a24 (diff)
- 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.
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/ati/ati_draw.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/hw/kdrive/ati/ati_draw.c b/hw/kdrive/ati/ati_draw.c
index a3d9d9d04..105eaac44 100644
--- a/hw/kdrive/ati/ati_draw.c
+++ b/hw/kdrive/ati/ati_draw.c
@@ -677,7 +677,8 @@ ATIBlockHandler(pointer blockData, OSTimePtr timeout, pointer readmask)
/* 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 @@ ATIDrawEnable(ScreenPtr pScreen)
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 @@ ATIDrawEnable(ScreenPtr pScreen)
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 @@ ATIDrawEnable(ScreenPtr pScreen)
void
ATIDrawDisable(ScreenPtr pScreen)
{
- RemoveBlockAndWakeupHandlers (ATIBlockHandler, ATIWakeupHandler,
- pScreen);
ATIDMATeardown(pScreen);
}
@@ -827,6 +833,9 @@ ATIDrawFini(ScreenPtr pScreen)
}
#endif /* USE_DRI */
+ RemoveBlockAndWakeupHandlers(ATIBlockHandler, ATIWakeupHandler,
+ pScreen);
+
kaaDrawFini(pScreen);
}