diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-03-24 14:30:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-10 10:08:30 -0300 |
commit | 650b939ecd3f0a1a9dc800155f7efadeb1794868 (patch) | |
tree | 5d696482ca2d85d11ec900737cdfb815fad3cdcc /drivers/media/platform/coda/coda-common.c | |
parent | ad532d37b2958f6c7652429be36ddd46a65ab67a (diff) | |
download | op-kernel-dev-650b939ecd3f0a1a9dc800155f7efadeb1794868.zip op-kernel-dev-650b939ecd3f0a1a9dc800155f7efadeb1794868.tar.gz |
[media] coda: move parameter buffer in together with context buffer allocation
The parameter buffer is a per-context buffer, so we can allocate and free it
together with the other context buffers during REQBUFS.
Since this was the last context buffer allocated in coda-common.c, we can now
move coda_alloc_context_buf into coda-bit.c.
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-common.c')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 3a852ac6..ae7a351 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -46,7 +46,6 @@ #define CODADX6_MAX_INSTANCES 4 #define CODA_MAX_FORMATS 4 -#define CODA_PARA_BUF_SIZE (10 * 1024) #define CODA_ISRAM_SIZE (2048 * 2) #define MIN_W 176 @@ -1715,14 +1714,6 @@ static int coda_open(struct file *file) ctx->fh.ctrl_handler = &ctx->ctrls; - if (ctx->use_bit) { - ret = coda_alloc_context_buf(ctx, &ctx->parabuf, - CODA_PARA_BUF_SIZE, "parabuf"); - if (ret < 0) { - v4l2_err(&dev->v4l2_dev, "failed to allocate parabuf"); - goto err_dma_alloc; - } - } mutex_init(&ctx->bitstream_mutex); mutex_init(&ctx->buffer_mutex); INIT_LIST_HEAD(&ctx->buffer_meta_list); @@ -1736,8 +1727,6 @@ static int coda_open(struct file *file) return 0; -err_dma_alloc: - v4l2_ctrl_handler_free(&ctx->ctrls); err_ctrls_setup: v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); err_ctx_init: @@ -1783,7 +1772,6 @@ static int coda_release(struct file *file) if (ctx->dev->devtype->product == CODA_DX6) coda_free_aux_buf(dev, &ctx->workbuf); - coda_free_aux_buf(dev, &ctx->parabuf); v4l2_ctrl_handler_free(&ctx->ctrls); clk_disable_unprepare(dev->clk_ahb); clk_disable_unprepare(dev->clk_per); |