aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2010-10-19 20:32:11 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 11:45:28 -0400
commit024fafbac36b176d978ccd0fb1cae1fbc38c7fee (patch)
tree02b52bf8c6104ab4a8f7bcdf87741aee4b219f3b /drivers/video
parentdc4589c814a3a50a4cfc2077690fc7fd397308c8 (diff)
[media] Add the via framebuffer camera controller driver
Add a driver for the video capture port on VIA integrated chipsets. This version has a remaining OLPCism or two and expects to be talking to an ov7670; those can be improved as the need arises. This work was supported by the One Laptop Per Child project. Thanks to Laurent Pinchart for a number of useful comments. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/via/accel.c2
-rw-r--r--drivers/video/via/via-core.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c
index e44893ea590d..04bec058569c 100644
--- a/drivers/video/via/accel.c
+++ b/drivers/video/via/accel.c
@@ -370,7 +370,7 @@ int viafb_init_engine(struct fb_info *info)
370 viapar->shared->vq_vram_addr = viapar->fbmem_free; 370 viapar->shared->vq_vram_addr = viapar->fbmem_free;
371 viapar->fbmem_used += VQ_SIZE; 371 viapar->fbmem_used += VQ_SIZE;
372 372
373#if defined(CONFIG_FB_VIA_CAMERA) || defined(CONFIG_FB_VIA_CAMERA_MODULE) 373#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE)
374 /* 374 /*
375 * Set aside a chunk of framebuffer memory for the camera 375 * Set aside a chunk of framebuffer memory for the camera
376 * driver. Someday this driver probably needs a proper allocator 376 * driver. Someday this driver probably needs a proper allocator
diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c
index 66f403033111..27d7260d4f50 100644
--- a/drivers/video/via/via-core.c
+++ b/drivers/video/via/via-core.c
@@ -95,6 +95,13 @@ EXPORT_SYMBOL_GPL(viafb_irq_disable);
95 95
96/* ---------------------------------------------------------------------- */ 96/* ---------------------------------------------------------------------- */
97/* 97/*
98 * Currently, the camera driver is the only user of the DMA code, so we
99 * only compile it in if the camera driver is being built. Chances are,
100 * most viafb systems will not need to have this extra code for a while.
101 * As soon as another user comes long, the ifdef can be removed.
102 */
103#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE)
104/*
98 * Access to the DMA engine. This currently provides what the camera 105 * Access to the DMA engine. This currently provides what the camera
99 * driver needs (i.e. outgoing only) but is easily expandable if need 106 * driver needs (i.e. outgoing only) but is easily expandable if need
100 * be. 107 * be.
@@ -322,7 +329,7 @@ int viafb_dma_copy_out_sg(unsigned int offset, struct scatterlist *sg, int nsg)
322 return 0; 329 return 0;
323} 330}
324EXPORT_SYMBOL_GPL(viafb_dma_copy_out_sg); 331EXPORT_SYMBOL_GPL(viafb_dma_copy_out_sg);
325 332#endif /* CONFIG_VIDEO_VIA_CAMERA */
326 333
327/* ---------------------------------------------------------------------- */ 334/* ---------------------------------------------------------------------- */
328/* 335/*
@@ -507,7 +514,12 @@ static struct viafb_subdev_info {
507 }, 514 },
508 { 515 {
509 .name = "viafb-i2c", 516 .name = "viafb-i2c",
510 } 517 },
518#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE)
519 {
520 .name = "viafb-camera",
521 },
522#endif
511}; 523};
512#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) 524#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs)
513 525