mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
[media] coda: fix job_ready debug reporting for bitstream decoding
Clarify whether job_ready returns false because the context is on hold, waiting for new input buffers, whether there are not enough input buffers to fill two into the bitstream, or whether there is not enough data in the bitstream buffer for the bitstream reader hardware to read a whole frame. 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>
This commit is contained in:
parent
83f31c8a5f
commit
f77fd8a9b1
@ -939,15 +939,43 @@ static int coda_job_ready(void *m2m_priv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->hold ||
|
if (ctx->inst_type == CODA_INST_DECODER) {
|
||||||
((ctx->inst_type == CODA_INST_DECODER) &&
|
struct list_head *meta;
|
||||||
!v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) &&
|
bool stream_end;
|
||||||
(coda_get_bitstream_payload(ctx) < 512) &&
|
int num_metas;
|
||||||
!(ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG))) {
|
int src_bufs;
|
||||||
v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev,
|
|
||||||
"%d: not ready: not enough bitstream data.\n",
|
if (ctx->hold && !v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx)) {
|
||||||
ctx->idx);
|
v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev,
|
||||||
return 0;
|
"%d: not ready: on hold for more buffers.\n",
|
||||||
|
ctx->idx);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
stream_end = ctx->bit_stream_param &
|
||||||
|
CODA_BIT_STREAM_END_FLAG;
|
||||||
|
|
||||||
|
num_metas = 0;
|
||||||
|
list_for_each(meta, &ctx->buffer_meta_list)
|
||||||
|
num_metas++;
|
||||||
|
|
||||||
|
src_bufs = v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx);
|
||||||
|
|
||||||
|
if (!stream_end && (num_metas + src_bufs) < 2) {
|
||||||
|
v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev,
|
||||||
|
"%d: not ready: need 2 buffers available (%d, %d)\n",
|
||||||
|
ctx->idx, num_metas, src_bufs);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) &&
|
||||||
|
!stream_end && (coda_get_bitstream_payload(ctx) < 512)) {
|
||||||
|
v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev,
|
||||||
|
"%d: not ready: not enough bitstream data (%d).\n",
|
||||||
|
ctx->idx, coda_get_bitstream_payload(ctx));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->aborting) {
|
if (ctx->aborting) {
|
||||||
|
Loading…
Reference in New Issue
Block a user