diff options
author | Archit Taneja <archit@ti.com> | 2014-01-15 15:31:51 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-07 16:41:37 +0400 |
commit | db476163da7b53433ea1c4080625fa56daf6fdda (patch) | |
tree | 424ccf7708da9b7fffbb688dc891bd0a58d10402 /drivers/media | |
parent | c9af5c154233446e8b97a1febef80e8afc568ab1 (diff) | |
download | linux-db476163da7b53433ea1c4080625fa56daf6fdda.tar.xz |
[media] v4l: ti-vpe: Make sure in job_ready that we have the needed number of dst_bufs
VPE has a ctrl parameter which decides how many mem to mem transactions the
active job from the job queue can perform.
The driver's job_ready() made sure that the number of ready source buffers are
sufficient for the job to execute successfully. But it didn't make sure if
there are sufficient ready destination buffers in the capture queue for the
VPE output.
If the time taken by VPE to process a single frame is really slow, then it's
possible that we don't need to imply such a restriction on the dst queue, but
really fast transactions(small resolution, no de-interlacing) may cause us to
hit the condition where we don't have any free buffers for the VPE to write on.
Add the extra check in job_ready() to make sure we have the sufficient amount
of destination buffers.
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/ti-vpe/vpe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 7a77a5b7a075..f3143ac424a7 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -887,6 +887,9 @@ static int job_ready(void *priv) if (v4l2_m2m_num_src_bufs_ready(ctx->m2m_ctx) < needed) return 0; + if (v4l2_m2m_num_dst_bufs_ready(ctx->m2m_ctx) < needed) + return 0; + return 1; } |