aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda/coda-common.c
diff options
context:
space:
mode:
authorPhilipp Zabel <[email protected]>2014-10-02 14:08:32 -0300
committerMauro Carvalho Chehab <[email protected]>2014-10-28 15:37:32 -0200
commit7cbb105feff82722206613f3e4cee3e98df827d9 (patch)
treef5d8a09735dd1afe3642a7afbdc96f2ae3300557 /drivers/media/platform/coda/coda-common.c
parentcb1d3a336371e35c3920cc50a701c5403c255644 (diff)
[media] coda: store bitstream buffer position with buffer metadata
Storing the buffer position in the bitstream with the buffer metadata allows to later use that information to drop metadata for skipped buffers and to determine whether bitstream padding has to be applied. This patch also renames struct coda_timestamp to struct coda_buffer_meta to make clear that it contains more than only the buffer timestamp. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/platform/coda/coda-common.c')
-rw-r--r--drivers/media/platform/coda/coda-common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 76b80d27a135..6eaf88e88862 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1279,14 +1279,14 @@ static void coda_stop_streaming(struct vb2_queue *q)
}
if (!ctx->streamon_out && !ctx->streamon_cap) {
- struct coda_timestamp *ts;
+ struct coda_buffer_meta *meta;
mutex_lock(&ctx->bitstream_mutex);
- while (!list_empty(&ctx->timestamp_list)) {
- ts = list_first_entry(&ctx->timestamp_list,
- struct coda_timestamp, list);
- list_del(&ts->list);
- kfree(ts);
+ while (!list_empty(&ctx->buffer_meta_list)) {
+ meta = list_first_entry(&ctx->buffer_meta_list,
+ struct coda_buffer_meta, list);
+ list_del(&meta->list);
+ kfree(meta);
}
mutex_unlock(&ctx->bitstream_mutex);
kfifo_init(&ctx->bitstream_fifo,
@@ -1642,7 +1642,7 @@ static int coda_open(struct file *file)
ctx->bitstream.vaddr, ctx->bitstream.size);
mutex_init(&ctx->bitstream_mutex);
mutex_init(&ctx->buffer_mutex);
- INIT_LIST_HEAD(&ctx->timestamp_list);
+ INIT_LIST_HEAD(&ctx->buffer_meta_list);
coda_lock(ctx);
list_add(&ctx->list, &dev->instances);