aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-driver.h
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-15 23:38:19 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:07 -0500
commitee2d64f5ccc71b5c5191e92ea91a12b65f9ca060 (patch)
tree0f01253a1e517f9c1f705901d873ca25bb2c872f /drivers/media/video/cx18/cx18-driver.h
parentba38ee8ebe4a42ce2213802152b0b86a95dc109f (diff)
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 ce76806759ec..5ebf84b78ca8 100644
--- a/drivers/media/video/cx18/cx18-driver.h
+++ b/drivers/media/video/cx18/cx18-driver.h
@@ -203,8 +203,6 @@ struct cx18_options {
203#define CX18_F_I_EOS 4 /* End of encoder stream */ 203#define CX18_F_I_EOS 4 /* End of encoder stream */
204#define CX18_F_I_RADIO_USER 5 /* radio tuner is selected */ 204#define CX18_F_I_RADIO_USER 5 /* radio tuner is selected */
205#define CX18_F_I_ENC_PAUSED 13 /* the encoder is paused */ 205#define CX18_F_I_ENC_PAUSED 13 /* the encoder is paused */
206#define CX18_F_I_HAVE_WORK 15 /* there is work to be done */
207#define CX18_F_I_WORK_HANDLER_DVB 18 /* work to be done for DVB */
208#define CX18_F_I_INITED 21 /* set after first open */ 206#define CX18_F_I_INITED 21 /* set after first open */
209#define CX18_F_I_FAILED 22 /* set if first open failed */ 207#define CX18_F_I_FAILED 22 /* set if first open failed */
210 208
@@ -247,6 +245,19 @@ struct cx18_dvb {
247struct cx18; /* forward reference */ 245struct cx18; /* forward reference */
248struct cx18_scb; /* forward reference */ 246struct cx18_scb; /* forward reference */
249 247
248#define CX18_MAX_MDL_ACKS 2
249#define CX18_MAX_EPU_WORK_ORDERS 70 /* CPU_DE_RELEASE_MDL bursts 63 commands */
250
251struct cx18_epu_work_order {
252 struct work_struct work;
253 atomic_t pending;
254 struct cx18 *cx;
255 int rpu;
256 struct cx18_mailbox mb;
257 struct cx18_mdl_ack mdl_ack[CX18_MAX_MDL_ACKS];
258 char *str;
259};
260
250#define CX18_INVALID_TASK_HANDLE 0xffffffff 261#define CX18_INVALID_TASK_HANDLE 0xffffffff
251 262
252struct cx18_stream { 263struct cx18_stream {
@@ -388,7 +399,6 @@ struct cx18 {
388 struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/ 399 struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/
389 struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/ 400 struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/
390 401
391
392 struct cx18_av_state av_state; 402 struct cx18_av_state av_state;
393 403
394 /* codec settings */ 404 /* codec settings */
@@ -441,7 +451,8 @@ struct cx18 {
441 /* when the current DMA is finished this queue is woken up */ 451 /* when the current DMA is finished this queue is woken up */
442 wait_queue_head_t dma_waitq; 452 wait_queue_head_t dma_waitq;
443 453
444 struct work_struct work; 454 struct cx18_epu_work_order epu_work_order[CX18_MAX_EPU_WORK_ORDERS];
455 char epu_debug_str[256]; /* CX18_EPU_DEBUG is rare: use shared space */
445 456
446 /* i2c */ 457 /* i2c */
447 struct i2c_adapter i2c_adap[2]; 458 struct i2c_adapter i2c_adap[2];