summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda/coda.h
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-03-24 20:30:52 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-10 16:07:58 +0300
commitad532d37b2958f6c7652429be36ddd46a65ab67a (patch)
treea9cf7cc63cd123c88512d4363f6ae9b5b4910d7d /drivers/media/platform/coda/coda.h
parent73751da61c00db9914ae1c47a25f7462722bc76b (diff)
downloadlinux-ad532d37b2958f6c7652429be36ddd46a65ab67a.tar.xz
[media] coda: allocate bitstream buffer from REQBUFS, size depends on the format
Allocating the bitstream buffer only when the format is set allows to guarantee that at least two frames fit into the bitstream buffer. For small frame sizes a smaller bitstream buffer can be allocated. Since the bitstream buffer size now depends on the format, replace CODA_MAX_FRAME_SIZE with ctx->bitstream.size where appropriate and remove the now unused constant. Since REQBUFS can be called multiple times, but the format can't be changed unless REQBUFS 0 was called before, we can just keep the allocated context and bitstream buffers if REQBUFS is called multiple times with a non-zero buffer count. [fixed a resource leak preventing repeatedly decoding] Signed-off-by: Peter Seiderer <ps.report@gmx.net> 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@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/coda/coda.h')
-rw-r--r--drivers/media/platform/coda/coda.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
index 57d070ce6665..01d940c630b3 100644
--- a/drivers/media/platform/coda/coda.h
+++ b/drivers/media/platform/coda/coda.h
@@ -26,7 +26,6 @@
#include "coda_regs.h"
#define CODA_MAX_FRAMEBUFFERS 8
-#define CODA_MAX_FRAME_SIZE 0x100000
#define FMO_SLICE_SAVE_BUF_SIZE (32)
enum {