diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-07-28 14:05:56 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-19 08:49:18 -0200 |
commit | b6af10cdd6bffb457839e0892531ed14afb6a9a6 (patch) | |
tree | e702a8e5877cec4d20677e5b9d7156dda0996280 /drivers/media/platform/vsp1/vsp1_rpf.c | |
parent | 86960eec4d4b4557fe37021decdf4265213d3882 (diff) | |
download | op-kernel-dev-b6af10cdd6bffb457839e0892531ed14afb6a9a6.zip op-kernel-dev-b6af10cdd6bffb457839e0892531ed14afb6a9a6.tar.gz |
[media] v4l: vsp1: Move video operations to vsp1_rwpf
This removes the dependency of vsp1_rpf and vsp1_wpf on vsp1_video,
making it possible to reuse the operations without a V4L2 video device
node.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_rpf.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_rpf.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c index 0ba7c07..57d36a4 100644 --- a/drivers/media/platform/vsp1/vsp1_rpf.c +++ b/drivers/media/platform/vsp1/vsp1_rpf.c @@ -186,10 +186,8 @@ static struct v4l2_subdev_ops rpf_ops = { * Video Device Operations */ -static void rpf_vdev_queue(struct vsp1_video *video, - struct vsp1_video_buffer *buf) +static void rpf_buf_queue(struct vsp1_rwpf *rpf, struct vsp1_video_buffer *buf) { - struct vsp1_rwpf *rpf = container_of(video, struct vsp1_rwpf, video); unsigned int i; for (i = 0; i < 3; ++i) @@ -208,8 +206,8 @@ static void rpf_vdev_queue(struct vsp1_video *video, buf->addr[2] + rpf->offsets[1]); } -static const struct vsp1_video_operations rpf_vdev_ops = { - .queue = rpf_vdev_queue, +static const struct vsp1_rwpf_operations rpf_vdev_ops = { + .queue = rpf_buf_queue, }; /* ----------------------------------------------------------------------------- @@ -227,6 +225,8 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index) if (rpf == NULL) return ERR_PTR(-ENOMEM); + rpf->ops = &rpf_vdev_ops; + rpf->max_width = RPF_MAX_WIDTH; rpf->max_height = RPF_MAX_HEIGHT; @@ -269,7 +269,6 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index) video->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; video->vsp1 = vsp1; - video->ops = &rpf_vdev_ops; ret = vsp1_video_init(video, rpf); if (ret < 0) |