[media] v4l: vsp1: Rename vsp1_video_buffer to vsp1_vb2_buffer

The structure represent a vsp1 videobuf2 buffer, name it accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Laurent Pinchart 2015-07-28 14:17:07 -03:00 committed by Mauro Carvalho Chehab
parent b6af10cdd6
commit f7ebf3ca09
5 changed files with 18 additions and 18 deletions

View File

@ -186,7 +186,7 @@ static struct v4l2_subdev_ops rpf_ops = {
* Video Device Operations * Video Device Operations
*/ */
static void rpf_buf_queue(struct vsp1_rwpf *rpf, struct vsp1_video_buffer *buf) static void rpf_buf_queue(struct vsp1_rwpf *rpf, struct vsp1_vb2_buffer *buf)
{ {
unsigned int i; unsigned int i;

View File

@ -25,10 +25,10 @@
#define RWPF_PAD_SOURCE 1 #define RWPF_PAD_SOURCE 1
struct vsp1_rwpf; struct vsp1_rwpf;
struct vsp1_video_buffer; struct vsp1_vb2_buffer;
struct vsp1_rwpf_operations { struct vsp1_rwpf_operations {
void (*queue)(struct vsp1_rwpf *rwpf, struct vsp1_video_buffer *buf); void (*queue)(struct vsp1_rwpf *rwpf, struct vsp1_vb2_buffer *buf);
}; };
struct vsp1_rwpf { struct vsp1_rwpf {

View File

@ -592,12 +592,12 @@ static bool vsp1_pipeline_ready(struct vsp1_pipeline *pipe)
* *
* Return the next queued buffer or NULL if the queue is empty. * Return the next queued buffer or NULL if the queue is empty.
*/ */
static struct vsp1_video_buffer * static struct vsp1_vb2_buffer *
vsp1_video_complete_buffer(struct vsp1_video *video) vsp1_video_complete_buffer(struct vsp1_video *video)
{ {
struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity);
struct vsp1_video_buffer *next = NULL; struct vsp1_vb2_buffer *next = NULL;
struct vsp1_video_buffer *done; struct vsp1_vb2_buffer *done;
unsigned long flags; unsigned long flags;
unsigned int i; unsigned int i;
@ -609,7 +609,7 @@ vsp1_video_complete_buffer(struct vsp1_video *video)
} }
done = list_first_entry(&video->irqqueue, done = list_first_entry(&video->irqqueue,
struct vsp1_video_buffer, queue); struct vsp1_vb2_buffer, queue);
/* In DU output mode reuse the buffer if the list is singular. */ /* In DU output mode reuse the buffer if the list is singular. */
if (pipe->lif && list_is_singular(&video->irqqueue)) { if (pipe->lif && list_is_singular(&video->irqqueue)) {
@ -621,7 +621,7 @@ vsp1_video_complete_buffer(struct vsp1_video *video)
if (!list_empty(&video->irqqueue)) if (!list_empty(&video->irqqueue))
next = list_first_entry(&video->irqqueue, next = list_first_entry(&video->irqqueue,
struct vsp1_video_buffer, queue); struct vsp1_vb2_buffer, queue);
spin_unlock_irqrestore(&video->irqlock, flags); spin_unlock_irqrestore(&video->irqlock, flags);
@ -637,7 +637,7 @@ vsp1_video_complete_buffer(struct vsp1_video *video)
static void vsp1_video_frame_end(struct vsp1_pipeline *pipe, static void vsp1_video_frame_end(struct vsp1_pipeline *pipe,
struct vsp1_video *video) struct vsp1_video *video)
{ {
struct vsp1_video_buffer *buf; struct vsp1_vb2_buffer *buf;
unsigned long flags; unsigned long flags;
buf = vsp1_video_complete_buffer(video); buf = vsp1_video_complete_buffer(video);
@ -836,7 +836,7 @@ static int vsp1_video_buffer_prepare(struct vb2_buffer *vb)
{ {
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
struct vsp1_video *video = vb2_get_drv_priv(vb->vb2_queue); struct vsp1_video *video = vb2_get_drv_priv(vb->vb2_queue);
struct vsp1_video_buffer *buf = to_vsp1_video_buffer(vbuf); struct vsp1_vb2_buffer *buf = to_vsp1_vb2_buffer(vbuf);
const struct v4l2_pix_format_mplane *format = &video->rwpf->format; const struct v4l2_pix_format_mplane *format = &video->rwpf->format;
unsigned int i; unsigned int i;
@ -859,7 +859,7 @@ static void vsp1_video_buffer_queue(struct vb2_buffer *vb)
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
struct vsp1_video *video = vb2_get_drv_priv(vb->vb2_queue); struct vsp1_video *video = vb2_get_drv_priv(vb->vb2_queue);
struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity);
struct vsp1_video_buffer *buf = to_vsp1_video_buffer(vbuf); struct vsp1_vb2_buffer *buf = to_vsp1_vb2_buffer(vbuf);
unsigned long flags; unsigned long flags;
bool empty; bool empty;
@ -951,7 +951,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq)
{ {
struct vsp1_video *video = vb2_get_drv_priv(vq); struct vsp1_video *video = vb2_get_drv_priv(vq);
struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity);
struct vsp1_video_buffer *buffer; struct vsp1_vb2_buffer *buffer;
unsigned long flags; unsigned long flags;
int ret; int ret;
@ -1276,7 +1276,7 @@ int vsp1_video_init(struct vsp1_video *video, struct vsp1_rwpf *rwpf)
video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
video->queue.lock = &video->lock; video->queue.lock = &video->lock;
video->queue.drv_priv = video; video->queue.drv_priv = video;
video->queue.buf_struct_size = sizeof(struct vsp1_video_buffer); video->queue.buf_struct_size = sizeof(struct vsp1_vb2_buffer);
video->queue.ops = &vsp1_video_queue_qops; video->queue.ops = &vsp1_video_queue_qops;
video->queue.mem_ops = &vb2_dma_contig_memops; video->queue.mem_ops = &vb2_dma_contig_memops;
video->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; video->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;

View File

@ -94,7 +94,7 @@ static inline struct vsp1_pipeline *to_vsp1_pipeline(struct media_entity *e)
return NULL; return NULL;
} }
struct vsp1_video_buffer { struct vsp1_vb2_buffer {
struct vb2_v4l2_buffer buf; struct vb2_v4l2_buffer buf;
struct list_head queue; struct list_head queue;
@ -102,10 +102,10 @@ struct vsp1_video_buffer {
unsigned int length[3]; unsigned int length[3];
}; };
static inline struct vsp1_video_buffer * static inline struct vsp1_vb2_buffer *
to_vsp1_video_buffer(struct vb2_v4l2_buffer *vbuf) to_vsp1_vb2_buffer(struct vb2_v4l2_buffer *vbuf)
{ {
return container_of(vbuf, struct vsp1_video_buffer, buf); return container_of(vbuf, struct vsp1_vb2_buffer, buf);
} }
struct vsp1_video { struct vsp1_video {

View File

@ -195,7 +195,7 @@ static struct v4l2_subdev_ops wpf_ops = {
* Video Device Operations * Video Device Operations
*/ */
static void wpf_buf_queue(struct vsp1_rwpf *wpf, struct vsp1_video_buffer *buf) static void wpf_buf_queue(struct vsp1_rwpf *wpf, struct vsp1_vb2_buffer *buf)
{ {
vsp1_wpf_write(wpf, VI6_WPF_DSTM_ADDR_Y, buf->addr[0]); vsp1_wpf_write(wpf, VI6_WPF_DSTM_ADDR_Y, buf->addr[0]);
if (buf->buf.vb2_buf.num_planes > 1) if (buf->buf.vb2_buf.num_planes > 1)