[Nouveau] Interrupt setting

Luca Barbieri luca.barbieri at gmail.com
Sat Mar 13 07:10:21 PST 2010


> Ok, I think I was misunderstanding.
> This means we have to tell a GPU by sending another command to increment a fence
> value.
> Finally I believe I am correct ;-)

It actually sets an arbitrary value. The relevant code is in nouveau_fence.c:
        BEGIN_RING(chan, NvSubSw, USE_REFCNT ? 0x0050 : 0x0150, 1);
        OUT_RING(chan, fence->sequence);

The current sequence number is read with (in the same file):
sequence = nvchan_rd32(chan, 0x48);

(on Riva TNT/TNT2, USE_REFCNT is false, and we trigger an interrupt
for each fence completion so we can emulate that in software)

> On the other hand, this means that, for now in Nouveau, we dont have a way to
> tell a GPU to notify us of a completion of a DMA transfer.
> Maybe an interrupt from a GPU (PGRAPH_BUFFER_NOTIFY or something) is needed for
> this.
> I understand this notification is not necessary now, because DMA transactions
> are managed by ring buffers.

Not sure what you mean.
In theory, once the FIFO processes the next command, all transfers
done by the previous one should be completed.
Note that simple DMA data copies are done with FIFO commands too (with
m2mf aka MEMORY_TO_MEMORY_FORMAT).
Also, all the commands before it have obviously already been fetched
from the FIFO.

The presence of some rendering artifacts casts some doubts on this,
but the consensus is that it is more likely due to missing cache
flushing or something else.


More information about the Nouveau mailing list