Re: [PATCH v3] [media] s5p-g2d: Add HFLIP and VFLIP support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sylwester,



On 1 February 2012 14:31, Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> wrote:
> 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.

Thank you for pointing it out.

>
>>               return ctx->ctrl_handler.error;
>>       }
>
> --
>
> Thanks,
> Sylwester



-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux