[PATCH 0/3] staging: comedi: adl_pci9118: some dma transfer changes

From: Ian Abbott
Date: Thu Nov 27 2014 - 06:38:23 EST


For streaming acquisition on the analog input subdevice, this driver
normally uses DMA double buffering into two internal DMA buffers, so it
can switch buffers early after a DMA transfer has completed, while it
processes the completed DMA buffer.

PATCH 1 is just a bit of tidy up.

PATCH 2 avoids switching the DMA double buffer at the end of
acquisition. For DMA single buffering, it avoids restarting the DMA
transfer if acquisition has ended normally or due to a comedi buffer
overflow error. (However, for double buffering, the DMA transfer has
already been started on the other DMA buffer and will be stopped soon
after.)

PATCH 3 eliminates a possible defragmentation step in the DMA buffer
contents before they are transferred to the comedi buffer. Instead, the
DMA buffer fragments are copied directly to the comedi buffer, or is
copied all in one go if the data is not fragmented.

This work is in response to Hartley's "PATCH 4/4] staging: comedi:
adl_pci9118: switch DMA buffers after writing samples", dated Mon, 10
Nov 2014 1959:17 -0500, message ID
<1415667477-28403-5-git-send-email-hsweeten@xxxxxxxxxxxxxxxxxxx>, which
was not applied.

These patches are against Greg's "staging-testing" branch.

1) staging: comedi: adl_pci9118: simplify interrupt_pci9118_ai_dma() a
bit
2) staging: comedi: adl_pci9118: try and avoid unnecessary DMA restart
3) staging: comedi: adl_pci9118: eliminate DMA buffer defragmentation
step

drivers/staging/comedi/drivers/adl_pci9118.c | 157 +++++++++++++++++++++------
1 file changed, 121 insertions(+), 36 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/