Skip to contentSkip to conversation

nv40 mpeg2 video decode

DISCUSSION Jimmy Rentz 2 participants 2 messages Jan 13, 2010 – Jan 15, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

I have been working on a kernel and a user layer for the nv40 mpeg2 video decoding hardware:
* The decode hw accepts commands written to a fifo along with a set of registers for firing (put) and queries (get).
* The fifo can be mapped in vram or agp (though, agp isn't working right now).
* The fifo does not support dma jumps and such like the 3d fifo.

Well, I have some questions about how to implement this in nouveau:

* Mapping decode fifo in user-space versus kernel-space - My current version has the fifo being mapped from the kernel (I copied the 3d fifo simple version pretty much). I could do this in the kernel or userspace but it would probably be faster in the kernel.

* Fencing - Each decode cmd sequence can emit a fence in a similar fashion to the 3d fifo. So, you set the fence sequence number after a set of cmds. You then check a register to see when the hw is done with a set of cmds. I just don't see an easy of implementing this since the current fence mechanism only works for the 3d fifo.

Jimmy Rentz

A message that is not in the archive (sent off-list or not yet received): 20100112220256.18149b3e-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/[email protected]

#2 lore raw
Quoted 10 lines · Jimmy Rentz

Hello,

I have been working on a kernel and a user layer for the nv40 mpeg2 video decoding hardware:
* The decode hw accepts commands written to a fifo along with a set of registers for firing (put) and queries (get).
* The fifo can be mapped in vram or agp (though, agp isn't working right now).
* The fifo does not support dma jumps and such like the 3d fifo.

Well, I have some questions about how to implement this in nouveau:

* Mapping decode fifo in user-space versus kernel-space - My current version has the fifo being mapped from the kernel (I copied the 3d fifo simple version pretty much).  I could do this in the kernel or userspace but it would probably be faster in the kernel.

If it's faster in kernel that would probably be best.

Quoted 1 line

* Fencing - Each decode cmd sequence can emit a fence in a similar fashion to the 3d fifo.  So, you set the fence sequence number after a set of cmds.  You then check a register to see when the hw is done with a set of cmds.  I just don't see an easy of implementing this since the current fence mechanism only works for the 3d fifo.

We don't do anything for userspace fencing anymore so whatever you do in the kernel doesn't need to reach gallium yet. It can always be cleaned up later. Although I forgot to ask, how does the blob handle XvMCPutSurface? If it uses pfifo/pgraph to do CSC we would need the fencing to be accessible in gallium to coordinate that.