PD#SWPL-38455
Problem:
When decoder ES chunk is full, aml_vdec_worker can get next source
buffer but can't not decoder it with vdec_if_decode(). But it will
trigger v4l2_m2m_job_finish() and do another try immediately. This
is a busy loop.
Solution:
Sleep for 50ms when ES chun is full.
Verify:
T5D + TRC
Change-Id: Ide6163242075981c769d6381ecf7edebe7837b4f
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
aml_vdec_flush_decoder(ctx);
goto out;
+ } else {
+ /* decoder is lack of resource, retry after short delay */
+ usleep_range(50000, 55000);
}
v4l2_m2m_job_finish(dev->m2m_dev_dec, ctx->m2m_ctx);