/* We're given the Video Interrupt status register. * The cx23885_video_irq() func has already validated * the potential error bits, we just need to * deal with vbi payload and return indication if * we actually processed any payload.
*/ int cx23885_vbi_irq(struct cx23885_dev *dev, u32 status)
{
u32 count; int handled = 0;
/* * The risc program for each buffer works as follows: it starts with a simple * 'JUMP to addr + 12', which is effectively a NOP. Then the code to DMA the * buffer follows and at the end we have a JUMP back to the start + 12 (skipping * the initial JUMP). * * This is the risc program of the first buffer to be queued if the active list * is empty and it just keeps DMAing this buffer without generating any * interrupts. * * If a new buffer is added then the initial JUMP in the code for that buffer * will generate an interrupt which signals that the previous buffer has been * DMAed successfully and that it can be returned to userspace. * * It also sets the final jump of the previous buffer to the start of the new * buffer, thus chaining the new buffer into the DMA chain. This is a single * atomic u32 write, so there is no race condition. * * The end-result of all this that you only get an interrupt when a buffer * is ready, so the control flow is very easy.
*/ staticvoid buffer_queue(struct vb2_buffer *vb)
{ struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct cx23885_dev *dev = vb->vb2_queue->drv_priv; struct cx23885_buffer *buf = container_of(vbuf, struct cx23885_buffer, vb); struct cx23885_buffer *prev; struct cx23885_dmaqueue *q = &dev->vbiq; unsignedlong flags;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.