* [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3
@ 2008-07-14 12:02 Magnus Damm
2008-07-14 12:02 ` [PATCH 01/06] soc_camera: Move spinlocks Magnus Damm
` (6 more replies)
0 siblings, 7 replies; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
This is V3 of the SuperH Mobile CEU interface patches.
[PATCH 01/06] soc_camera: Move spinlocks
[PATCH 02/06] soc_camera: Add 16-bit bus width support
[PATCH 03/06] videobuf: Fix gather spelling
[PATCH 04/06] videobuf: Add physically contiguous queue code V3
[PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
[PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver
Changes since V2:
- use dma_handle for physical address for videobuf-dma-contig
- spell gather correctly
- remove SUPERH Kconfig dependency
- move sh_mobile_ceu.h to include/media
- add board callback support with enable_camera()/disable_camera()
- add support for declare_coherent_memory
- rework video memory limit
- more verbose error messages
- add soc_camera_platform driver for simple camera devices
Changes since V1:
- dropped former V1 patches [01/07]->[04/07]
- rebased on top of [PATCH] soc_camera: make videobuf independent
- rewrote spinlock changes into the new [01/04] patch
- updated the videobuf-dma-contig code with feeback from Paulius Zaleckas
- fixed the CEU driver to work with the newly updated patches
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/Kconfig | 19
drivers/media/video/Makefile | 3
drivers/media/video/pxa_camera.c | 17
drivers/media/video/sh_mobile_ceu_camera.c | 657 ++++++++++++++++++++++++++++
drivers/media/video/soc_camera.c | 39 -
drivers/media/video/soc_camera_platform.c | 198 ++++++++
drivers/media/video/videobuf-dma-contig.c | 417 +++++++++++++++++
drivers/media/video/videobuf-dma-sg.c | 2
drivers/media/video/videobuf-vmalloc.c | 2
include/media/sh_mobile_ceu.h | 12
include/media/soc_camera.h | 12
include/media/soc_camera_platform.h | 15
include/media/videobuf-dma-contig.h | 32 +
include/media/videobuf-dma-sg.h | 2
include/media/videobuf-vmalloc.h | 2
15 files changed, 1368 insertions(+), 61 deletions(-)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 01/06] soc_camera: Move spinlocks
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-14 12:31 ` Guennadi Liakhovetski
2008-07-14 12:02 ` [PATCH 02/06] soc_camera: Add 16-bit bus width support Magnus Damm
` (5 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
This patch moves the spinlock handling from soc_camera.c to the actual
camera host driver. The spinlock alloc/free callbacks are replaced with
code in init_videobuf().
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/pxa_camera.c | 17 ++++------------
drivers/media/video/soc_camera.c | 39 --------------------------------------
include/media/soc_camera.h | 5 ----
3 files changed, 7 insertions(+), 54 deletions(-)
--- 0002/drivers/media/video/pxa_camera.c
+++ work/drivers/media/video/pxa_camera.c 2008-07-04 17:24:53.000000000 +0900
@@ -583,12 +583,15 @@ static struct videobuf_queue_ops pxa_vid
.buf_release = pxa_videobuf_release,
};
-static void pxa_camera_init_videobuf(struct videobuf_queue *q, spinlock_t *lock,
+static void pxa_camera_init_videobuf(struct videobuf_queue *q,
struct soc_camera_device *icd)
{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct pxa_camera_dev *pcdev = ici->priv;
+
/* We must pass NULL as dev pointer, then all pci_* dma operations
* transform to normal dma_* ones. */
- videobuf_queue_sg_init(q, &pxa_videobuf_ops, NULL, lock,
+ videobuf_queue_sg_init(q, &pxa_videobuf_ops, NULL, &pcdev->lock,
V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
sizeof(struct pxa_buffer), icd);
}
@@ -994,15 +997,6 @@ static int pxa_camera_querycap(struct so
return 0;
}
-static spinlock_t *pxa_camera_spinlock_alloc(struct soc_camera_file *icf)
-{
- struct soc_camera_host *ici =
- to_soc_camera_host(icf->icd->dev.parent);
- struct pxa_camera_dev *pcdev = ici->priv;
-
- return &pcdev->lock;
-}
-
static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
.owner = THIS_MODULE,
.add = pxa_camera_add_device,
@@ -1015,7 +1009,6 @@ static struct soc_camera_host_ops pxa_so
.querycap = pxa_camera_querycap,
.try_bus_param = pxa_camera_try_bus_param,
.set_bus_param = pxa_camera_set_bus_param,
- .spinlock_alloc = pxa_camera_spinlock_alloc,
};
/* Should be allocated dynamically too, but we have only one. */
--- 0002/drivers/media/video/soc_camera.c
+++ work/drivers/media/video/soc_camera.c 2008-07-04 17:24:53.000000000 +0900
@@ -183,7 +183,6 @@ static int soc_camera_open(struct inode
struct soc_camera_device *icd;
struct soc_camera_host *ici;
struct soc_camera_file *icf;
- spinlock_t *lock;
int ret;
icf = vmalloc(sizeof(*icf));
@@ -210,13 +209,6 @@ static int soc_camera_open(struct inode
}
icf->icd = icd;
-
- icf->lock = ici->ops->spinlock_alloc(icf);
- if (!icf->lock) {
- ret = -ENOMEM;
- goto esla;
- }
-
icd->use_count++;
/* Now we really have to activate the camera */
@@ -234,17 +226,12 @@ static int soc_camera_open(struct inode
file->private_data = icf;
dev_dbg(&icd->dev, "camera device open\n");
- ici->ops->init_videobuf(&icf->vb_vidq, icf->lock, icd);
+ ici->ops->init_videobuf(&icf->vb_vidq, icd);
return 0;
/* All errors are entered with the video_lock held */
eiciadd:
- lock = icf->lock;
- icf->lock = NULL;
- if (ici->ops->spinlock_free)
- ici->ops->spinlock_free(lock);
-esla:
module_put(ici->ops->owner);
emgi:
module_put(icd->ops->owner);
@@ -260,15 +247,11 @@ static int soc_camera_close(struct inode
struct soc_camera_device *icd = icf->icd;
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct video_device *vdev = icd->vdev;
- spinlock_t *lock = icf->lock;
mutex_lock(&video_lock);
icd->use_count--;
if (!icd->use_count)
ici->ops->remove(icd);
- icf->lock = NULL;
- if (ici->ops->spinlock_free)
- ici->ops->spinlock_free(lock);
module_put(icd->ops->owner);
module_put(ici->ops->owner);
mutex_unlock(&video_lock);
@@ -764,21 +747,6 @@ static void dummy_release(struct device
{
}
-static spinlock_t *spinlock_alloc(struct soc_camera_file *icf)
-{
- spinlock_t *lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL);
-
- if (lock)
- spin_lock_init(lock);
-
- return lock;
-}
-
-static void spinlock_free(spinlock_t *lock)
-{
- kfree(lock);
-}
-
int soc_camera_host_register(struct soc_camera_host *ici)
{
int ret;
@@ -808,11 +776,6 @@ int soc_camera_host_register(struct soc_
if (ret)
goto edevr;
- if (!ici->ops->spinlock_alloc) {
- ici->ops->spinlock_alloc = spinlock_alloc;
- ici->ops->spinlock_free = spinlock_free;
- }
-
scan_add_host(ici);
return 0;
--- 0002/include/media/soc_camera.h
+++ work/include/media/soc_camera.h 2008-07-04 18:06:00.000000000 +0900
@@ -48,7 +48,6 @@ struct soc_camera_device {
struct soc_camera_file {
struct soc_camera_device *icd;
struct videobuf_queue vb_vidq;
- spinlock_t *lock;
};
struct soc_camera_host {
@@ -67,15 +66,13 @@ struct soc_camera_host_ops {
int (*set_fmt_cap)(struct soc_camera_device *, __u32,
struct v4l2_rect *);
int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
- void (*init_videobuf)(struct videobuf_queue*, spinlock_t *,
+ void (*init_videobuf)(struct videobuf_queue *,
struct soc_camera_device *);
int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
int (*try_bus_param)(struct soc_camera_device *, __u32);
int (*set_bus_param)(struct soc_camera_device *, __u32);
unsigned int (*poll)(struct file *, poll_table *);
- spinlock_t* (*spinlock_alloc)(struct soc_camera_file *);
- void (*spinlock_free)(spinlock_t *);
};
struct soc_camera_link {
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 02/06] soc_camera: Add 16-bit bus width support
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
2008-07-14 12:02 ` [PATCH 01/06] soc_camera: Move spinlocks Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-14 12:02 ` [PATCH 03/06] videobuf: Fix gather spelling Magnus Damm
` (4 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
The SuperH Mobile CEU hardware supports 16-bit width bus,
so extend the soc_camera code with SOCAM_DATAWIDTH_16.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
include/media/soc_camera.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- 0008/include/media/soc_camera.h
+++ work/include/media/soc_camera.h 2008-07-01 14:38:34.000000000 +0900
@@ -153,11 +153,12 @@ static inline struct v4l2_queryctrl cons
#define SOCAM_DATAWIDTH_8 (1 << 6)
#define SOCAM_DATAWIDTH_9 (1 << 7)
#define SOCAM_DATAWIDTH_10 (1 << 8)
-#define SOCAM_PCLK_SAMPLE_RISING (1 << 9)
-#define SOCAM_PCLK_SAMPLE_FALLING (1 << 10)
+#define SOCAM_DATAWIDTH_16 (1 << 9)
+#define SOCAM_PCLK_SAMPLE_RISING (1 << 10)
+#define SOCAM_PCLK_SAMPLE_FALLING (1 << 11)
#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \
- SOCAM_DATAWIDTH_10)
+ SOCAM_DATAWIDTH_10 | SOCAM_DATAWIDTH_16)
static inline unsigned long soc_camera_bus_param_compatible(
unsigned long camera_flags, unsigned long bus_flags)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 03/06] videobuf: Fix gather spelling
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
2008-07-14 12:02 ` [PATCH 01/06] soc_camera: Move spinlocks Magnus Damm
2008-07-14 12:02 ` [PATCH 02/06] soc_camera: Add 16-bit bus width support Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-14 12:02 ` [PATCH 04/06] videobuf: Add physically contiguous queue code V3 Magnus Damm
` (3 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
Use "scatter gather" instead of "scatter gatter".
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/videobuf-dma-sg.c | 2 +-
drivers/media/video/videobuf-vmalloc.c | 2 +-
include/media/videobuf-dma-sg.h | 2 +-
include/media/videobuf-vmalloc.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--- 0001/drivers/media/video/videobuf-dma-sg.c
+++ work/drivers/media/video/videobuf-dma-sg.c 2008-07-14 14:33:01.000000000 +0900
@@ -1,7 +1,7 @@
/*
* helper functions for SG DMA video4linux capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.
--- 0001/drivers/media/video/videobuf-vmalloc.c
+++ work/drivers/media/video/videobuf-vmalloc.c 2008-07-14 14:32:50.000000000 +0900
@@ -1,7 +1,7 @@
/*
* helper functions for vmalloc video4linux capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.
--- 0001/include/media/videobuf-dma-sg.h
+++ work/include/media/videobuf-dma-sg.h 2008-07-14 14:33:15.000000000 +0900
@@ -1,7 +1,7 @@
/*
* helper functions for SG DMA video4linux capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.
--- 0001/include/media/videobuf-vmalloc.h
+++ work/include/media/videobuf-vmalloc.h 2008-07-14 14:33:22.000000000 +0900
@@ -1,7 +1,7 @@
/*
* helper functions for vmalloc capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 04/06] videobuf: Add physically contiguous queue code V3
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
` (2 preceding siblings ...)
2008-07-14 12:02 ` [PATCH 03/06] videobuf: Fix gather spelling Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-14 12:20 ` Paulius Zaleckas
2008-07-14 12:02 ` [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3 Magnus Damm
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
This is V3 of the physically contiguous videobuf queues patch.
Useful for hardware such as the SuperH Mobile CEU which doesn't
support scatter gatter bus mastering.
Since it may be difficult to allocate large chunks of physically
contiguous memory after some uptime due to fragmentation, this code
allocates memory using dma_alloc_coherent(). Architectures supporting
dma_declare_coherent_memory() can easily avoid fragmentation issues
by using dma_declare_coherent_memory() to force dma_alloc_coherent()
to allocate from a certain pre-allocated memory area.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
Changes since V2
- use dma_handle for physical address
- use "scatter gather" instead of "scatter gatter"
Changes since V1:
- use dev_err() instead of pr_err()
- remember size in struct videobuf_dma_contig_memory
- keep struct videobuf_dma_contig_memory in .c file
- let videobuf_to_dma_contig() return dma_addr_t
- implement __videobuf_sync()
- return statements, white space and other minor fixes
drivers/media/video/Kconfig | 5
drivers/media/video/Makefile | 1
drivers/media/video/videobuf-dma-contig.c | 417 +++++++++++++++++++++++++++++
include/media/videobuf-dma-contig.h | 32 ++
4 files changed, 455 insertions(+)
--- 0006/drivers/media/video/Kconfig
+++ work/drivers/media/video/Kconfig 2008-07-14 15:00:18.000000000 +0900
@@ -24,6 +24,11 @@ config VIDEOBUF_VMALLOC
select VIDEOBUF_GEN
tristate
+config VIDEOBUF_DMA_CONTIG
+ depends on HAS_DMA
+ select VIDEOBUF_GEN
+ tristate
+
config VIDEOBUF_DVB
tristate
select VIDEOBUF_GEN
--- 0001/drivers/media/video/Makefile
+++ work/drivers/media/video/Makefile 2008-07-14 15:00:18.000000000 +0900
@@ -88,6 +88,7 @@ obj-$(CONFIG_VIDEO_TUNER) += tuner.o
obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
+obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
obj-$(CONFIG_VIDEO_BTCX) += btcx-risc.o
--- /dev/null
+++ work/drivers/media/video/videobuf-dma-contig.c 2008-07-14 20:30:16.000000000 +0900
@@ -0,0 +1,417 @@
+/*
+ * helper functions for physically contiguous capture buffers
+ *
+ * The functions support hardware lacking scatter gather support
+ * (i.e. the buffers must be linear in physical memory)
+ *
+ * Copyright (c) 2008 Magnus Damm
+ *
+ * Based on videobuf-vmalloc.c,
+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/dma-mapping.h>
+#include <media/videobuf-dma-contig.h>
+
+struct videobuf_dma_contig_memory {
+ u32 magic;
+ void *vaddr;
+ dma_addr_t dma_handle;
+ unsigned long size;
+};
+
+#define MAGIC_DC_MEM 0x0733ac61
+#define MAGIC_CHECK(is, should) \
+ if (unlikely((is) != (should))) { \
+ pr_err("magic mismatch: %x expected %x\n", is, should); \
+ BUG(); \
+ }
+
+static void
+videobuf_vm_open(struct vm_area_struct *vma)
+{
+ struct videobuf_mapping *map = vma->vm_private_data;
+
+ dev_dbg(map->q->dev, "vm_open %p [count=%u,vma=%08lx-%08lx]\n",
+ map, map->count, vma->vm_start, vma->vm_end);
+
+ map->count++;
+}
+
+static void videobuf_vm_close(struct vm_area_struct *vma)
+{
+ struct videobuf_mapping *map = vma->vm_private_data;
+ struct videobuf_queue *q = map->q;
+ int i;
+
+ dev_dbg(map->q->dev, "vm_close %p [count=%u,vma=%08lx-%08lx]\n",
+ map, map->count, vma->vm_start, vma->vm_end);
+
+ map->count--;
+ if (0 == map->count) {
+ struct videobuf_dma_contig_memory *mem;
+
+ dev_dbg(map->q->dev, "munmap %p q=%p\n", map, q);
+ mutex_lock(&q->vb_lock);
+
+ /* We need first to cancel streams, before unmapping */
+ if (q->streaming)
+ videobuf_queue_cancel(q);
+
+ for (i = 0; i < VIDEO_MAX_FRAME; i++) {
+ if (NULL == q->bufs[i])
+ continue;
+
+ if (q->bufs[i]->map != map)
+ continue;
+
+ mem = q->bufs[i]->priv;
+ if (mem) {
+ /* This callback is called only if kernel has
+ allocated memory and this memory is mmapped.
+ In this case, memory should be freed,
+ in order to do memory unmap.
+ */
+
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ /* vfree is not atomic - can't be
+ called with IRQ's disabled
+ */
+ dev_dbg(map->q->dev, "buf[%d] freeing %p\n",
+ i, mem->vaddr);
+
+ dma_free_coherent(q->dev, mem->size,
+ mem->vaddr, mem->dma_handle);
+ mem->vaddr = NULL;
+ }
+
+ q->bufs[i]->map = NULL;
+ q->bufs[i]->baddr = 0;
+ }
+
+ kfree(map);
+
+ mutex_unlock(&q->vb_lock);
+ }
+}
+
+static struct vm_operations_struct videobuf_vm_ops = {
+ .open = videobuf_vm_open,
+ .close = videobuf_vm_close,
+};
+
+static void *__videobuf_alloc(size_t size)
+{
+ struct videobuf_dma_contig_memory *mem;
+ struct videobuf_buffer *vb;
+
+ vb = kzalloc(size + sizeof(*mem), GFP_KERNEL);
+ if (vb) {
+ mem = vb->priv = ((char *)vb) + size;
+ mem->magic = MAGIC_DC_MEM;
+ }
+
+ return vb;
+}
+
+static void *__videobuf_to_vmalloc(struct videobuf_buffer *buf)
+{
+ struct videobuf_dma_contig_memory *mem = buf->priv;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ return mem->vaddr;
+}
+
+static int __videobuf_iolock(struct videobuf_queue *q,
+ struct videobuf_buffer *vb,
+ struct v4l2_framebuffer *fbuf)
+{
+ struct videobuf_dma_contig_memory *mem = vb->priv;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ switch (vb->memory) {
+ case V4L2_MEMORY_MMAP:
+ dev_dbg(q->dev, "%s memory method MMAP\n", __func__);
+
+ /* All handling should be done by __videobuf_mmap_mapper() */
+ if (!mem->vaddr) {
+ dev_err(q->dev, "memory is not alloced/mmapped.\n");
+ return -EINVAL;
+ }
+ break;
+ case V4L2_MEMORY_USERPTR:
+ dev_dbg(q->dev, "%s memory method USERPTR\n", __func__);
+
+ /* The only USERPTR currently supported is the one needed for
+ read() method.
+ */
+ if (vb->baddr)
+ return -EINVAL;
+
+ mem->size = PAGE_ALIGN(vb->size);
+ mem->vaddr = dma_alloc_coherent(q->dev, mem->size,
+ &mem->dma_handle, GFP_KERNEL);
+ if (!mem->vaddr) {
+ dev_err(q->dev, "dma_alloc_coherent %ld failed\n",
+ mem->size);
+ return -ENOMEM;
+ }
+
+ dev_dbg(q->dev, "dma_alloc_coherent data is at %p (%ld)\n",
+ mem->vaddr, mem->size);
+ break;
+ case V4L2_MEMORY_OVERLAY:
+ default:
+ dev_dbg(q->dev, "%s memory method OVERLAY/unknown\n",
+ __func__);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int __videobuf_sync(struct videobuf_queue *q,
+ struct videobuf_buffer *buf)
+{
+ struct videobuf_dma_contig_memory *mem = buf->priv;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ dma_sync_single_for_cpu(q->dev, mem->dma_handle, mem->size,
+ DMA_FROM_DEVICE);
+ return 0;
+}
+
+static int __videobuf_mmap_free(struct videobuf_queue *q)
+{
+ unsigned int i;
+
+ dev_dbg(q->dev, "%s\n", __func__);
+ for (i = 0; i < VIDEO_MAX_FRAME; i++) {
+ if (q->bufs[i] && q->bufs[i]->map)
+ return -EBUSY;
+ }
+
+ return 0;
+}
+
+static int __videobuf_mmap_mapper(struct videobuf_queue *q,
+ struct vm_area_struct *vma)
+{
+ struct videobuf_dma_contig_memory *mem;
+ struct videobuf_mapping *map;
+ unsigned int first;
+ int retval;
+ unsigned long size, offset = vma->vm_pgoff << PAGE_SHIFT;
+
+ dev_dbg(q->dev, "%s\n", __func__);
+ if (!(vma->vm_flags & VM_WRITE) || !(vma->vm_flags & VM_SHARED))
+ return -EINVAL;
+
+ /* look for first buffer to map */
+ for (first = 0; first < VIDEO_MAX_FRAME; first++) {
+ if (!q->bufs[first])
+ continue;
+
+ if (V4L2_MEMORY_MMAP != q->bufs[first]->memory)
+ continue;
+ if (q->bufs[first]->boff == offset)
+ break;
+ }
+ if (VIDEO_MAX_FRAME == first) {
+ dev_dbg(q->dev, "invalid user space offset [offset=0x%lx]\n",
+ offset);
+ return -EINVAL;
+ }
+
+ /* create mapping + update buffer list */
+ map = kzalloc(sizeof(struct videobuf_mapping), GFP_KERNEL);
+ if (!map)
+ return -ENOMEM;
+
+ q->bufs[first]->map = map;
+ map->start = vma->vm_start;
+ map->end = vma->vm_end;
+ map->q = q;
+
+ q->bufs[first]->baddr = vma->vm_start;
+
+ mem = q->bufs[first]->priv;
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ mem->size = PAGE_ALIGN(q->bufs[first]->bsize);
+ mem->vaddr = dma_alloc_coherent(q->dev, mem->size,
+ &mem->dma_handle, GFP_KERNEL);
+ if (!mem->vaddr) {
+ dev_err(q->dev, "dma_alloc_coherent size %ld failed\n",
+ mem->size);
+ goto error;
+ }
+ dev_dbg(q->dev, "dma_alloc_coherent data is at addr %p (size %ld)\n",
+ mem->vaddr, mem->size);
+
+ /* Try to remap memory */
+
+ size = vma->vm_end - vma->vm_start;
+ size = (size < mem->size) ? size : mem->size;
+
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+ retval = remap_pfn_range(vma, vma->vm_start,
+ mem->dma_handle >> PAGE_SHIFT,
+ size, vma->vm_page_prot);
+ if (retval) {
+ dev_err(q->dev, "mmap: remap failed with error %d. ", retval);
+ dma_free_coherent(q->dev, mem->size,
+ mem->vaddr, mem->dma_handle);
+ goto error;
+ }
+
+ vma->vm_ops = &videobuf_vm_ops;
+ vma->vm_flags |= VM_DONTEXPAND;
+ vma->vm_private_data = map;
+
+ dev_dbg(q->dev, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n",
+ map, q, vma->vm_start, vma->vm_end,
+ (long int) q->bufs[first]->bsize,
+ vma->vm_pgoff, first);
+
+ videobuf_vm_open(vma);
+
+ return 0;
+
+error:
+ kfree(map);
+ return -ENOMEM;
+}
+
+static int __videobuf_copy_to_user(struct videobuf_queue *q,
+ char __user *data, size_t count,
+ int nonblocking)
+{
+ struct videobuf_dma_contig_memory *mem = q->read_buf->priv;
+ void *vaddr;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+ BUG_ON(!mem->vaddr);
+
+ /* copy to userspace */
+ if (count > q->read_buf->size - q->read_off)
+ count = q->read_buf->size - q->read_off;
+
+ vaddr = mem->vaddr;
+
+ if (copy_to_user(data, vaddr + q->read_off, count))
+ return -EFAULT;
+
+ return count;
+}
+
+static int __videobuf_copy_stream(struct videobuf_queue *q,
+ char __user *data, size_t count, size_t pos,
+ int vbihack, int nonblocking)
+{
+ unsigned int *fc;
+ struct videobuf_dma_contig_memory *mem = q->read_buf->priv;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ if (vbihack) {
+ /* dirty, undocumented hack -- pass the frame counter
+ * within the last four bytes of each vbi data block.
+ * We need that one to maintain backward compatibility
+ * to all vbi decoding software out there ... */
+ fc = (unsigned int *)mem->vaddr;
+ fc += (q->read_buf->size >> 2) - 1;
+ *fc = q->read_buf->field_count >> 1;
+ dev_dbg(q->dev, "vbihack: %d\n", *fc);
+ }
+
+ /* copy stuff using the common method */
+ count = __videobuf_copy_to_user(q, data, count, nonblocking);
+
+ if ((count == -EFAULT) && (pos == 0))
+ return -EFAULT;
+
+ return count;
+}
+
+static struct videobuf_qtype_ops qops = {
+ .magic = MAGIC_QTYPE_OPS,
+
+ .alloc = __videobuf_alloc,
+ .iolock = __videobuf_iolock,
+ .sync = __videobuf_sync,
+ .mmap_free = __videobuf_mmap_free,
+ .mmap_mapper = __videobuf_mmap_mapper,
+ .video_copy_to_user = __videobuf_copy_to_user,
+ .copy_stream = __videobuf_copy_stream,
+ .vmalloc = __videobuf_to_vmalloc,
+};
+
+void videobuf_queue_dma_contig_init(struct videobuf_queue *q,
+ struct videobuf_queue_ops *ops,
+ struct device *dev,
+ spinlock_t *irqlock,
+ enum v4l2_buf_type type,
+ enum v4l2_field field,
+ unsigned int msize,
+ void *priv)
+{
+ videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize,
+ priv, &qops);
+}
+EXPORT_SYMBOL_GPL(videobuf_queue_dma_contig_init);
+
+dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf)
+{
+ struct videobuf_dma_contig_memory *mem = buf->priv;
+
+ BUG_ON(!mem);
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ return mem->dma_handle;
+}
+EXPORT_SYMBOL_GPL(videobuf_to_dma_contig);
+
+void videobuf_dma_contig_free(struct videobuf_queue *q,
+ struct videobuf_buffer *buf)
+{
+ struct videobuf_dma_contig_memory *mem = buf->priv;
+
+ /* mmapped memory can't be freed here, otherwise mmapped region
+ would be released, while still needed. In this case, the memory
+ release should happen inside videobuf_vm_close().
+ So, it should free memory only if the memory were allocated for
+ read() operation.
+ */
+ if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
+ return;
+
+ if (!mem)
+ return;
+
+ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
+
+ dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle);
+ mem->vaddr = NULL;
+}
+EXPORT_SYMBOL_GPL(videobuf_dma_contig_free);
+
+MODULE_DESCRIPTION("helper module to manage video4linux dma contig buffers");
+MODULE_AUTHOR("Magnus Damm");
+MODULE_LICENSE("GPL");
--- /dev/null
+++ work/include/media/videobuf-dma-contig.h 2008-07-14 20:30:16.000000000 +0900
@@ -0,0 +1,32 @@
+/*
+ * helper functions for physically contiguous capture buffers
+ *
+ * The functions support hardware lacking scatter gather support
+ * (i.e. the buffers must be linear in physical memory)
+ *
+ * Copyright (c) 2008 Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2
+ */
+#ifndef _VIDEOBUF_DMA_CONTIG_H
+#define _VIDEOBUF_DMA_CONTIG_H
+
+#include <linux/dma-mapping.h>
+#include <media/videobuf-core.h>
+
+void videobuf_queue_dma_contig_init(struct videobuf_queue *q,
+ struct videobuf_queue_ops *ops,
+ struct device *dev,
+ spinlock_t *irqlock,
+ enum v4l2_buf_type type,
+ enum v4l2_field field,
+ unsigned int msize,
+ void *priv);
+
+dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf);
+void videobuf_dma_contig_free(struct videobuf_queue *q,
+ struct videobuf_buffer *buf);
+
+#endif /* _VIDEOBUF_DMA_CONTIG_H */
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
` (3 preceding siblings ...)
2008-07-14 12:02 ` [PATCH 04/06] videobuf: Add physically contiguous queue code V3 Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-18 7:39 ` Guennadi Liakhovetski
2008-07-14 12:02 ` [PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver Magnus Damm
2008-07-18 7:40 ` [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Guennadi Liakhovetski
6 siblings, 1 reply; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
This is V3 of the SuperH Mobile CEU soc_camera driver.
The CEU hardware block is configured in a transparent data fetch
mode, frames are captured from the attached camera and written to
physically contiguous memory buffers provided by the newly added
videobuf-dma-contig queue. Tested on sh7722 and sh7723 processors.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
Changes since V2:
- remove SUPERH Kconfig dependency
- move sh_mobile_ceu.h to include/media
- add board callback support with enable_camera()/disable_camera()
- add support for declare_coherent_memory
- rework video memory limit
- more verbose error messages
Changes since V1:
- fixed the CEU driver to work with the newly updated patches
drivers/media/video/Kconfig | 8
drivers/media/video/Makefile | 1
drivers/media/video/sh_mobile_ceu_camera.c | 657 ++++++++++++++++++++++++++++
include/media/sh_mobile_ceu.h | 12
4 files changed, 678 insertions(+)
--- 0010/drivers/media/video/Kconfig
+++ work/drivers/media/video/Kconfig 2008-07-14 20:38:17.000000000 +0900
@@ -958,4 +958,12 @@ config VIDEO_PXA27x
---help---
This is a v4l2 driver for the PXA27x Quick Capture Interface
+config VIDEO_SH_MOBILE_CEU
+ tristate "SuperH Mobile CEU Interface driver"
+ depends on VIDEO_DEV
+ select SOC_CAMERA
+ select VIDEOBUF_DMA_CONTIG
+ ---help---
+ This is a v4l2 driver for the SuperH Mobile CEU Interface
+
endif # VIDEO_CAPTURE_DRIVERS
--- 0010/drivers/media/video/Makefile
+++ work/drivers/media/video/Makefile 2008-07-14 20:31:08.000000000 +0900
@@ -131,6 +131,7 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
obj-$(CONFIG_VIDEO_CX23885) += cx23885/
obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
+obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o
obj-$(CONFIG_SOC_CAMERA) += soc_camera.o
obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o
--- /dev/null
+++ work/drivers/media/video/sh_mobile_ceu_camera.c 2008-07-14 20:31:08.000000000 +0900
@@ -0,0 +1,657 @@
+/*
+ * V4L2 Driver for SuperH Mobile CEU interface
+ *
+ * Copyright (C) 2008 Magnus Damm
+ *
+ * Based on V4L2 Driver for PXA camera host - "pxa_camera.c",
+ *
+ * Copyright (C) 2006, Sascha Hauer, Pengutronix
+ * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/moduleparam.h>
+#include <linux/time.h>
+#include <linux/version.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/mutex.h>
+#include <linux/videodev2.h>
+
+#include <media/v4l2-common.h>
+#include <media/v4l2-dev.h>
+#include <media/soc_camera.h>
+#include <media/sh_mobile_ceu.h>
+#include <media/videobuf-dma-contig.h>
+
+/* register offsets for sh7722 / sh7723 */
+
+#define CAPSR 0x00
+#define CAPCR 0x04
+#define CAMCR 0x08
+#define CMCYR 0x0c
+#define CAMOR 0x10
+#define CAPWR 0x14
+#define CAIFR 0x18
+#define CSTCR 0x20 /* not on sh7723 */
+#define CSECR 0x24 /* not on sh7723 */
+#define CRCNTR 0x28
+#define CRCMPR 0x2c
+#define CFLCR 0x30
+#define CFSZR 0x34
+#define CDWDR 0x38
+#define CDAYR 0x3c
+#define CDACR 0x40
+#define CDBYR 0x44
+#define CDBCR 0x48
+#define CBDSR 0x4c
+#define CFWCR 0x5c
+#define CLFCR 0x60
+#define CDOCR 0x64
+#define CDDCR 0x68
+#define CDDAR 0x6c
+#define CEIER 0x70
+#define CETCR 0x74
+#define CSTSR 0x7c
+#define CSRTR 0x80
+#define CDSSR 0x84
+#define CDAYR2 0x90
+#define CDACR2 0x94
+#define CDBYR2 0x98
+#define CDBCR2 0x9c
+
+static DEFINE_MUTEX(camera_lock);
+
+/* per video frame buffer */
+struct sh_mobile_ceu_buffer {
+ struct videobuf_buffer vb; /* v4l buffer must be first */
+ const struct soc_camera_data_format *fmt;
+};
+
+struct sh_mobile_ceu_dev {
+ struct device *dev;
+ struct soc_camera_host ici;
+ struct soc_camera_device *icd;
+
+ unsigned int irq;
+ void __iomem *base;
+ unsigned long video_limit;
+
+ spinlock_t lock;
+ struct list_head capture;
+ struct videobuf_buffer *active;
+
+ struct sh_mobile_ceu_info *pdata;
+};
+
+static void ceu_write(struct sh_mobile_ceu_dev *priv,
+ unsigned long reg_offs, unsigned long data)
+{
+ iowrite32(data, priv->base + reg_offs);
+}
+
+static unsigned long ceu_read(struct sh_mobile_ceu_dev *priv,
+ unsigned long reg_offs)
+{
+ return ioread32(priv->base + reg_offs);
+}
+
+/*
+ * Videobuf operations
+ */
+static int sh_mobile_ceu_videobuf_setup(struct videobuf_queue *vq,
+ unsigned int *count,
+ unsigned int *size)
+{
+ struct soc_camera_device *icd = vq->priv_data;
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+ int bytes_per_pixel = (icd->current_fmt->depth + 7) >> 3;
+
+ *size = PAGE_ALIGN(icd->width * icd->height * bytes_per_pixel);
+
+ if (0 == *count)
+ *count = 2;
+
+ if (pcdev->video_limit) {
+ while (*size * *count > pcdev->video_limit)
+ (*count)--;
+ }
+
+ dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size);
+
+ return 0;
+}
+
+static void free_buffer(struct videobuf_queue *vq,
+ struct sh_mobile_ceu_buffer *buf)
+{
+ struct soc_camera_device *icd = vq->priv_data;
+
+ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+ &buf->vb, buf->vb.baddr, buf->vb.bsize);
+
+ if (in_interrupt())
+ BUG();
+
+ videobuf_dma_contig_free(vq, &buf->vb);
+ dev_dbg(&icd->dev, "%s freed\n", __func__);
+ buf->vb.state = VIDEOBUF_NEEDS_INIT;
+}
+
+static void sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev)
+{
+ ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) & ~1);
+ ceu_write(pcdev, CETCR, ~ceu_read(pcdev, CETCR) & 0x0317f313);
+ ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) | 1);
+
+ ceu_write(pcdev, CAPCR, ceu_read(pcdev, CAPCR) & ~0x10000);
+
+ ceu_write(pcdev, CETCR, 0x0317f313 ^ 0x10);
+
+ if (pcdev->active) {
+ ceu_write(pcdev, CDAYR, videobuf_to_dma_contig(pcdev->active));
+ ceu_write(pcdev, CAPSR, 0x1); /* start capture */
+ }
+}
+
+static int sh_mobile_ceu_videobuf_prepare(struct videobuf_queue *vq,
+ struct videobuf_buffer *vb,
+ enum v4l2_field field)
+{
+ struct soc_camera_device *icd = vq->priv_data;
+ struct sh_mobile_ceu_buffer *buf;
+ int ret;
+
+ buf = container_of(vb, struct sh_mobile_ceu_buffer, vb);
+
+ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+ vb, vb->baddr, vb->bsize);
+
+ /* Added list head initialization on alloc */
+ WARN_ON(!list_empty(&vb->queue));
+
+#ifdef DEBUG
+ /* This can be useful if you want to see if we actually fill
+ * the buffer with something */
+ memset((void *)vb->baddr, 0xaa, vb->bsize);
+#endif
+
+ BUG_ON(NULL == icd->current_fmt);
+
+ if (buf->fmt != icd->current_fmt ||
+ vb->width != icd->width ||
+ vb->height != icd->height ||
+ vb->field != field) {
+ buf->fmt = icd->current_fmt;
+ vb->width = icd->width;
+ vb->height = icd->height;
+ vb->field = field;
+ vb->state = VIDEOBUF_NEEDS_INIT;
+ }
+
+ vb->size = vb->width * vb->height * ((buf->fmt->depth + 7) >> 3);
+ if (0 != vb->baddr && vb->bsize < vb->size) {
+ ret = -EINVAL;
+ goto out;
+ }
+
+ if (vb->state == VIDEOBUF_NEEDS_INIT) {
+ ret = videobuf_iolock(vq, vb, NULL);
+ if (ret)
+ goto fail;
+ vb->state = VIDEOBUF_PREPARED;
+ }
+
+ return 0;
+fail:
+ free_buffer(vq, buf);
+out:
+ return ret;
+}
+
+static void sh_mobile_ceu_videobuf_queue(struct videobuf_queue *vq,
+ struct videobuf_buffer *vb)
+{
+ struct soc_camera_device *icd = vq->priv_data;
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+ unsigned long flags;
+
+ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+ vb, vb->baddr, vb->bsize);
+
+ vb->state = VIDEOBUF_ACTIVE;
+ spin_lock_irqsave(&pcdev->lock, flags);
+ list_add_tail(&vb->queue, &pcdev->capture);
+
+ if (!pcdev->active) {
+ pcdev->active = vb;
+ sh_mobile_ceu_capture(pcdev);
+ }
+
+ spin_unlock_irqrestore(&pcdev->lock, flags);
+}
+
+static void sh_mobile_ceu_videobuf_release(struct videobuf_queue *vq,
+ struct videobuf_buffer *vb)
+{
+ free_buffer(vq, container_of(vb, struct sh_mobile_ceu_buffer, vb));
+}
+
+static struct videobuf_queue_ops sh_mobile_ceu_videobuf_ops = {
+ .buf_setup = sh_mobile_ceu_videobuf_setup,
+ .buf_prepare = sh_mobile_ceu_videobuf_prepare,
+ .buf_queue = sh_mobile_ceu_videobuf_queue,
+ .buf_release = sh_mobile_ceu_videobuf_release,
+};
+
+static irqreturn_t sh_mobile_ceu_irq(int irq, void *data)
+{
+ struct sh_mobile_ceu_dev *pcdev = data;
+ struct videobuf_buffer *vb;
+ unsigned long flags;
+
+ spin_lock_irqsave(&pcdev->lock, flags);
+
+ vb = pcdev->active;
+ list_del_init(&vb->queue);
+
+ if (!list_empty(&pcdev->capture))
+ pcdev->active = list_entry(pcdev->capture.next,
+ struct videobuf_buffer, queue);
+ else
+ pcdev->active = NULL;
+
+ sh_mobile_ceu_capture(pcdev);
+
+ vb->state = VIDEOBUF_DONE;
+ do_gettimeofday(&vb->ts);
+ vb->field_count++;
+ wake_up(&vb->done);
+ spin_unlock_irqrestore(&pcdev->lock, flags);
+
+ return IRQ_HANDLED;
+}
+
+static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
+{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+ int ret = -EBUSY;
+
+ mutex_lock(&camera_lock);
+
+ if (pcdev->icd)
+ goto err;
+
+ dev_info(&icd->dev,
+ "SuperH Mobile CEU driver attached to camera %d\n",
+ icd->devnum);
+
+ if (pcdev->pdata->enable_camera)
+ pcdev->pdata->enable_camera();
+
+ ret = icd->ops->init(icd);
+ if (ret)
+ goto err;
+
+ ceu_write(pcdev, CAPSR, 1 << 16); /* reset */
+ while (ceu_read(pcdev, CSTSR) & 1)
+ msleep(1);
+
+ pcdev->icd = icd;
+err:
+ mutex_unlock(&camera_lock);
+
+ return ret;
+}
+
+static void sh_mobile_ceu_remove_device(struct soc_camera_device *icd)
+{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+
+ BUG_ON(icd != pcdev->icd);
+
+ /* disable capture, disable interrupts */
+ ceu_write(pcdev, CEIER, 0);
+ ceu_write(pcdev, CAPSR, 1 << 16); /* reset */
+ icd->ops->release(icd);
+ if (pcdev->pdata->disable_camera)
+ pcdev->pdata->disable_camera();
+
+ dev_info(&icd->dev,
+ "SuperH Mobile CEU driver detached from camera %d\n",
+ icd->devnum);
+
+ pcdev->icd = NULL;
+}
+
+static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd,
+ __u32 pixfmt)
+{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+ int ret, buswidth, width, cfszr_width, cdwdr_width;
+ unsigned long camera_flags, common_flags, value;
+
+ camera_flags = icd->ops->query_bus_param(icd);
+ common_flags = soc_camera_bus_param_compatible(camera_flags,
+ pcdev->pdata->flags);
+ if (!common_flags)
+ return -EINVAL;
+
+ ret = icd->ops->set_bus_param(icd, common_flags);
+ if (ret < 0)
+ return ret;
+
+ switch (common_flags & SOCAM_DATAWIDTH_MASK) {
+ case SOCAM_DATAWIDTH_8:
+ buswidth = 8;
+ break;
+ case SOCAM_DATAWIDTH_16:
+ buswidth = 16;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ ceu_write(pcdev, CRCNTR, 0);
+ ceu_write(pcdev, CRCMPR, 0);
+
+ value = 0x00000010;
+ value |= (common_flags & SOCAM_VSYNC_ACTIVE_LOW) ? (1 << 1) : 0;
+ value |= (common_flags & SOCAM_HSYNC_ACTIVE_LOW) ? (1 << 0) : 0;
+ value |= (buswidth == 16) ? (1 << 12) : 0;
+ ceu_write(pcdev, CAMCR, value);
+
+ ceu_write(pcdev, CAPCR, 0x00300000);
+ ceu_write(pcdev, CAIFR, 0);
+
+ mdelay(1);
+
+ width = icd->width * (icd->current_fmt->depth / 8);
+ width = (buswidth == 16) ? width / 2 : width;
+ cfszr_width = (buswidth == 8) ? width / 2 : width;
+ cdwdr_width = (buswidth == 16) ? width * 2 : width;
+
+ ceu_write(pcdev, CAMOR, 0);
+ ceu_write(pcdev, CAPWR, (icd->height << 16) | width);
+ ceu_write(pcdev, CFLCR, 0); /* data fetch mode - no scaling */
+ ceu_write(pcdev, CFSZR, (icd->height << 16) | cfszr_width);
+ ceu_write(pcdev, CLFCR, 0); /* data fetch mode - no lowpass filter */
+ ceu_write(pcdev, CDOCR, 0x00000016);
+
+ ceu_write(pcdev, CDWDR, cdwdr_width);
+ ceu_write(pcdev, CFWCR, 0); /* keep "datafetch firewall" disabled */
+
+ /* not in bundle mode: skip CBDSR, CDAYR2, CDACR2, CDBYR2, CDBCR2 */
+ /* in data fetch mode: no need for CDACR, CDBYR, CDBCR */
+
+ return 0;
+}
+
+static int sh_mobile_ceu_try_bus_param(struct soc_camera_device *icd,
+ __u32 pixfmt)
+{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+ unsigned long camera_flags, common_flags;
+
+ camera_flags = icd->ops->query_bus_param(icd);
+ common_flags = soc_camera_bus_param_compatible(camera_flags,
+ pcdev->pdata->flags);
+ if (!common_flags)
+ return -EINVAL;
+
+ return 0;
+}
+
+static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd,
+ __u32 pixfmt, struct v4l2_rect *rect)
+{
+ return icd->ops->set_fmt_cap(icd, pixfmt, rect);
+}
+
+static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd,
+ struct v4l2_format *f)
+{
+ /* FIXME: calculate using depth and bus width */
+
+ if (f->fmt.pix.height < 4)
+ f->fmt.pix.height = 4;
+ if (f->fmt.pix.height > 1920)
+ f->fmt.pix.height = 1920;
+ if (f->fmt.pix.width < 2)
+ f->fmt.pix.width = 2;
+ if (f->fmt.pix.width > 2560)
+ f->fmt.pix.width = 2560;
+ f->fmt.pix.width &= ~0x01;
+ f->fmt.pix.height &= ~0x03;
+
+ /* limit to sensor capabilities */
+ return icd->ops->try_fmt_cap(icd, f);
+}
+
+static int sh_mobile_ceu_reqbufs(struct soc_camera_file *icf,
+ struct v4l2_requestbuffers *p)
+{
+ int i;
+
+ /* This is for locking debugging only. I removed spinlocks and now I
+ * check whether .prepare is ever called on a linked buffer, or whether
+ * a dma IRQ can occur for an in-work or unlinked buffer. Until now
+ * it hadn't triggered */
+ for (i = 0; i < p->count; i++) {
+ struct sh_mobile_ceu_buffer *buf;
+
+ buf = container_of(icf->vb_vidq.bufs[i],
+ struct sh_mobile_ceu_buffer, vb);
+ INIT_LIST_HEAD(&buf->vb.queue);
+ }
+
+ return 0;
+}
+
+static unsigned int sh_mobile_ceu_poll(struct file *file, poll_table *pt)
+{
+ struct soc_camera_file *icf = file->private_data;
+ struct sh_mobile_ceu_buffer *buf;
+
+ buf = list_entry(icf->vb_vidq.stream.next,
+ struct sh_mobile_ceu_buffer, vb.stream);
+
+ poll_wait(file, &buf->vb.done, pt);
+
+ if (buf->vb.state == VIDEOBUF_DONE ||
+ buf->vb.state == VIDEOBUF_ERROR)
+ return POLLIN|POLLRDNORM;
+
+ return 0;
+}
+
+static int sh_mobile_ceu_querycap(struct soc_camera_host *ici,
+ struct v4l2_capability *cap)
+{
+ strlcpy(cap->card, "SuperH_Mobile_CEU", sizeof(cap->card));
+ cap->version = KERNEL_VERSION(0, 0, 5);
+ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+ return 0;
+}
+
+static void sh_mobile_ceu_init_videobuf(struct videobuf_queue *q,
+ struct soc_camera_device *icd)
+{
+ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+ struct sh_mobile_ceu_dev *pcdev = ici->priv;
+
+ videobuf_queue_dma_contig_init(q,
+ &sh_mobile_ceu_videobuf_ops,
+ &ici->dev, &pcdev->lock,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE,
+ V4L2_FIELD_NONE,
+ sizeof(struct sh_mobile_ceu_buffer),
+ icd);
+}
+
+static struct soc_camera_host_ops sh_mobile_ceu_host_ops = {
+ .owner = THIS_MODULE,
+ .add = sh_mobile_ceu_add_device,
+ .remove = sh_mobile_ceu_remove_device,
+ .set_fmt_cap = sh_mobile_ceu_set_fmt_cap,
+ .try_fmt_cap = sh_mobile_ceu_try_fmt_cap,
+ .reqbufs = sh_mobile_ceu_reqbufs,
+ .poll = sh_mobile_ceu_poll,
+ .querycap = sh_mobile_ceu_querycap,
+ .try_bus_param = sh_mobile_ceu_try_bus_param,
+ .set_bus_param = sh_mobile_ceu_set_bus_param,
+ .init_videobuf = sh_mobile_ceu_init_videobuf,
+};
+
+static int sh_mobile_ceu_probe(struct platform_device *pdev)
+{
+ struct sh_mobile_ceu_dev *pcdev;
+ struct resource *res;
+ void __iomem *base;
+ unsigned int irq;
+ int err = 0;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ irq = platform_get_irq(pdev, 0);
+ if (!res || !irq) {
+ dev_err(&pdev->dev, "Not enough CEU platform resources.\n");
+ err = -ENODEV;
+ goto exit;
+ }
+
+ pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
+ if (!pcdev) {
+ dev_err(&pdev->dev, "Could not allocate pcdev\n");
+ err = -ENOMEM;
+ goto exit;
+ }
+
+ platform_set_drvdata(pdev, pcdev);
+ INIT_LIST_HEAD(&pcdev->capture);
+ spin_lock_init(&pcdev->lock);
+
+ pcdev->pdata = pdev->dev.platform_data;
+ if (!pcdev->pdata) {
+ err = -EINVAL;
+ dev_err(&pdev->dev, "CEU platform data not set.\n");
+ goto exit_kfree;
+ }
+
+ base = ioremap_nocache(res->start, res->end - res->start + 1);
+ if (!base) {
+ err = -ENXIO;
+ dev_err(&pdev->dev, "Unable to ioremap CEU registers.\n");
+ goto exit_kfree;
+ }
+
+ pcdev->irq = irq;
+ pcdev->base = base;
+ pcdev->video_limit = 0; /* only enabled if second resource exists */
+ pcdev->dev = &pdev->dev;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ if (res) {
+ err = dma_declare_coherent_memory(&pdev->dev, res->start,
+ res->start,
+ (res->end - res->start) + 1,
+ DMA_MEMORY_MAP |
+ DMA_MEMORY_EXCLUSIVE);
+ if (!err) {
+ dev_err(&pdev->dev, "Unable to declare CEU memory.\n");
+ err = -ENXIO;
+ goto exit_iounmap;
+ }
+
+ pcdev->video_limit = (res->end - res->start) + 1;
+ }
+
+ /* request irq */
+ err = request_irq(pcdev->irq, sh_mobile_ceu_irq, IRQF_DISABLED,
+ pdev->dev.bus_id, pcdev);
+ if (err) {
+ dev_err(&pdev->dev, "Unable to register CEU interrupt.\n");
+ goto exit_release_mem;
+ }
+
+ pcdev->ici.priv = pcdev;
+ pcdev->ici.dev.parent = &pdev->dev;
+ pcdev->ici.nr = pdev->id;
+ pcdev->ici.drv_name = pdev->dev.bus_id,
+ pcdev->ici.ops = &sh_mobile_ceu_host_ops,
+
+ err = soc_camera_host_register(&pcdev->ici);
+ if (err)
+ goto exit_free_irq;
+
+ return 0;
+
+exit_free_irq:
+ free_irq(pcdev->irq, pcdev);
+exit_release_mem:
+ if (platform_get_resource(pdev, IORESOURCE_MEM, 1))
+ dma_release_declared_memory(&pdev->dev);
+exit_iounmap:
+ iounmap(base);
+exit_kfree:
+ kfree(pcdev);
+exit:
+ return err;
+}
+
+static int sh_mobile_ceu_remove(struct platform_device *pdev)
+{
+ struct sh_mobile_ceu_dev *pcdev = platform_get_drvdata(pdev);
+
+ soc_camera_host_unregister(&pcdev->ici);
+ free_irq(pcdev->irq, pcdev);
+ if (platform_get_resource(pdev, IORESOURCE_MEM, 1))
+ dma_release_declared_memory(&pdev->dev);
+ iounmap(pcdev->base);
+ kfree(pcdev);
+ return 0;
+}
+
+static struct platform_driver sh_mobile_ceu_driver = {
+ .driver = {
+ .name = "sh_mobile_ceu",
+ },
+ .probe = sh_mobile_ceu_probe,
+ .remove = sh_mobile_ceu_remove,
+};
+
+static int __init sh_mobile_ceu_init(void)
+{
+ return platform_driver_register(&sh_mobile_ceu_driver);
+}
+
+static void __exit sh_mobile_ceu_exit(void)
+{
+ return platform_driver_unregister(&sh_mobile_ceu_driver);
+}
+
+module_init(sh_mobile_ceu_init);
+module_exit(sh_mobile_ceu_exit);
+
+MODULE_DESCRIPTION("SuperH Mobile CEU driver");
+MODULE_AUTHOR("Magnus Damm");
+MODULE_LICENSE("GPL");
--- /dev/null
+++ work/include/media/sh_mobile_ceu.h 2008-07-14 20:31:08.000000000 +0900
@@ -0,0 +1,12 @@
+#ifndef __ASM_SH_MOBILE_CEU_H__
+#define __ASM_SH_MOBILE_CEU_H__
+
+#include <media/soc_camera.h>
+
+struct sh_mobile_ceu_info {
+ unsigned long flags; /* SOCAM_... */
+ void (*enable_camera)(void);
+ void (*disable_camera)(void);
+};
+
+#endif /* __ASM_SH_MOBILE_CEU_H__ */
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
` (4 preceding siblings ...)
2008-07-14 12:02 ` [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3 Magnus Damm
@ 2008-07-14 12:02 ` Magnus Damm
2008-07-18 7:40 ` [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Guennadi Liakhovetski
6 siblings, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2008-07-14 12:02 UTC (permalink / raw)
To: video4linux-list
Cc: paulius.zaleckas, linux-sh, mchehab, lethal, akpm, g.liakhovetski
This patch adds a simple platform camera device. Useful for testing
cameras with SoC camera host drivers. Only one single pixel format
and resolution combination is supported.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/Kconfig | 6
drivers/media/video/Makefile | 1
drivers/media/video/soc_camera_platform.c | 198 +++++++++++++++++++++++++++++
include/media/soc_camera_platform.h | 15 ++
4 files changed, 220 insertions(+)
--- 0011/drivers/media/video/Kconfig
+++ work/drivers/media/video/Kconfig 2008-07-14 20:31:16.000000000 +0900
@@ -950,6 +950,12 @@ config MT9V022_PCA9536_SWITCH
Select this if your MT9V022 camera uses a PCA9536 I2C GPIO
extender to switch between 8 and 10 bit datawidth modes
+config SOC_CAMERA_PLATFORM
+ tristate "platform camera support"
+ depends on SOC_CAMERA
+ help
+ This is a generic SoC camera platform driver, useful for testing
+
config VIDEO_PXA27x
tristate "PXA27x Quick Capture Interface driver"
depends on VIDEO_DEV && PXA27x
--- 0011/drivers/media/video/Makefile
+++ work/drivers/media/video/Makefile 2008-07-14 20:31:16.000000000 +0900
@@ -135,6 +135,7 @@ obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_
obj-$(CONFIG_SOC_CAMERA) += soc_camera.o
obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o
+obj-$(CONFIG_SOC_CAMERA_PLATFORM) += soc_camera_platform.o
obj-$(CONFIG_VIDEO_AU0828) += au0828/
--- /dev/null
+++ work/drivers/media/video/soc_camera_platform.c 2008-07-14 20:32:06.000000000 +0900
@@ -0,0 +1,198 @@
+/*
+ * Generic Platform Camera Driver
+ *
+ * Copyright (C) 2008 Magnus Damm
+ * Based on mt9m001 driver,
+ * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
+#include <media/soc_camera.h>
+
+struct soc_camera_platform_info {
+ int iface;
+ char *format_name;
+ unsigned long format_depth;
+ struct v4l2_pix_format format;
+ unsigned long bus_param;
+ int (*set_capture)(struct soc_camera_platform_info *info, int enable);
+};
+
+struct soc_camera_platform_priv {
+ struct soc_camera_platform_info *info;
+ struct soc_camera_device icd;
+ struct soc_camera_data_format format;
+};
+
+static struct soc_camera_platform_info *
+soc_camera_platform_get_info(struct soc_camera_device *icd)
+{
+ struct soc_camera_platform_priv *priv;
+ priv = container_of(icd, struct soc_camera_platform_priv, icd);
+ return priv->info;
+}
+
+static int soc_camera_platform_init(struct soc_camera_device *icd)
+{
+ return 0;
+}
+
+static int soc_camera_platform_release(struct soc_camera_device *icd)
+{
+ return 0;
+}
+
+static int soc_camera_platform_start_capture(struct soc_camera_device *icd)
+{
+ struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+ return p->set_capture(p, 1);
+}
+
+static int soc_camera_platform_stop_capture(struct soc_camera_device *icd)
+{
+ struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+ return p->set_capture(p, 0);
+}
+
+static int soc_camera_platform_set_bus_param(struct soc_camera_device *icd,
+ unsigned long flags)
+{
+ return 0;
+}
+
+static unsigned long
+soc_camera_platform_query_bus_param(struct soc_camera_device *icd)
+{
+ struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+ return p->bus_param;
+}
+
+static int soc_camera_platform_set_fmt_cap(struct soc_camera_device *icd,
+ __u32 pixfmt, struct v4l2_rect *rect)
+{
+ return 0;
+}
+
+static int soc_camera_platform_try_fmt_cap(struct soc_camera_device *icd,
+ struct v4l2_format *f)
+{
+ struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd);
+
+ f->fmt.pix.width = p->format.width;
+ f->fmt.pix.height = p->format.height;
+ return 0;
+}
+
+static int soc_camera_platform_video_probe(struct soc_camera_device *icd)
+{
+ struct soc_camera_platform_priv *priv;
+ priv = container_of(icd, struct soc_camera_platform_priv, icd);
+
+ priv->format.name = priv->info->format_name;
+ priv->format.depth = priv->info->format_depth;
+ priv->format.fourcc = priv->info->format.pixelformat;
+ priv->format.colorspace = priv->info->format.colorspace;
+
+ icd->formats = &priv->format;
+ icd->num_formats = 1;
+
+ return soc_camera_video_start(icd);
+}
+
+static void soc_camera_platform_video_remove(struct soc_camera_device *icd)
+{
+ soc_camera_video_stop(icd);
+}
+
+static struct soc_camera_ops soc_camera_platform_ops = {
+ .owner = THIS_MODULE,
+ .probe = soc_camera_platform_video_probe,
+ .remove = soc_camera_platform_video_remove,
+ .init = soc_camera_platform_init,
+ .release = soc_camera_platform_release,
+ .start_capture = soc_camera_platform_start_capture,
+ .stop_capture = soc_camera_platform_stop_capture,
+ .set_fmt_cap = soc_camera_platform_set_fmt_cap,
+ .try_fmt_cap = soc_camera_platform_try_fmt_cap,
+ .set_bus_param = soc_camera_platform_set_bus_param,
+ .query_bus_param = soc_camera_platform_query_bus_param,
+};
+
+static int soc_camera_platform_probe(struct platform_device *pdev)
+{
+ struct soc_camera_platform_priv *priv;
+ struct soc_camera_platform_info *p;
+ struct soc_camera_device *icd;
+ int ret;
+
+ p = pdev->dev.platform_data;
+ if (!p)
+ return -EINVAL;
+
+ priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ priv->info = p;
+ platform_set_drvdata(pdev, priv);
+
+ icd = &priv->icd;
+ icd->ops = &soc_camera_platform_ops;
+ icd->control = &pdev->dev;
+ icd->width_min = 0;
+ icd->width_max = priv->info->format.width;
+ icd->height_min = 0;
+ icd->height_max = priv->info->format.height;
+ icd->y_skip_top = 0;
+ icd->iface = priv->info->iface;
+
+ ret = soc_camera_device_register(icd);
+ if (ret)
+ kfree(priv);
+
+ return ret;
+}
+
+static int soc_camera_platform_remove(struct platform_device *pdev)
+{
+ struct soc_camera_platform_priv *priv = platform_get_drvdata(pdev);
+
+ soc_camera_device_unregister(&priv->icd);
+ kfree(priv);
+ return 0;
+}
+
+static struct platform_driver soc_camera_platform_driver = {
+ .driver = {
+ .name = "soc_camera_platform",
+ },
+ .probe = soc_camera_platform_probe,
+ .remove = soc_camera_platform_remove,
+};
+
+static int __init soc_camera_platform_module_init(void)
+{
+ return platform_driver_register(&soc_camera_platform_driver);
+}
+
+static void __exit soc_camera_platform_module_exit(void)
+{
+ return platform_driver_unregister(&soc_camera_platform_driver);
+}
+
+module_init(soc_camera_platform_module_init);
+module_exit(soc_camera_platform_module_exit);
+
+MODULE_DESCRIPTION("SoC Camera Platform driver");
+MODULE_AUTHOR("Magnus Damm");
+MODULE_LICENSE("GPL v2");
--- /dev/null
+++ work/include/media/soc_camera_platform.h 2008-07-14 20:31:16.000000000 +0900
@@ -0,0 +1,15 @@
+#ifndef __SOC_CAMERA_H__
+#define __SOC_CAMERA_H__
+
+#include <linux/videodev2.h>
+
+struct soc_camera_platform_info {
+ int iface;
+ char *format_name;
+ unsigned long format_depth;
+ struct v4l2_pix_format format;
+ unsigned long bus_param;
+ int (*set_capture)(struct soc_camera_platform_info *info, int enable);
+};
+
+#endif /* __SOC_CAMERA_H__ */
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 04/06] videobuf: Add physically contiguous queue code V3
2008-07-14 12:02 ` [PATCH 04/06] videobuf: Add physically contiguous queue code V3 Magnus Damm
@ 2008-07-14 12:20 ` Paulius Zaleckas
0 siblings, 0 replies; 18+ messages in thread
From: Paulius Zaleckas @ 2008-07-14 12:20 UTC (permalink / raw)
To: video4linux-list; +Cc: video4linux-list, linux-sh
Magnus Damm wrote:
> This is V3 of the physically contiguous videobuf queues patch.
> Useful for hardware such as the SuperH Mobile CEU which doesn't
> support scatter gatter bus mastering.
gather
^
>
> Since it may be difficult to allocate large chunks of physically
> contiguous memory after some uptime due to fragmentation, this code
> allocates memory using dma_alloc_coherent(). Architectures supporting
> dma_declare_coherent_memory() can easily avoid fragmentation issues
> by using dma_declare_coherent_memory() to force dma_alloc_coherent()
> to allocate from a certain pre-allocated memory area.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
Tested-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/06] soc_camera: Move spinlocks
2008-07-14 12:02 ` [PATCH 01/06] soc_camera: Move spinlocks Magnus Damm
@ 2008-07-14 12:31 ` Guennadi Liakhovetski
2008-07-14 12:36 ` Paulius Zaleckas
2008-07-15 8:23 ` Magnus Damm
0 siblings, 2 replies; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-14 12:31 UTC (permalink / raw)
To: Magnus Damm
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
On Mon, 14 Jul 2008, Magnus Damm wrote:
> This patch moves the spinlock handling from soc_camera.c to the actual
> camera host driver. The spinlock alloc/free callbacks are replaced with
> code in init_videobuf().
As merits of this move were not quite obvious to me (you lose the
possibility to use default lock allocation / freeing in soc_camera.c), I
extended your comment as follows:
This patch moves the spinlock handling from soc_camera.c to the actual
camera host driver. The spinlock_alloc/free callbacks are replaced with
code in init_videobuf(). So far all camera host drivers implement their
own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
BUGs on a NULL spinlock argument, so, new camera host drivers will not
forget to provide a spinlock when initialising their videobug queues.
Do you agree with it? This is how I'm going to pull it into my soc-camera
tree.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/06] soc_camera: Move spinlocks
2008-07-14 12:31 ` Guennadi Liakhovetski
@ 2008-07-14 12:36 ` Paulius Zaleckas
2008-07-14 12:43 ` Guennadi Liakhovetski
2008-07-15 8:23 ` Magnus Damm
1 sibling, 1 reply; 18+ messages in thread
From: Paulius Zaleckas @ 2008-07-14 12:36 UTC (permalink / raw)
To: video4linux-list; +Cc: video4linux-list, linux-sh
Guennadi Liakhovetski wrote:
> On Mon, 14 Jul 2008, Magnus Damm wrote:
>
>> This patch moves the spinlock handling from soc_camera.c to the actual
>> camera host driver. The spinlock alloc/free callbacks are replaced with
>> code in init_videobuf().
>
> As merits of this move were not quite obvious to me (you lose the
> possibility to use default lock allocation / freeing in soc_camera.c), I
> extended your comment as follows:
>
> This patch moves the spinlock handling from soc_camera.c to the actual
> camera host driver. The spinlock_alloc/free callbacks are replaced with
> code in init_videobuf(). So far all camera host drivers implement their
> own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
> BUGs on a NULL spinlock argument, so, new camera host drivers will not
> forget to provide a spinlock when initialising their videobug queues.
videobuf
^
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/06] soc_camera: Move spinlocks
2008-07-14 12:36 ` Paulius Zaleckas
@ 2008-07-14 12:43 ` Guennadi Liakhovetski
0 siblings, 0 replies; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-14 12:43 UTC (permalink / raw)
To: Paulius Zaleckas
Cc: video4linux-list, linux-sh, Mauro Carvalho Chehab, lethal, akpm
On Mon, 14 Jul 2008, Paulius Zaleckas wrote:
> Guennadi Liakhovetski wrote:
> > On Mon, 14 Jul 2008, Magnus Damm wrote:
> >
> > > This patch moves the spinlock handling from soc_camera.c to the actual
> > > camera host driver. The spinlock alloc/free callbacks are replaced with
> > > code in init_videobuf().
> >
> > As merits of this move were not quite obvious to me (you lose the
> > possibility to use default lock allocation / freeing in soc_camera.c), I
> > extended your comment as follows:
> >
> > This patch moves the spinlock handling from soc_camera.c to the actual
> > camera host driver. The spinlock_alloc/free callbacks are replaced with
> > code in init_videobuf(). So far all camera host drivers implement their
> > own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
> > BUGs on a NULL spinlock argument, so, new camera host drivers will not
> > forget to provide a spinlock when initialising their videobug queues.
> videobuf
Thanks:-)
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/06] soc_camera: Move spinlocks
2008-07-14 12:31 ` Guennadi Liakhovetski
2008-07-14 12:36 ` Paulius Zaleckas
@ 2008-07-15 8:23 ` Magnus Damm
1 sibling, 0 replies; 18+ messages in thread
From: Magnus Damm @ 2008-07-15 8:23 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
On Mon, Jul 14, 2008 at 9:31 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Mon, 14 Jul 2008, Magnus Damm wrote:
>
>> This patch moves the spinlock handling from soc_camera.c to the actual
>> camera host driver. The spinlock alloc/free callbacks are replaced with
>> code in init_videobuf().
>
> As merits of this move were not quite obvious to me (you lose the
> possibility to use default lock allocation / freeing in soc_camera.c), I
> extended your comment as follows:
>
> This patch moves the spinlock handling from soc_camera.c to the actual
> camera host driver. The spinlock_alloc/free callbacks are replaced with
> code in init_videobuf(). So far all camera host drivers implement their
> own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
> BUGs on a NULL spinlock argument, so, new camera host drivers will not
> forget to provide a spinlock when initialising their videobug queues.
>
> Do you agree with it? This is how I'm going to pull it into my soc-camera
> tree.
Yes, I agree. Thanks for extending the comment.
Speaking about pulling in patches, are all 6 patches ok with you guys?
Or do you expect me to fix up and resend something?
/ magnus
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
2008-07-14 12:02 ` [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3 Magnus Damm
@ 2008-07-18 7:39 ` Guennadi Liakhovetski
2008-07-18 8:07 ` Magnus Damm
0 siblings, 1 reply; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-18 7:39 UTC (permalink / raw)
To: Magnus Damm
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
Hi Magnus,
the whole this patch-series has been pulled into the v4l tree now, which
means there hasn't been any critical issues left, at least none are
known:-)
A couple of general notes, that would be nice to address in an incremental
patch:
1. the driver could benefit from a bit more comments:-) At least for
register configuration.
2. code like
> + ceu_write(pcdev, CETCR, ~ceu_read(pcdev, CETCR) & 0x0317f313);
> + ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) | 1);
> +
> + ceu_write(pcdev, CAPCR, ceu_read(pcdev, CAPCR) & ~0x10000);
> +
> + ceu_write(pcdev, CETCR, 0x0317f313 ^ 0x10);
specifically the 0x0317f313 constants in it might better be coded with
macros, or at least should be commented.
3. you don't seem to check the interrupt reason nor to handle any error
conditions like overflow. I guess, there is something like a status
register on the interface, that you can check on an interrupt to see what
really was the cause for it.
4. you really managed it to keep the driver platform-neutral!:-) Still, do
we need an ack from the SH-maintainer? If you think we do, please, try to
obtain one asap - the patches should be ready to go upstream by Sunday.
5. the memory you are binding with dma_declare_coherent_memory - is it
some SoC-local SRAM? Is it usably only by the camera interface or also by
other devices? You might want to request it first like in
drivers/scsi/NCR_Q720.c to make sure noone else is using it.
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
` (5 preceding siblings ...)
2008-07-14 12:02 ` [PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver Magnus Damm
@ 2008-07-18 7:40 ` Guennadi Liakhovetski
6 siblings, 0 replies; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-18 7:40 UTC (permalink / raw)
To: Magnus Damm
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
On Mon, 14 Jul 2008, Magnus Damm wrote:
> This is V3 of the SuperH Mobile CEU interface patches.
>
> [PATCH 01/06] soc_camera: Move spinlocks
> [PATCH 02/06] soc_camera: Add 16-bit bus width support
> [PATCH 03/06] videobuf: Fix gather spelling
> [PATCH 04/06] videobuf: Add physically contiguous queue code V3
> [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
> [PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver
>
> Changes since V2:
> - use dma_handle for physical address for videobuf-dma-contig
> - spell gather correctly
> - remove SUPERH Kconfig dependency
> - move sh_mobile_ceu.h to include/media
> - add board callback support with enable_camera()/disable_camera()
> - add support for declare_coherent_memory
> - rework video memory limit
> - more verbose error messages
> - add soc_camera_platform driver for simple camera devices
>
> Changes since V1:
> - dropped former V1 patches [01/07]->[04/07]
> - rebased on top of [PATCH] soc_camera: make videobuf independent
> - rewrote spinlock changes into the new [01/04] patch
> - updated the videobuf-dma-contig code with feeback from Paulius Zaleckas
> - fixed the CEU driver to work with the newly updated patches
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
> ---
Thanks, applied to soc-camera.
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
2008-07-18 7:39 ` Guennadi Liakhovetski
@ 2008-07-18 8:07 ` Magnus Damm
2008-07-18 8:23 ` Guennadi Liakhovetski
0 siblings, 1 reply; 18+ messages in thread
From: Magnus Damm @ 2008-07-18 8:07 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
Hi Guennadi!
On Fri, Jul 18, 2008 at 4:39 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> Hi Magnus,
>
> the whole this patch-series has been pulled into the v4l tree now, which
> means there hasn't been any critical issues left, at least none are
> known:-)
Excellent! Thank you.
> A couple of general notes, that would be nice to address in an incremental
> patch:
>
> 1. the driver could benefit from a bit more comments:-) At least for
> register configuration.
Yes, I agree with you.
> 2. code like
>
>> + ceu_write(pcdev, CETCR, ~ceu_read(pcdev, CETCR) & 0x0317f313);
>> + ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) | 1);
>> +
>> + ceu_write(pcdev, CAPCR, ceu_read(pcdev, CAPCR) & ~0x10000);
>> +
>> + ceu_write(pcdev, CETCR, 0x0317f313 ^ 0x10);
>
> specifically the 0x0317f313 constants in it might better be coded with
> macros, or at least should be commented.
Yeah, sorry about that. The sequence above is pure magic, but it would
definitely not hurt with a few constants...
> 3. you don't seem to check the interrupt reason nor to handle any error
> conditions like overflow. I guess, there is something like a status
> register on the interface, that you can check on an interrupt to see what
> really was the cause for it.
I've done some stress testing and I've had the camera running over the
weekend on a sh7723 board without problems, so i guess the driver is
at least half-ok.
This doesn't mean you're wrong though, there is definitely a need for
better error handling. There are many bits available for error
conditions - I guess the biggest question is how to trigger them and
what to do about it.
> 4. you really managed it to keep the driver platform-neutral!:-) Still, do
> we need an ack from the SH-maintainer? If you think we do, please, try to
> obtain one asap - the patches should be ready to go upstream by Sunday.
I'm sure Paul would ack if you guys needed it, but i wonder if there
is any point in it. Paul knows about this work and he will sign off on
the platform data part for sure. So I wouldn't worry about it if I
were you.
> 5. the memory you are binding with dma_declare_coherent_memory - is it
> some SoC-local SRAM? Is it usably only by the camera interface or also by
> other devices? You might want to request it first like in
> drivers/scsi/NCR_Q720.c to make sure noone else is using it.
This memory could on-chip SRAM, but right now it's regular external
RAM. It's up to the person fixing up the platform data to decide, and
I think that's a pretty nice and flexible strategy.
I plan on doing something like this for the platform data:
http://git.kernel.org/?p=linux/kernel/git/lethal/sh-2.6.git;a=commitdiff;h=3ba5b04f107f462ec14994270e15b91c59041ef9
Regarding request_mem_region() - I used to add that here and there,
but I think the platform driver layer should handle that for us
automatically these days. I'm not 100% sure though. =)
Thanks for all the help!
/ magnus
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
2008-07-18 8:07 ` Magnus Damm
@ 2008-07-18 8:23 ` Guennadi Liakhovetski
[not found] ` <20080718214644.GB21846@linux-sh.org>
0 siblings, 1 reply; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-18 8:23 UTC (permalink / raw)
To: Magnus Damm
Cc: video4linux-list, paulius.zaleckas, linux-sh,
Mauro Carvalho Chehab, lethal, akpm
On Fri, 18 Jul 2008, Magnus Damm wrote:
> > 3. you don't seem to check the interrupt reason nor to handle any error
> > conditions like overflow. I guess, there is something like a status
> > register on the interface, that you can check on an interrupt to see what
> > really was the cause for it.
>
> I've done some stress testing and I've had the camera running over the
> weekend on a sh7723 board without problems, so i guess the driver is
> at least half-ok.
>
> This doesn't mean you're wrong though, there is definitely a need for
> better error handling. There are many bits available for error
> conditions - I guess the biggest question is how to trigger them and
> what to do about it.
Not sure how you have done your stress-testing, but, I think, it should be
possible to generate a couple of DMA overruns, if you put the CPU under
load, add at least one more DMA source under load - don't know what you
can use on SH, but USB (e.g., bluetooth), FB are usually good at this, add
some interrupt flood, so, you have a good chance to be late with your
video-interrupt processing. And let your camera run at a good
frame-rate...
As for handling, at least checking for some of those bits with some
comment "if you see this triggered, let me know, we'll decide how to
handle this", and a nice printk, maybe ratelimited... The rest, like
dropping the frame might indeed not be easy to get right without a
test-case.
> > 4. you really managed it to keep the driver platform-neutral!:-) Still, do
> > we need an ack from the SH-maintainer? If you think we do, please, try to
> > obtain one asap - the patches should be ready to go upstream by Sunday.
>
> I'm sure Paul would ack if you guys needed it, but i wonder if there
> is any point in it. Paul knows about this work and he will sign off on
> the platform data part for sure. So I wouldn't worry about it if I
> were you.
Ok.
> > 5. the memory you are binding with dma_declare_coherent_memory - is it
> > some SoC-local SRAM? Is it usably only by the camera interface or also by
> > other devices? You might want to request it first like in
> > drivers/scsi/NCR_Q720.c to make sure noone else is using it.
>
> This memory could on-chip SRAM, but right now it's regular external
> RAM. It's up to the person fixing up the platform data to decide, and
> I think that's a pretty nice and flexible strategy.
>
> I plan on doing something like this for the platform data:
> http://git.kernel.org/?p=linux/kernel/git/lethal/sh-2.6.git;a=commitdiff;h=3ba5b04f107f462ec14994270e15b91c59041ef9
>
> Regarding request_mem_region() - I used to add that here and there,
> but I think the platform driver layer should handle that for us
> automatically these days. I'm not 100% sure though. =)
I had a short look and didn't find anything like that there... So, you
might want to double-check and add if needed.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
[not found] ` <20080718214644.GB21846@linux-sh.org>
@ 2008-07-18 22:14 ` Guennadi Liakhovetski
[not found] ` <20080718222713.GA18822@linux-sh.org>
0 siblings, 1 reply; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-18 22:14 UTC (permalink / raw)
To: Paul Mundt
Cc: video4linux-list, linux-sh, Mauro Carvalho Chehab,
paulius.zaleckas, akpm
On Sat, 19 Jul 2008, Paul Mundt wrote:
> On Fri, Jul 18, 2008 at 10:23:14AM +0200, Guennadi Liakhovetski wrote:
> > On Fri, 18 Jul 2008, Magnus Damm wrote:
> > > Regarding request_mem_region() - I used to add that here and there,
> > > but I think the platform driver layer should handle that for us
> > > automatically these days. I'm not 100% sure though. =)
> >
> > I had a short look and didn't find anything like that there... So, you
> > might want to double-check and add if needed.
> >
> It's a bit obscured, but it's certainly handled generically these days.
>
> Look at drivers/base/platform.c:platform_device_add(). The resource type
> is checked there and handed off to insert_resource().
> platform_device_add() is likewise wrapped in to from
> platform_device_register(), so everyone claims the resources
> unconditionally.
Sorry, I still don't qite follow. _Resources_ get accounted with the
platform_device_add() / platform_device_del(), and are searched by
platform_get_resource(), but even this doesn't lock the resource like
some other "get" methods. I can see that. But we are talking not about
"struct resource" accounting, but about memory regions. And I don't see
this done anywhere in platform-device / resource handling.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
[not found] ` <20080718222713.GA18822@linux-sh.org>
@ 2008-07-18 22:48 ` Guennadi Liakhovetski
0 siblings, 0 replies; 18+ messages in thread
From: Guennadi Liakhovetski @ 2008-07-18 22:48 UTC (permalink / raw)
To: Paul Mundt
Cc: video4linux-list, linux-sh, Mauro Carvalho Chehab,
paulius.zaleckas, akpm
On Sat, 19 Jul 2008, Paul Mundt wrote:
> If you have an IORESOURCE_MEM resource in your platform device, the
> iomem_resource pointer gets referenced, just as with
> request_mem_region(), and they both go through __request_region(). The
> only difference is that request_mem_region() doesn't permit nesting,
> while insert_resource() does. There's nothing else going on here.
Indeed, I was so used to request_mem_region() that I didn't think about it
in terms of "struct resource" management. I stand corrected.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2008-07-18 23:15 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 12:02 [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Magnus Damm
2008-07-14 12:02 ` [PATCH 01/06] soc_camera: Move spinlocks Magnus Damm
2008-07-14 12:31 ` Guennadi Liakhovetski
2008-07-14 12:36 ` Paulius Zaleckas
2008-07-14 12:43 ` Guennadi Liakhovetski
2008-07-15 8:23 ` Magnus Damm
2008-07-14 12:02 ` [PATCH 02/06] soc_camera: Add 16-bit bus width support Magnus Damm
2008-07-14 12:02 ` [PATCH 03/06] videobuf: Fix gather spelling Magnus Damm
2008-07-14 12:02 ` [PATCH 04/06] videobuf: Add physically contiguous queue code V3 Magnus Damm
2008-07-14 12:20 ` Paulius Zaleckas
2008-07-14 12:02 ` [PATCH 05/06] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3 Magnus Damm
2008-07-18 7:39 ` Guennadi Liakhovetski
2008-07-18 8:07 ` Magnus Damm
2008-07-18 8:23 ` Guennadi Liakhovetski
[not found] ` <20080718214644.GB21846@linux-sh.org>
2008-07-18 22:14 ` Guennadi Liakhovetski
[not found] ` <20080718222713.GA18822@linux-sh.org>
2008-07-18 22:48 ` Guennadi Liakhovetski
2008-07-14 12:02 ` [PATCH 06/06] soc_camera_platform: Add SoC Camera Platform driver Magnus Damm
2008-07-18 7:40 ` [PATCH 00/06] soc_camera: SuperH Mobile CEU patches V3 Guennadi Liakhovetski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox