diff options
author | Nikhil Devshatwar <nikhil.nd@ti.com> | 2015-01-15 13:36:36 +0530 |
---|---|---|
committer | Jyri Sarha <jsarha@ti.com> | 2015-01-30 15:11:15 +0200 |
commit | 6b855d7960ed607c194ccbc10baa68805fdbe3c9 (patch) | |
tree | 3a5eaf86ac30ed6836f04e05ab224bad2599c173 | |
parent | 33a48623461b464d5520bfb8ac1f3d52d942d9a1 (diff) |
media: ti-vpe: vpe: Setup srcdst parameters in streamON
For deinterlacing operation, each operation needs 2 fields in the history.
This is achieved by holding three buffers in ctx->src_vbs[0,1,2] (f,f-1,f-2)
This is achieved by using the ctx->sequence which gets reset via the s_fmt ioctl.
These buffers are dequeded in stream OFF by calling free_vbs()
But the corresponding references aren't removed anywhere.
When application tries to stream ON and OFF continuously, s_fmt ioctl won't
be called and it won't setup the srcdst parameters.
Setting source/destination parameters in stream ON ioctl would make sure that
the context is re-initialized before it is being used by the driver.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Acked-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
-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 cc87a798f8b..e76a47a904b 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -876,6 +876,7 @@ static int set_srcdst_params(struct vpe_ctx *ctx) } free_vbs(ctx); + ctx->src_vbs[2] = ctx->src_vbs[1] = ctx->src_vbs[0] = NULL; ret = realloc_mv_buffers(ctx, mv_buf_size); if (ret) @@ -1897,6 +1898,8 @@ static int vpe_streamon(struct file *file, void *priv, enum v4l2_buf_type type) if (ctx->deinterlacing) config_edi_input_mode(ctx, 0x0); + if (ctx->sequence != 0) + set_srcdst_params(ctx); return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); } |