Here's the workaround for the Radeon 7500 lockup. I won't dignify it by
calling it a fix until I've investigated the actual commands being sent and
determined whether there's a better way of fixing it.
--
Tim Smith ([EMAIL PROTECTED])
Imperial Royal Guard foils attempted theft of Palpatine's left leg. "I'm
hopping mad!" says Emperor.
Index: xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 radeon_state.c
--- xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c 11 Jul 2002 20:31:12 -0000 1.3
+++ xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c 15 Jul 2002 20:40:07 -0000
@@ -1692,6 +1692,19 @@ static int radeon_emit_packet3_cliprect(
if ( i < cmdbuf->nbox ) {
if (DRM_COPY_FROM_USER_UNCHECKED( &box, &boxes[i], sizeof(box) ))
return DRM_ERR(EFAULT);
+ /* FIXME The second and subsequent times round this loop, send a
+ * WAIT_UNTIL_3D_IDLE before calling emit_clip_rect(). This
+ * fixes a lockup on fast machines when sending several
+ * cliprects with a cmdbuf, as when waving a 2D window over
+ * a 3D window. Something in the commands from user space
+ * seems to hang the card when they're sent several times
+ * in a row. That would be the correct place to fix it but
+ * this works around it until I can figure that out - Tim Smith */
+ if ( i ) {
+ BEGIN_RING( 2 );
+ RADEON_WAIT_UNTIL_3D_IDLE();
+ ADVANCE_RING();
+ }
radeon_emit_clip_rect( dev_priv, &box );
}
@@ -1700,7 +1713,6 @@ static int radeon_emit_packet3_cliprect(
ADVANCE_RING();
} while ( ++i < cmdbuf->nbox );
-
if (cmdbuf->nbox == 1)
cmdbuf->nbox = 0;