diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-01-23 19:51:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 15:01:39 +0300 |
commit | 5f9826e8a759426f6fd722a80a72008bd93132af (patch) | |
tree | b13f9d3ed7fb976a7538eba5fec46933e7a4255b | |
parent | f77fd8a9b1a8151ae7a0e98a3b3baf8ab639d0e1 (diff) | |
download | linux-5f9826e8a759426f6fd722a80a72008bd93132af.tar.xz |
[media] coda: fix try_fmt_vid_out colorspace setting
v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 14953b4df586..ff7da3a5c4ae 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -592,7 +592,11 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv, if (ret < 0) return ret; - if (!f->fmt.pix.colorspace) { + switch (f->fmt.pix.colorspace) { + case V4L2_COLORSPACE_REC709: + case V4L2_COLORSPACE_JPEG: + break; + default: if (f->fmt.pix.pixelformat == V4L2_PIX_FMT_JPEG) f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; else |