diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-10-02 13:08:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-10-28 13:37:32 -0400 |
commit | 7cbb105feff82722206613f3e4cee3e98df827d9 (patch) | |
tree | f5d8a09735dd1afe3642a7afbdc96f2ae3300557 /drivers/media/platform/coda/coda-common.c | |
parent | cb1d3a336371e35c3920cc50a701c5403c255644 (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 <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 | 14 |
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) | |||
1279 | } | 1279 | } |
1280 | 1280 | ||
1281 | if (!ctx->streamon_out && !ctx->streamon_cap) { | 1281 | if (!ctx->streamon_out && !ctx->streamon_cap) { |
1282 | struct coda_timestamp *ts; | 1282 | struct coda_buffer_meta *meta; |
1283 | 1283 | ||
1284 | mutex_lock(&ctx->bitstream_mutex); | 1284 | mutex_lock(&ctx->bitstream_mutex); |
1285 | while (!list_empty(&ctx->timestamp_list)) { | 1285 | while (!list_empty(&ctx->buffer_meta_list)) { |
1286 | ts = list_first_entry(&ctx->timestamp_list, | 1286 | meta = list_first_entry(&ctx->buffer_meta_list, |
1287 | struct coda_timestamp, list); | 1287 | struct coda_buffer_meta, list); |
1288 | list_del(&ts->list); | 1288 | list_del(&meta->list); |
1289 | kfree(ts); | 1289 | kfree(meta); |
1290 | } | 1290 | } |
1291 | mutex_unlock(&ctx->bitstream_mutex); | 1291 | mutex_unlock(&ctx->bitstream_mutex); |
1292 | kfifo_init(&ctx->bitstream_fifo, | 1292 | kfifo_init(&ctx->bitstream_fifo, |
@@ -1642,7 +1642,7 @@ static int coda_open(struct file *file) | |||
1642 | ctx->bitstream.vaddr, ctx->bitstream.size); | 1642 | ctx->bitstream.vaddr, ctx->bitstream.size); |
1643 | mutex_init(&ctx->bitstream_mutex); | 1643 | mutex_init(&ctx->bitstream_mutex); |
1644 | mutex_init(&ctx->buffer_mutex); | 1644 | mutex_init(&ctx->buffer_mutex); |
1645 | INIT_LIST_HEAD(&ctx->timestamp_list); | 1645 | INIT_LIST_HEAD(&ctx->buffer_meta_list); |
1646 | 1646 | ||
1647 | coda_lock(ctx); | 1647 | coda_lock(ctx); |
1648 | list_add(&ctx->list, &dev->instances); | 1648 | list_add(&ctx->list, &dev->instances); |