From ff1c21f4cffdd490f2d7fd1ce28462e3dca610de Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Sun, 10 Nov 2019 07:26:11 +0100
Subject: media: coda: disable encoder compose selections
Disable capture side compose selections for the encoder.
This fixes the following v4l2-compliance complaint:
fail: v4l2-test-formats.cpp(1662): IS_ENCODER(node)
test Composing: FAIL
Signed-off-by: Philipp Zabel
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
---
drivers/media/platform/coda/coda-common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'drivers/media')
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 5a38808c8695..af6c59e05138 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -942,7 +942,8 @@ static int coda_g_selection(struct file *file, void *fh,
/* fallthrough */
case V4L2_SEL_TGT_COMPOSE:
case V4L2_SEL_TGT_COMPOSE_DEFAULT:
- if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+ if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+ ctx->inst_type == CODA_INST_ENCODER)
return -EINVAL;
break;
default:
--
cgit v1.2.3