From 1e3e2a9ac40ad4d11699a49a1bbbf40cd8d4c8bd Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Fri, 29 Jun 2018 08:46:46 -0400
Subject: [PATCH] media: coda: jpeg: allow non-JPEG colorspace
The hardware codec is not colorspace aware. We should trust userspace to
set the correct colorimetry information on the OUTPUT queue and mirror
the exact same setting on the CAPTURE queue.
There is no reason to restrict colorspace to JPEG for JPEG images, if
userspace injects the correct colorspace information into the JPEG
headers after encoding.
Fixes: b14ac545688d ("[media] coda: improve colorimetry handling")
Signed-off-by: Philipp Zabel
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
---
drivers/media/platform/coda/coda-common.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 42f852ccc8c0..f25f1417b4fa 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -569,8 +569,6 @@ static int coda_try_fmt(struct coda_ctx *ctx, const struct coda_codec *codec,
f->fmt.pix.height * 2;
break;
case V4L2_PIX_FMT_JPEG:
- f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
- /* fallthrough */
case V4L2_PIX_FMT_H264:
case V4L2_PIX_FMT_MPEG4:
case V4L2_PIX_FMT_MPEG2: