From: Michael Olbrich Date: Fri, 18 Jul 2014 10:22:39 +0000 (-0300) Subject: [media] coda: use CODA_MAX_FRAME_SIZE everywhere X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=390503bdb49139e83a0cbfd25a31c5fa36db5ca3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] coda: use CODA_MAX_FRAME_SIZE everywhere Without this changing CODA_MAX_FRAME_SIZE to anything other than 0x100000 can break the bitstram handling Signed-off-by: Michael Olbrich Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index c25756e7eeaf..79c362bd8383 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3104,7 +3104,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) * by up to 512 bytes */ if (ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG) { - if (coda_get_bitstream_payload(ctx) >= 0x100000 - 512) + if (coda_get_bitstream_payload(ctx) >= CODA_MAX_FRAME_SIZE - 512) kfifo_init(&ctx->bitstream_fifo, ctx->bitstream.vaddr, ctx->bitstream.size); }