summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-05-23 10:42:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-03 16:00:26 -0300
commitfb1fcf1779bba4c034635cc8916261a6744584a9 (patch)
tree7bfe7664262cf13599ec161a4ee8cf0dfa599aef /drivers/media/platform/coda.c
parent7eac97d7e714429f7ef1ba5d35f94c07f4c34f8e (diff)
downloadlinux-rt-fb1fcf1779bba4c034635cc8916261a6744584a9.tar.gz
[media] coda: fix ENC_SEQ_OPTION for CODA7
GAMMA_OFFSET is different between CodaDx6 and CODA7. Also, this is a bitfield. 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@redhat.com>
Diffstat (limited to 'drivers/media/platform/coda.c')
-rw-r--r--drivers/media/platform/coda.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index efb42b2913ca..1f3ab53670f8 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1129,8 +1129,14 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count)
value = (CODA_DEFAULT_GAMMA & CODA_GAMMA_MASK) << CODA_GAMMA_OFFSET;
coda_write(dev, value, CODA_CMD_ENC_SEQ_RC_GAMMA);
- value = (CODA_DEFAULT_GAMMA > 0) << CODA_OPTION_GAMMA_OFFSET;
- value |= (0 & CODA_OPTION_SLICEREPORT_MASK) << CODA_OPTION_SLICEREPORT_OFFSET;
+ if (CODA_DEFAULT_GAMMA > 0) {
+ if (dev->devtype->product == CODA_DX6)
+ value = 1 << CODADX6_OPTION_GAMMA_OFFSET;
+ else
+ value = 1 << CODA7_OPTION_GAMMA_OFFSET;
+ } else {
+ value = 0;
+ }
coda_write(dev, value, CODA_CMD_ENC_SEQ_OPTION);
if (dst_fourcc == V4L2_PIX_FMT_H264) {