aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-driver.h
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-16 01:38:19 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 09:38:07 -0200
commitee2d64f5ccc71b5c5191e92ea91a12b65f9ca060 (patch)
tree0f01253a1e517f9c1f705901d873ca25bb2c872f /drivers/media/video/cx18/cx18-driver.h
parentba38ee8ebe4a42ce2213802152b0b86a95dc109f (diff)
downloadkernel_samsung_smdk4412-ee2d64f5ccc71b5c5191e92ea91a12b65f9ca060.zip
kernel_samsung_smdk4412-ee2d64f5ccc71b5c5191e92ea91a12b65f9ca060.tar.gz
kernel_samsung_smdk4412-ee2d64f5ccc71b5c5191e92ea91a12b65f9ca060.tar.bz2
V4L/DVB (9720): cx18: Major rewrite of interrupt handling for incoming mailbox processing
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. 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-driver.h')
-rw-r--r--drivers/media/video/cx18/cx18-driver.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h
index ce76806..5ebf84b 100644
--- a/drivers/media/video/cx18/cx18-driver.h
+++ b/drivers/media/video/cx18/cx18-driver.h
@@ -203,8 +203,6 @@ struct cx18_options {
#define CX18_F_I_EOS 4 /* End of encoder stream */
#define CX18_F_I_RADIO_USER 5 /* radio tuner is selected */
#define CX18_F_I_ENC_PAUSED 13 /* the encoder is paused */
-#define CX18_F_I_HAVE_WORK 15 /* there is work to be done */
-#define CX18_F_I_WORK_HANDLER_DVB 18 /* work to be done for DVB */
#define CX18_F_I_INITED 21 /* set after first open */
#define CX18_F_I_FAILED 22 /* set if first open failed */
@@ -247,6 +245,19 @@ struct cx18_dvb {
struct cx18; /* forward reference */
struct cx18_scb; /* forward reference */
+#define CX18_MAX_MDL_ACKS 2
+#define CX18_MAX_EPU_WORK_ORDERS 70 /* CPU_DE_RELEASE_MDL bursts 63 commands */
+
+struct cx18_epu_work_order {
+ struct work_struct work;
+ atomic_t pending;
+ struct cx18 *cx;
+ int rpu;
+ struct cx18_mailbox mb;
+ struct cx18_mdl_ack mdl_ack[CX18_MAX_MDL_ACKS];
+ char *str;
+};
+
#define CX18_INVALID_TASK_HANDLE 0xffffffff
struct cx18_stream {
@@ -388,7 +399,6 @@ struct cx18 {
struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/
struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/
-
struct cx18_av_state av_state;
/* codec settings */
@@ -441,7 +451,8 @@ struct cx18 {
/* when the current DMA is finished this queue is woken up */
wait_queue_head_t dma_waitq;
- struct work_struct work;
+ struct cx18_epu_work_order epu_work_order[CX18_MAX_EPU_WORK_ORDERS];
+ char epu_debug_str[256]; /* CX18_EPU_DEBUG is rare: use shared space */
/* i2c */
struct i2c_adapter i2c_adap[2];