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

Commit 2401dd25 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab
Browse files

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



This patch migrates VPIF display 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 60aa38d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
config DISPLAY_DAVINCI_DM646X_EVM
	tristate "DM646x EVM Video Display"
	depends on VIDEO_DEV && MACH_DAVINCI_DM6467_EVM
	select VIDEOBUF_DMA_CONTIG
	select VIDEOBUF2_DMA_CONTIG
	select VIDEO_DAVINCI_VPIF
	select VIDEO_ADV7343
	select VIDEO_THS7303
+269 −307

File changed.

Preview size limit exceeded, changes collapsed.

+14 −6
Original line number Diff line number Diff line
@@ -21,7 +21,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"
@@ -73,21 +73,29 @@ struct vbi_obj {
						 * vbi data */
};

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

struct common_obj {
	/* Buffer specific parameters */
	u8 *fbuffers[VIDEO_MAX_FRAME];		/* List of buffer pointers for
						 * storing frames */
	u32 numbuffers;				/* number of buffers */
	struct videobuf_buffer *cur_frm;	/* Pointer pointing to current
						 * videobuf_buffer */
	struct videobuf_buffer *next_frm;	/* Pointer pointing to next
						 * videobuf_buffer */
	struct vpif_disp_buffer *cur_frm;	/* Pointer pointing to current
						 * vb2_buffer */
	struct vpif_disp_buffer *next_frm;	/* Pointer pointing to next
						 * vb2_buffer */
	enum v4l2_memory memory;		/* This field keeps track of
						 * type of buffer exchange
						 * method user has selected */
	struct v4l2_format fmt;			/* Used to store the format */
	struct videobuf_queue buffer_queue;	/* Buffer queue used in
	struct vb2_queue buffer_queue;		/* Buffer queue used in
						 * video-buf */
	/* allocator-specific contexts for each plane */
	struct vb2_alloc_ctx *alloc_ctx;

	struct list_head dma_queue;		/* Queue of filled frames */
	spinlock_t irqlock;			/* Used in video-buf */