summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx18/cx18-queue.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-05 00:49:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-11 08:11:33 -0200
commit1d6782bda5c1fb2bca44af50647b45427d8ef4ec (patch)
tree11cc68f4410ca4850ff3d874900f628ed9326064 /drivers/media/video/cx18/cx18-queue.c
parentc9ff1b689a5d605640f098afc37d6102ecef9876 (diff)
V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to work_queue
cx18: Move DVB buffer transfer handling from irq handler to work_queue thread. In order to properly lock the epu2cpu mailbox for driver to CX23418 commands, the DVB/TS buffer handling needs to be moved from the IRQ handler and IRQ context to a work queue. This work_queue implmentation is strikingly similar to the ivtv implementation - for better or worse. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-queue.c')
-rw-r--r--drivers/media/video/cx18/cx18-queue.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c
index a33ba04a2686..174682c2582f 100644
--- a/drivers/media/video/cx18/cx18-queue.c
+++ b/drivers/media/video/cx18/cx18-queue.c
@@ -88,15 +88,13 @@ struct cx18_buffer *cx18_queue_get_buf_irq(struct cx18_stream *s, u32 id,
if (buf->id != id)
continue;
+
buf->bytesused = bytesused;
- /* the transport buffers are handled differently,
- they are not moved to the full queue */
- if (s->type != CX18_ENC_STREAM_TYPE_TS) {
- atomic_dec(&s->q_free.buffers);
- atomic_inc(&s->q_full.buffers);
- s->q_full.bytesused += buf->bytesused;
- list_move_tail(&buf->list, &s->q_full.list);
- }
+ atomic_dec(&s->q_free.buffers);
+ atomic_inc(&s->q_full.buffers);
+ s->q_full.bytesused += buf->bytesused;
+ list_move_tail(&buf->list, &s->q_full.list);
+
spin_unlock(&s->qlock);
return buf;
}