summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vivid/vivid-vid-out.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-04-28 09:41:37 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-05 11:49:53 -0300
commitca5316db08199124bf72b0ed16dc1a83fe0609e2 (patch)
treec6a2010a586d67b803f17658344f4ff7f6934567 /drivers/media/platform/vivid/vivid-vid-out.c
parentc62cda97c81309aa77fd2d32820f3f5b925e0ce3 (diff)
[media] vivid: add xfer_func support
Add support for the transfer function: create a new control for it, and support it for both capture and output sides. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-vid-out.c')
-rw-r--r--drivers/media/platform/vivid/vivid-vid-out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index 00f42df947c0..0862c1f24f57 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -258,6 +258,7 @@ void vivid_update_format_out(struct vivid_dev *dev)
}
break;
}
+ dev->xfer_func_out = V4L2_XFER_FUNC_DEFAULT;
dev->ycbcr_enc_out = V4L2_YCBCR_ENC_DEFAULT;
dev->quantization_out = V4L2_QUANTIZATION_DEFAULT;
dev->compose_out = dev->sink_rect;
@@ -320,6 +321,7 @@ int vivid_g_fmt_vid_out(struct file *file, void *priv,
mp->field = dev->field_out;
mp->pixelformat = fmt->fourcc;
mp->colorspace = dev->colorspace_out;
+ mp->xfer_func = dev->xfer_func_out;
mp->ycbcr_enc = dev->ycbcr_enc_out;
mp->quantization = dev->quantization_out;
mp->num_planes = fmt->buffers;
@@ -407,6 +409,7 @@ int vivid_try_fmt_vid_out(struct file *file, void *priv,
for (p = fmt->buffers; p < fmt->planes; p++)
pfmt[0].sizeimage += (pfmt[0].bytesperline * fmt->bit_depth[p]) /
(fmt->bit_depth[0] * fmt->vdownsampling[p]);
+ mp->xfer_func = V4L2_XFER_FUNC_DEFAULT;
mp->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
mp->quantization = V4L2_QUANTIZATION_DEFAULT;
if (vivid_is_svid_out(dev)) {
@@ -546,6 +549,7 @@ int vivid_s_fmt_vid_out(struct file *file, void *priv,
set_colorspace:
dev->colorspace_out = mp->colorspace;
+ dev->xfer_func_out = mp->xfer_func;
dev->ycbcr_enc_out = mp->ycbcr_enc;
dev->quantization_out = mp->quantization;
if (dev->loop_video) {