Skip to content

Commit

Permalink
[media] marvell-cam: implement contiguous DMA operation
Browse files Browse the repository at this point in the history
The core driver can now operate in either vmalloc or dma-contig modes;
obviously the latter is preferable when it is supported.  Default is
currently vmalloc on all platforms; load the module with buffer_mode=1 for
contiguous DMA mode.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 6c895d5 commit a9b36e8
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 54 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/marvell-ccic/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ config VIDEO_MMP_CAMERA
select VIDEO_OV7670
select I2C_GPIO
select VIDEOBUF2_VMALLOC
select VIDEOBUF2_DMA_CONTIG
---help---
This is a Video4Linux2 driver for the integrated camera
controller found on Marvell Armada 610 application
Expand Down
6 changes: 6 additions & 0 deletions drivers/media/video/marvell-ccic/cafe-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,12 @@ static int cafe_pci_probe(struct pci_dev *pdev,
*/
mcam->clock_speed = 45;
mcam->use_smbus = 1;
/*
* Vmalloc mode for buffers is traditional with this driver.
* We *might* be able to run DMA_contig, especially on a system
* with CMA in it.
*/
mcam->buffer_mode = B_vmalloc;
/*
* Get set up on the PCI bus.
*/
Expand Down
Loading

0 comments on commit a9b36e8

Please sign in to comment.