From c2343663850d8931f75a7dfe4317c62732c6fce1 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 15 Nov 2008 23:38:19 -0500 Subject: cx18: Major rewrite of interrupt handling for incoming mailbox processing From: Andy Walls A major rewrite of interrupt handling for incoming mailbox processing, to split the timing critical steps from the the deferrable steps as the sending XPU on the CX23418 will time out and overwrite our incoming mailboxes rather quickly. Setup a pool of work "order forms" for the irq handler to send jobs to the new work handler routine which uses the kernel default work queue to do the deferrable work. Started optimizing some of the cx18-io calls as they are now the low hanging fruit for recoving microseconds back from the timeline. Future optimizations will get rid of mmio read retries, mmio stats logging, and combine smaller functions in the irq path into the larger ones to save ~2 us each. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-streams.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/cx18/cx18-streams.h') diff --git a/linux/drivers/media/video/cx18/cx18-streams.h b/linux/drivers/media/video/cx18/cx18-streams.h index f327e947b..3fd578d0e 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.h +++ b/linux/drivers/media/video/cx18/cx18-streams.h @@ -22,6 +22,7 @@ */ u32 cx18_find_handle(struct cx18 *cx); +struct cx18_stream *cx18_handle_to_stream(struct cx18 *cx, u32 handle); int cx18_streams_setup(struct cx18 *cx); int cx18_streams_register(struct cx18 *cx); void cx18_streams_cleanup(struct cx18 *cx, int unregister); -- cgit v1.2.3 From 7dacf773190ee5feda4783ac5106b4c7ad031ffb Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Fri, 21 Nov 2008 23:37:34 -0500 Subject: cx18: Copyright attribution update for files modified by awalls From: Andy Walls Add copyright attribution for files modified by awalls in 2008 Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-streams.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/cx18/cx18-streams.h') diff --git a/linux/drivers/media/video/cx18/cx18-streams.h b/linux/drivers/media/video/cx18/cx18-streams.h index 3fd578d0e..7218b1504 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.h +++ b/linux/drivers/media/video/cx18/cx18-streams.h @@ -4,6 +4,7 @@ * Derived from ivtv-streams.h * * Copyright (C) 2007 Hans Verkuil + * Copyright (C) 2008 Andy Walls * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- cgit v1.2.3 From b358f380079ca3db20d7409c3d39c2f5e80f871c Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Mon, 8 Dec 2008 21:02:45 -0500 Subject: cx18: Allow more than 63 capture buffers in rotation per stream From: Andy Walls cx18: Allow more than 63 capture buffers in rotation per stream. Implement q_busy to hold buffers the firmware has for use. q_free holds truly unused buffers in a pool. New buffers are given to the firmware as soon as the firmware returns one, if there are any to give to the firmware. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-streams.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux/drivers/media/video/cx18/cx18-streams.h') diff --git a/linux/drivers/media/video/cx18/cx18-streams.h b/linux/drivers/media/video/cx18/cx18-streams.h index 7218b1504..635d34b75 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.h +++ b/linux/drivers/media/video/cx18/cx18-streams.h @@ -29,6 +29,9 @@ int cx18_streams_register(struct cx18 *cx); void cx18_streams_cleanup(struct cx18 *cx, int unregister); /* Capture related */ +void cx18_stream_load_fw_queue_nolock(struct cx18_stream *s); +struct cx18_queue *cx18_stream_put_buf_fw(struct cx18_stream *s, + struct cx18_buffer *buf); int cx18_start_v4l2_encode_stream(struct cx18_stream *s); int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end); -- cgit v1.2.3 From a00ab36aaa26baf7d88c5763300d06dc47327148 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Fri, 12 Dec 2008 13:50:27 -0500 Subject: cx18: Avoid making firmware API calls with the queue lock held From: Andy Walls cx18: Avoid making firmware API calls with the queue lock held. The source of MPEG strem corruption when not holding the queue lock was found to be that the MPEG buffer could be retrieved by the user app before it was sync'ed for the host cpu. Incoming buffers are now sync'ed before being put on q_full and releasing the queue lock. We can thus avoid the sometimes lengthy call to the firmware for CPU_DE_SET_MDL while holding the queue lock, so we can get better performance. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-streams.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx18/cx18-streams.h') diff --git a/linux/drivers/media/video/cx18/cx18-streams.h b/linux/drivers/media/video/cx18/cx18-streams.h index 635d34b75..420e0a172 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.h +++ b/linux/drivers/media/video/cx18/cx18-streams.h @@ -29,7 +29,7 @@ int cx18_streams_register(struct cx18 *cx); void cx18_streams_cleanup(struct cx18 *cx, int unregister); /* Capture related */ -void cx18_stream_load_fw_queue_nolock(struct cx18_stream *s); +void cx18_stream_load_fw_queue(struct cx18_stream *s); struct cx18_queue *cx18_stream_put_buf_fw(struct cx18_stream *s, struct cx18_buffer *buf); int cx18_start_v4l2_encode_stream(struct cx18_stream *s); -- cgit v1.2.3