Skip to contentSkip to conversation

Refactor Mantis DMA transfer to deliver 16Kb TS data per interrupt

PATCH New Marko Ristola 1 participant 1 message Aug 7, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Refactor Mantis DMA transfer to deliver 16Kb TS data per interrupt

This patch obsoletes patch with broken spaces
https://patchwork.kernel.org/patch/107036/

With VDR streaming HDTV into network, generating an interrupt once per 16kb, implemented in this patch, seems to support more robust throughput with HDTV.

Fix leaking almost 64kb data from the previous TS after changing the TS. One effect of the old version was, that the DMA transfer and driver's DMA buffer access might happen at the same time - a race condition.

Regards,
Marko Ristola

drivers/media/dvb/mantis/hopper_cards.c +1 -1
index 09e9fc7..3b7e376 100644
@@ -126,7 +126,7 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
 	}
 	if (stat & MANTIS_INT_RISCI) {
 		dprintk(MANTIS_DEBUG, 0, "<%s>", label[8]);
-		mantis->finished_block = (stat & MANTIS_INT_RISCSTAT) >> 28;
+		mantis->busy_block = (stat & MANTIS_INT_RISCSTAT) >> 28;
 		tasklet_schedule(&mantis->tasklet);
 	}
 	if (stat & MANTIS_INT_I2CDONE) {
drivers/media/dvb/mantis/mantis_cards.c +1 -1
index cf4b39f..8f048d5 100644
@@ -134,7 +134,7 @@ static irqreturn_t mantis_irq_handler(int irq, void *dev_id)
 	}
 	if (stat & MANTIS_INT_RISCI) {
 		dprintk(MANTIS_DEBUG, 0, "<%s>", label[8]);
-		mantis->finished_block = (stat & MANTIS_INT_RISCSTAT) >> 28;
+		mantis->busy_block = (stat & MANTIS_INT_RISCSTAT) >> 28;
 		tasklet_schedule(&mantis->tasklet);
 	}
 	if (stat & MANTIS_INT_I2CDONE) {
drivers/media/dvb/mantis/mantis_common.h +1 -4
index d0b645a..23b23b7 100644
@@ -122,11 +122,8 @@ struct mantis_pci {
 	unsigned int		num;
 
 	/*	RISC Core		*/
-	u32			finished_block;
+	u32			busy_block;
 	u32			last_block;
-	u32			line_bytes;
-	u32			line_count;
-	u32			risc_pos;
 	u8			*buf_cpu;
 	dma_addr_t		buf_dma;
 	u32			*risc_cpu;
drivers/media/dvb/mantis/mantis_dma.c +35 -57

134 lines not on this page · raw message