media: coda: jpeg: explicitly disable thumbnails in SEQ_INIT
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 29 Jun 2018 12:46:48 +0000 (08:46 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 4 Jul 2018 12:29:31 +0000 (08:29 -0400)
Explicitly clear DEC_SEQ_JPG_THUMB_EN during sequence initialization.
Not clearing the register does not cause problems, since the only other
codec (MPEG-4 decode) that writes to this register happens to always
write 0 as well.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda_regs.h

index e2994b3..92044b7 100644 (file)
@@ -1679,6 +1679,8 @@ static int __coda_start_decoding(struct coda_ctx *ctx)
                        coda_write(dev, 512, CODA_CMD_DEC_SEQ_SPP_CHUNK_SIZE);
                }
        }
+       if (src_fourcc == V4L2_PIX_FMT_JPEG)
+               coda_write(dev, 0, CODA_CMD_DEC_SEQ_JPG_THUMB_EN);
        if (dev->devtype->product != CODA_960)
                coda_write(dev, 0, CODA_CMD_DEC_SEQ_SRC_SIZE);
 
index 3b650b8..5e7b00a 100644 (file)
 #define CODA_CMD_DEC_SEQ_START_BYTE            0x190
 #define CODA_CMD_DEC_SEQ_PS_BB_START           0x194
 #define CODA_CMD_DEC_SEQ_PS_BB_SIZE            0x198
+#define CODA_CMD_DEC_SEQ_JPG_THUMB_EN          0x19c
 #define CODA_CMD_DEC_SEQ_MP4_ASP_CLASS         0x19c
 #define                CODA_MP4_CLASS_MPEG4                    0
 #define CODA_CMD_DEC_SEQ_X264_MV_EN            0x19c