summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-07-23 12:28:41 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 15:25:21 -0500
commit8a82c6ba2e92dbd39cb7e5f46aa40daf3432b967 (patch)
treef3bf9392039af486752cae374d87c51e17ccfecb
parenta1192a17eed8ee30fd0f8d944d66fbe5288641e2 (diff)
downloadblackbird-op-linux-8a82c6ba2e92dbd39cb7e5f46aa40daf3432b967.tar.gz
blackbird-op-linux-8a82c6ba2e92dbd39cb7e5f46aa40daf3432b967.zip
[media] coda: move BIT processor command execution out of pic_run_work
In preparation for the split, move the AXI_SRAM_USE register access and the PIC_RUN command execution out of pic_run_work into prepare_encode/decode. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/platform/coda/coda-common.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 07c132485d8f..3e6bcca45be6 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1038,6 +1038,13 @@ static int coda_prepare_decode(struct coda_ctx *ctx)
coda_write(dev, 0, CODA_CMD_DEC_PIC_BB_START);
coda_write(dev, 0, CODA_CMD_DEC_PIC_START_BYTE);
+ if (dev->devtype->product != CODA_DX6)
+ coda_write(dev, ctx->iram_info.axi_sram_use,
+ CODA7_REG_BIT_AXI_SRAM_USE);
+
+ coda_kfifo_sync_to_device_full(ctx);
+ coda_command_async(ctx, CODA_COMMAND_PIC_RUN);
+
return 0;
}
@@ -1184,6 +1191,12 @@ static int coda_prepare_encode(struct coda_ctx *ctx)
coda_write(dev, ctx->bit_stream_param, CODA_REG_BIT_BIT_STREAM_PARAM);
}
+ if (dev->devtype->product != CODA_DX6)
+ coda_write(dev, ctx->iram_info.axi_sram_use,
+ CODA7_REG_BIT_AXI_SRAM_USE);
+
+ coda_command_async(ctx, CODA_COMMAND_PIC_RUN);
+
return 0;
}
@@ -1243,14 +1256,6 @@ static void coda_pic_run_work(struct work_struct *work)
return;
}
- if (dev->devtype->product != CODA_DX6)
- coda_write(dev, ctx->iram_info.axi_sram_use,
- CODA7_REG_BIT_AXI_SRAM_USE);
-
- if (ctx->inst_type == CODA_INST_DECODER)
- coda_kfifo_sync_to_device_full(ctx);
- coda_command_async(ctx, CODA_COMMAND_PIC_RUN);
-
if (!wait_for_completion_timeout(&ctx->completion, msecs_to_jiffies(1000))) {
dev_err(&dev->plat_dev->dev, "CODA PIC_RUN timeout\n");
OpenPOWER on IntegriCloud