From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, mchehab@infradead.org,
kyungmin.park@samsung.com, k.debski@samsung.com,
patches@linaro.org
Subject: Re: [PATCH v3] [media] s5p-g2d: Add HFLIP and VFLIP support
Date: Wed, 01 Feb 2012 10:01:18 +0100 [thread overview]
Message-ID: <4F28FF5E.30407@samsung.com> (raw)
In-Reply-To: <1328072989-12498-1-git-send-email-sachin.kamat@linaro.org>
Hi Sachin,
On 02/01/2012 06:09 AM, Sachin Kamat wrote:
> @@ -200,11 +206,7 @@ int g2d_setup_ctrls(struct g2d_ctx *ctx)
> {
> struct g2d_dev *dev = ctx->dev;
>
> - v4l2_ctrl_handler_init(&ctx->ctrl_handler, 1);
> - if (ctx->ctrl_handler.error) {
> - v4l2_err(&dev->v4l2_dev, "v4l2_ctrl_handler_init failed\n");
> - return ctx->ctrl_handler.error;
> - }
> + v4l2_ctrl_handler_init(&ctx->ctrl_handler, 3);
>
> v4l2_ctrl_new_std_menu(
> &ctx->ctrl_handler,
> @@ -214,11 +216,20 @@ int g2d_setup_ctrls(struct g2d_ctx *ctx)
> ~((1 << V4L2_COLORFX_NONE) | (1 << V4L2_COLORFX_NEGATIVE)),
> V4L2_COLORFX_NONE);
>
> +
> + ctx->ctrl_hflip = v4l2_ctrl_new_std(&ctx->ctrl_handler, &g2d_ctrl_ops,
> + V4L2_CID_HFLIP, 0, 1, 1, 0);
> +
> + ctx->ctrl_vflip = v4l2_ctrl_new_std(&ctx->ctrl_handler, &g2d_ctrl_ops,
> + V4L2_CID_VFLIP, 0, 1, 1, 0);
> +
> if (ctx->ctrl_handler.error) {
> v4l2_err(&dev->v4l2_dev, "v4l2_ctrl_handler_init failed\n");
It's not only v4l2_ctrl_handler_init() that might have failed at this point,
therefore you need to also call v4l2_ctrl_handler_free() here. There is an
example of that in Documentation/v4l2-controls.txt.
> return ctx->ctrl_handler.error;
> }
--
Thanks,
Sylwester
next prev parent reply other threads:[~2012-02-01 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 5:09 [PATCH v3] [media] s5p-g2d: Add HFLIP and VFLIP support Sachin Kamat
2012-02-01 9:01 ` Sylwester Nawrocki [this message]
2012-02-01 9:03 ` Sachin Kamat
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=4F28FF5E.30407@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=patches@linaro.org \
--cc=sachin.kamat@linaro.org \
/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