From: Andrzej Hajda <a.hajda@samsung.com>
To: Kamil Debski <k.debski@samsung.com>, linux-media@vger.kernel.org
Cc: Jeongtae Park <jtp.park@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Andrzej Hajda <a.hajda@samsung.com>
Subject: [PATCH 2/3] s5p-mfc: v4l2 controls setup routine moved to initialization code
Date: Tue, 28 May 2013 09:26:15 +0200 [thread overview]
Message-ID: <1369725976-7828-3-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1369725976-7828-1-git-send-email-a.hajda@samsung.com>
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: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 4f6b553..64bb31e 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1760,7 +1760,6 @@ static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count)
struct s5p_mfc_ctx *ctx = fh_to_ctx(q->drv_priv);
struct s5p_mfc_dev *dev = ctx->dev;
- v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
/* If context is ready then dev = work->data;schedule it to run */
if (s5p_mfc_ctx_ready(ctx))
set_work_bit_irqsave(ctx);
@@ -1920,6 +1919,7 @@ int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx)
if (controls[i].is_volatile && ctx->ctrls[i])
ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE;
}
+ v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
return 0;
}
--
1.8.1.2
next prev parent reply other threads:[~2013-05-28 7:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 7:26 [PATCH 0/3] s5p-mfc encoder fixes Andrzej Hajda
2013-05-28 7:26 ` [PATCH 1/3] s5p-mfc: separate encoder parameters for h264 and mpeg4 Andrzej Hajda
2013-05-28 8:31 ` Sachin Kamat
2013-05-28 9:11 ` Andrzej Hajda
2013-05-28 7:26 ` Andrzej Hajda [this message]
2013-05-28 7:26 ` [PATCH 3/3] s5p-mfc: added missing end-of-lines in debug messages Andrzej Hajda
2013-05-28 8:42 ` Sachin Kamat
2013-05-28 9:38 ` Andrzej Hajda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369725976-7828-3-git-send-email-a.hajda@samsung.com \
--to=a.hajda@samsung.com \
--cc=jtp.park@samsung.com \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox