On 07 Dec 2002 02:07:03 +0100 Michel Dänzer <[EMAIL PROTECTED]> wrote:
> On Die, 2002-12-03 at 23:17, Felix Kühling wrote: > > > > I just tried glaxium myself. And it freezes the Xserver here too. > > However, I don't have to move the window :-/ it always freezes about 3 > > seconds after I enter the game. I also tried it without TCL. Then it > > seemed to run fine (at least a few seconds longer than usual) and locked > > up as soon as I pushed a button. > > > > I also get the error message about IrqWait. That probably means that the > > hardware stops generating interrupts and is in some messed-up state. > > Would it be helpful for a developer with Radeon specs to see the last > > DMA buffer that was submitted to the card before it locked up? > > Unfortunately, the specs are missing a section 'DMA command streams > which cause lockups'. ;) > > > I could dump DMA buffers to a file and insert a radeonWaitForIdle right after > > submitting (and dumping) DMA buffers, so I'm sure I really get the last > > one *before* the card locks up. > > This sounds like a good plan for you to debug this though. I think I tracked it down to a race condition. If state is emitted while the card is still processing vertices this could be a potential problem, especially if things like texture offsets and sizes are changed. As a workaround I emit a RADEON_WAIT_3D into the cmd buffer before emitting state in radeon_emit_state_list. A patch is attached. This is really just a workaround. A proper fix would have to be in the kernel since a malicious client could still exploit the race condition. BTW, this also fixes a reproducible lockup in Torcs which has been around since September (since I have my Radeon ;-). Regards, Felix __\|/__ ___ ___ ___ __Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___ _____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____ [EMAIL PROTECTED] >o<__/ \___/ \___/ at the same time!
Index: radeon_ioctl.c =================================================================== RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c,v retrieving revision 1.37 diff -u -r1.37 radeon_ioctl.c --- radeon_ioctl.c 30 Nov 2002 14:24:06 -0000 1.37 +++ radeon_ioctl.c 8 Dec 2002 02:18:25 -0000 @@ -85,6 +85,14 @@ struct radeon_state_atom *state, *tmp; char *dest; + { + drmRadeonCmdHeader *cmd; + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, sizeof(*cmd), + __FUNCTION__ ); + cmd->wait.cmd_type = RADEON_CMD_WAIT; + cmd->wait.flags = RADEON_WAIT_3D; + } + foreach_s( state, tmp, list ) { if (state->check( rmesa->glCtx )) { dest = radeonAllocCmdBuf( rmesa, state->cmd_size * 4, __FUNCTION__);