[Nouveau] Synchronization mostly missing?

Luca Barbieri luca at luca-barbieri.com
Mon Dec 28 05:53:36 PST 2009


It looks like there are two bugs.

One seems related to some kind of cache of GART memory which does not
get flushed, causes significant corruption and is worked around by
putting buffers in VRAM.
For some reason, adding syncing instead of putting buffers of VRAM
does seem to greatly reduce the symptoms of this bug and fully removes
them for some programs, for not for all.

However, there is another one, which is still present with buffers in
VRAM but is eliminated if I add syncing with the DMA_FENCE mechanism
at the end of draw_arrays and draw_elements. This one may be more
widely reproducible.

Try running two or more copies of mesa/progs/demos/dinoshade, all visible.
Do you see a flashing yellow region on the floor?
I do. If I add NV40_TCL_NOTIFY or DMA_FENCE based synchronization, the
problem disappears.
This also happens if you move around the window, presumably due to the X server.

It seems that M2MF/FIFO-based fencing does indeed work for our
purposes, but only if there is a single application running.
If there are multiple applications, then the 3D engine DMA_FENCE-based
mechanism somehow waits more and keeps working while FIFO/M2MF-based
fencing fails.

I'm not sure why this is the case though.
Using nVidia ctxprogs has no effect.

Another things that comes to mind (purely speculative) is that the
FIFO synchronization may be due to the fact that the GPU component
that reads from the FIFO is the same one that reads the vertices or
other data and it prioritizes that over reading commands, but having
multiple contexts makes that no longer be the case.


More information about the Nouveau mailing list