media: coda: store unmasked fifo position in meta

Storing the unmasked kfifo->in position as meta->start and ->end allows
to more easily compare a point past meta->end with the current
kfifo->in.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Philipp Zabel
2018-11-05 10:25:00 -05:00
committed by Mauro Carvalho Chehab
parent 649cfc2bdf
commit 6c0f5d236f
4 changed files with 11 additions and 13 deletions

View File

@@ -97,8 +97,8 @@ DECLARE_EVENT_CLASS(coda_buf_meta_class,
TP_fast_assign(
__entry->minor = ctx->fh.vdev->minor;
__entry->index = buf->vb2_buf.index;
__entry->start = meta->start;
__entry->end = meta->end;
__entry->start = meta->start & ctx->bitstream_fifo.kfifo.mask;
__entry->end = meta->end & ctx->bitstream_fifo.kfifo.mask;
__entry->ctx = ctx->idx;
),
@@ -127,8 +127,10 @@ DECLARE_EVENT_CLASS(coda_meta_class,
TP_fast_assign(
__entry->minor = ctx->fh.vdev->minor;
__entry->start = meta ? meta->start : 0;
__entry->end = meta ? meta->end : 0;
__entry->start = meta ? (meta->start &
ctx->bitstream_fifo.kfifo.mask) : 0;
__entry->end = meta ? (meta->end &
ctx->bitstream_fifo.kfifo.mask) : 0;
__entry->ctx = ctx->idx;
),