Commit 8ded351a authored by Marin Mitov's avatar Marin Mitov Committed by Greg Kroah-Hartman

staging: use videobuf2 framework for drivers/staging/dt3155v4l driver

This patch transforms drivers/staging/dt3155v4l driver to use videobuf2 framework.
Tested and works with "xawtv -f".

Either streaming API or read method should be selected during kernel configuration.

If both are selected into the driver (not possible without another patching),
either due to my misunderstanding or problems in xawtv (or both), I get kernel panic
after some start/stop of xawtv (not strictly reproducible).
Signed-off-by: default avatarMarin Mitov <mitov@issp.bas.bg>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7a176332
config VIDEO_DT3155 config VIDEO_DT3155
tristate "DT3155 frame grabber, Video4Linux interface" tristate "DT3155 frame grabber, Video4Linux interface"
depends on PCI && VIDEO_DEV && VIDEO_V4L2 depends on PCI && VIDEO_DEV && VIDEO_V4L2
select VIDEOBUF_DMA_CONTIG select VIDEOBUF2_DMA_CONTIG
default n default n
---help--- ---help---
Enables dt3155 device driver for the DataTranslation DT3155 frame grabber. Enables dt3155 device driver for the DataTranslation DT3155 frame grabber.
...@@ -18,3 +18,11 @@ config DT3155_CCIR ...@@ -18,3 +18,11 @@ config DT3155_CCIR
---help--- ---help---
Select it for CCIR/50Hz (European region), Select it for CCIR/50Hz (European region),
or leave it unselected for RS-170/60Hz (North America). or leave it unselected for RS-170/60Hz (North America).
config DT3155_STREAMING
bool "Selects streaming capture method"
depends on VIDEO_DT3155
default y
---help---
Select it if you want to use streaming of memory mapped buffers
or leave it unselected if you want to use read method (one copy more).
This diff is collapsed.
...@@ -179,18 +179,13 @@ struct dt3155_stats { ...@@ -179,18 +179,13 @@ struct dt3155_stats {
* struct dt3155_priv - private data structure * struct dt3155_priv - private data structure
* *
* @vdev: pointer to video_device structure * @vdev: pointer to video_device structure
* @acq_fp pointer to filp that starts acquisition
* @streaming streaming is negotiated
* @pdev: pointer to pci_dev structure * @pdev: pointer to pci_dev structure
* @vidq pointer to videobuf_queue structure * @q pointer to vb2_queue structure
* @curr_buf: pointer to curren buffer * @curr_buf: pointer to curren buffer
* @thread pointer to worker thraed * @mux: mutex to protect the instance
* @irq_handler: irq handler for the driver * @irq_handler: irq handler for the driver
* @qt_ops local copy of dma-contig qtype_ops
* @dmaq queue for dma buffers * @dmaq queue for dma buffers
* @do_dma wait queue of the kernel thread * @lock spinlock for dma queue
* @mux: mutex to protect the instance
* @lock spinlock for videobuf queues
* @field_count fields counter * @field_count fields counter
* @stats: statistics structure * @stats: statistics structure
* @users open count * @users open count
...@@ -200,17 +195,12 @@ struct dt3155_stats { ...@@ -200,17 +195,12 @@ struct dt3155_stats {
*/ */
struct dt3155_priv { struct dt3155_priv {
struct video_device *vdev; struct video_device *vdev;
struct file *acq_fp;
int streaming;
struct pci_dev *pdev; struct pci_dev *pdev;
struct videobuf_queue *vidq; struct vb2_queue *q;
struct videobuf_buffer *curr_buf; struct vb2_buffer *curr_buf;
struct task_struct *thread; struct mutex mux;
irq_handler_t irq_handler; irq_handler_t irq_handler;
struct videobuf_qtype_ops qt_ops;
struct list_head dmaq; struct list_head dmaq;
wait_queue_head_t do_dma;
struct mutex mux;
spinlock_t lock; spinlock_t lock;
unsigned int field_count; unsigned int field_count;
struct dt3155_stats stats; struct dt3155_stats stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment