aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorTomasz Stanislawski <t.stanislaws@samsung.com>2012-06-14 10:32:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-25 14:21:44 -0500
commitb28d61b622496038db621fe1dab1caf0e91c6c94 (patch)
treea9a1abe6241029093308d8767aa8f88a67b6076f /drivers/media
parenta812a9665d7d89257f8203dba504a33faa59c45b (diff)
[media] v4l: s5p-fimc: support for dmabuf exporting
This patch enhances s5p-fimc with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-capture.c9
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-m2m.c10
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
index 246bb329c7ae..e5fd159e3ee0 100644
--- a/drivers/media/platform/s5p-fimc/fimc-capture.c
+++ b/drivers/media/platform/s5p-fimc/fimc-capture.c
@@ -1231,6 +1231,14 @@ static int fimc_cap_qbuf(struct file *file, void *priv,
1231 return vb2_qbuf(&fimc->vid_cap.vbq, buf); 1231 return vb2_qbuf(&fimc->vid_cap.vbq, buf);
1232} 1232}
1233 1233
1234static int fimc_cap_expbuf(struct file *file, void *priv,
1235 struct v4l2_exportbuffer *eb)
1236{
1237 struct fimc_dev *fimc = video_drvdata(file);
1238
1239 return vb2_expbuf(&fimc->vid_cap.vbq, eb);
1240}
1241
1234static int fimc_cap_dqbuf(struct file *file, void *priv, 1242static int fimc_cap_dqbuf(struct file *file, void *priv,
1235 struct v4l2_buffer *buf) 1243 struct v4l2_buffer *buf)
1236{ 1244{
@@ -1355,6 +1363,7 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = {
1355 1363
1356 .vidioc_qbuf = fimc_cap_qbuf, 1364 .vidioc_qbuf = fimc_cap_qbuf,
1357 .vidioc_dqbuf = fimc_cap_dqbuf, 1365 .vidioc_dqbuf = fimc_cap_dqbuf,
1366 .vidioc_expbuf = fimc_cap_expbuf,
1358 1367
1359 .vidioc_prepare_buf = fimc_cap_prepare_buf, 1368 .vidioc_prepare_buf = fimc_cap_prepare_buf,
1360 .vidioc_create_bufs = fimc_cap_create_bufs, 1369 .vidioc_create_bufs = fimc_cap_create_bufs,
diff --git a/drivers/media/platform/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c
index 6d1ab49aaf07..26bcf4bc4209 100644
--- a/drivers/media/platform/s5p-fimc/fimc-m2m.c
+++ b/drivers/media/platform/s5p-fimc/fimc-m2m.c
@@ -439,6 +439,15 @@ static int fimc_m2m_dqbuf(struct file *file, void *fh,
439 return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf); 439 return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
440} 440}
441 441
442static int fimc_m2m_expbuf(struct file *file, void *fh,
443 struct v4l2_exportbuffer *eb)
444{
445 struct fimc_ctx *ctx = fh_to_ctx(fh);
446
447 return v4l2_m2m_expbuf(file, ctx->m2m_ctx, eb);
448}
449
450
442static int fimc_m2m_streamon(struct file *file, void *fh, 451static int fimc_m2m_streamon(struct file *file, void *fh,
443 enum v4l2_buf_type type) 452 enum v4l2_buf_type type)
444{ 453{
@@ -607,6 +616,7 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = {
607 .vidioc_querybuf = fimc_m2m_querybuf, 616 .vidioc_querybuf = fimc_m2m_querybuf,
608 .vidioc_qbuf = fimc_m2m_qbuf, 617 .vidioc_qbuf = fimc_m2m_qbuf,
609 .vidioc_dqbuf = fimc_m2m_dqbuf, 618 .vidioc_dqbuf = fimc_m2m_dqbuf,
619 .vidioc_expbuf = fimc_m2m_expbuf,
610 .vidioc_streamon = fimc_m2m_streamon, 620 .vidioc_streamon = fimc_m2m_streamon,
611 .vidioc_streamoff = fimc_m2m_streamoff, 621 .vidioc_streamoff = fimc_m2m_streamoff,
612 .vidioc_g_crop = fimc_m2m_g_crop, 622 .vidioc_g_crop = fimc_m2m_g_crop,