Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60aa38d8 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab
Browse files

[media] davinci: vpif capture: migrate driver to videobuf2



This patch migrates VPIF capture driver to videobuf2 framework.

Signed-off-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarManjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 764af39a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ config DISPLAY_DAVINCI_DM646X_EVM
config CAPTURE_DAVINCI_DM646X_EVM
	tristate "DM646x EVM Video Capture"
	depends on VIDEO_DEV && MACH_DAVINCI_DM6467_EVM
	select VIDEOBUF_DMA_CONTIG
	select VIDEOBUF2_DMA_CONTIG
	select VIDEO_DAVINCI_VPIF
	help
	  Support for DM6467 based capture device.
+269 −327

File changed.

Preview size limit exceeded, changes collapsed.

+11 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/videobuf-core.h>
#include <media/videobuf-dma-contig.h>
#include <media/videobuf2-dma-contig.h>
#include <media/davinci/vpif_types.h>

#include "vpif.h"
@@ -60,11 +60,16 @@ struct video_obj {
	u32 input_idx;
};

struct vpif_cap_buffer {
	struct vb2_buffer vb;
	struct list_head list;
};

struct common_obj {
	/* Pointer pointing to current v4l2_buffer */
	struct videobuf_buffer *cur_frm;
	struct vpif_cap_buffer *cur_frm;
	/* Pointer pointing to current v4l2_buffer */
	struct videobuf_buffer *next_frm;
	struct vpif_cap_buffer *next_frm;
	/*
	 * This field keeps track of type of buffer exchange mechanism
	 * user has selected
@@ -73,7 +78,9 @@ struct common_obj {
	/* Used to store pixel format */
	struct v4l2_format fmt;
	/* Buffer queue used in video-buf */
	struct videobuf_queue buffer_queue;
	struct vb2_queue buffer_queue;
	/* allocator-specific contexts for each plane */
	struct vb2_alloc_ctx *alloc_ctx;
	/* Queue of filled frames */
	struct list_head dma_queue;
	/* Used in video-buf */