Commit 69c9fe6f authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Mauro Carvalho Chehab

[media] s5p-mfc: v4l2 controls setup routine moved to initialization code

Callback .start_streaming is called once for every queue,
so v4l2_ctrl_handler_setup was called twice during stream start.
Moving v4l2_ctrl_handler_setup to context initialization
reduces numbers of calls and seems to be more consistent with API.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ac5f867f
...@@ -1789,7 +1789,6 @@ static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count) ...@@ -1789,7 +1789,6 @@ static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count)
} }
} }
v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
/* If context is ready then dev = work->data;schedule it to run */ /* If context is ready then dev = work->data;schedule it to run */
if (s5p_mfc_ctx_ready(ctx)) if (s5p_mfc_ctx_ready(ctx))
set_work_bit_irqsave(ctx); set_work_bit_irqsave(ctx);
...@@ -1950,6 +1949,7 @@ int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx) ...@@ -1950,6 +1949,7 @@ int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx)
if (controls[i].is_volatile && ctx->ctrls[i]) if (controls[i].is_volatile && ctx->ctrls[i])
ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE; ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE;
} }
v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment