From: Hans Verkuil <hverkuil@xs4all.nl>
To: Shaik Ameer Basha <shaik.samsung@gmail.com>
Cc: Shaik Ameer Basha <shaik.ameer@samsung.com>,
LMML <linux-media@vger.kernel.org>,
linux-samsung-soc@vger.kernel.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
posciak@google.com, Arun Kumar K <arun.kk@samsung.com>
Subject: Re: [PATCH v2 2/5] [media] exynos-mscl: Add core functionality for the M-Scaler driver
Date: Tue, 20 Aug 2013 08:27:57 +0200 [thread overview]
Message-ID: <52130C6D.6010601@xs4all.nl> (raw)
In-Reply-To: <CAOD6ATqTz+xTqwXe0PvQq43fk4AiAdcMy-RwbOczU++dXZOyyQ@mail.gmail.com>
On 08/20/2013 07:43 AM, Shaik Ameer Basha wrote:
> + linux-media, linux-samsung-soc
>
> Hi Hans,
>
> Thanks for the review.
> Will address all your comments in v3.
>
> I have only one doubt regarding try_ctrl... (addressed inline)
>
>
> On Mon, Aug 19, 2013 at 6:36 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>>
>> On 08/19/2013 12:58 PM, Shaik Ameer Basha wrote:
>>> This patch adds the core functionality for the M-Scaler driver.
>>
>> Some more comments below...
>>
>>>
>>> Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
>>> ---
>>> drivers/media/platform/exynos-mscl/mscl-core.c | 1312 ++++++++++++++++++++++++
>>> drivers/media/platform/exynos-mscl/mscl-core.h | 549 ++++++++++
>>> 2 files changed, 1861 insertions(+)
>>> create mode 100644 drivers/media/platform/exynos-mscl/mscl-core.c
>>> create mode 100644 drivers/media/platform/exynos-mscl/mscl-core.h
>>>
>>> diff --git a/drivers/media/platform/exynos-mscl/mscl-core.c b/drivers/media/platform/exynos-mscl/mscl-core.c
>>> new file mode 100644
>>> index 0000000..4a3a851
>>> --- /dev/null
>>> +++ b/drivers/media/platform/exynos-mscl/mscl-core.c
>>> @@ -0,0 +1,1312 @@
>>> +/*
>>> + * Copyright (c) 2013 - 2014 Samsung Electronics Co., Ltd.
>>> + * http://www.samsung.com
>>> + *
>>> + * Samsung EXYNOS5 SoC series M-Scaler driver
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License as published
>>> + * by the Free Software Foundation, either version 2 of the License,
>>> + * or (at your option) any later version.
>>> + */
>>> +
>>> +#include <linux/clk.h>
>>> +#include <linux/interrupt.h>
>
> [snip]
>
>>> +
>>> +static int __mscl_s_ctrl(struct mscl_ctx *ctx, struct v4l2_ctrl *ctrl)
>>> +{
>>> + struct mscl_dev *mscl = ctx->mscl_dev;
>>> + struct mscl_variant *variant = mscl->variant;
>>> + unsigned int flags = MSCL_DST_FMT | MSCL_SRC_FMT;
>>> + int ret = 0;
>>> +
>>> + if (ctrl->flags & V4L2_CTRL_FLAG_INACTIVE)
>>> + return 0;
>>
>> Why would you want to do this check?
>
> Will remove this. seems no such check is required for this driver.
>
>>
>>> +
>>> + switch (ctrl->id) {
>>> + case V4L2_CID_HFLIP:
>>> + ctx->hflip = ctrl->val;
>>> + break;
>>> +
>>> + case V4L2_CID_VFLIP:
>>> + ctx->vflip = ctrl->val;
>>> + break;
>>> +
>>> + case V4L2_CID_ROTATE:
>>> + if ((ctx->state & flags) == flags) {
>>> + ret = mscl_check_scaler_ratio(variant,
>>> + ctx->s_frame.crop.width,
>>> + ctx->s_frame.crop.height,
>>> + ctx->d_frame.crop.width,
>>> + ctx->d_frame.crop.height,
>>> + ctx->ctrls_mscl.rotate->val);
>>> +
>>> + if (ret)
>>> + return -EINVAL;
>>> + }
>>
>> I think it would be good if the try_ctrl op is implemented so you can call
>> VIDIOC_EXT_TRY_CTRLS in the application to check if the ROTATE control can be
>> set.
>
> * @try_ctrl: Test whether the control's value is valid. Only relevant when
> * the usual min/max/step checks are not sufficient.
>
> As we support only 0,90,270 and the min, max and step can address these values,
> does it really relevant to have try_ctrl op here ???
Well, you seem to have an additional mscl_check_scaler_ratio check here that can
make it fail, in other words: the min/max/step checks aren't sufficient.
Regards,
Hans
next prev parent reply other threads:[~2013-08-20 6:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 10:58 [PATCH v2 0/5] Exynos5 M-Scaler Driver Shaik Ameer Basha
2013-08-19 10:58 ` [PATCH v2 1/5] [media] exynos-mscl: Add new driver for M-Scaler Shaik Ameer Basha
2013-08-19 12:48 ` Inki Dae
2013-08-20 8:07 ` Shaik Ameer Basha
2013-08-20 8:43 ` Inki Dae
2013-08-20 8:49 ` Shaik Ameer Basha
2013-08-26 20:45 ` Sylwester Nawrocki
2013-08-19 10:58 ` [PATCH v2 2/5] [media] exynos-mscl: Add core functionality for the M-Scaler driver Shaik Ameer Basha
2013-08-19 13:06 ` Hans Verkuil
2013-08-20 5:43 ` Shaik Ameer Basha
2013-08-20 6:27 ` Hans Verkuil [this message]
2013-08-20 7:27 ` Shaik Ameer Basha
2013-08-29 12:50 ` Sylwester Nawrocki
2013-08-19 10:58 ` [PATCH v2 3/5] [media] exynos-mscl: Add m2m " Shaik Ameer Basha
2013-08-19 12:58 ` Hans Verkuil
2013-08-19 13:07 ` Hans Verkuil
2013-08-29 13:21 ` Sylwester Nawrocki
2013-09-10 12:37 ` Shaik Ameer Basha
2013-09-11 9:36 ` Sylwester Nawrocki
2013-08-19 10:58 ` [PATCH v2 4/5] [media] exynos-mscl: Add DT bindings for " Shaik Ameer Basha
2013-08-19 12:57 ` Inki Dae
2013-08-24 22:26 ` Sylwester Nawrocki
2013-08-26 12:20 ` Shaik Ameer Basha
2013-08-26 16:21 ` Sylwester Nawrocki
2013-08-19 10:58 ` [PATCH v2 5/5] [media] exynos-mscl: Add Makefile " Shaik Ameer Basha
2013-08-29 10:12 ` Sylwester Nawrocki
2013-08-29 11:55 ` Shaik Ameer Basha
2013-08-29 16:36 ` Sylwester Nawrocki
2013-08-19 12:26 ` [PATCH v2 0/5] Exynos5 M-Scaler Driver Inki Dae
2013-08-20 5:45 ` Shaik Ameer Basha
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=52130C6D.6010601@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=arun.kk@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=posciak@google.com \
--cc=s.nawrocki@samsung.com \
--cc=shaik.ameer@samsung.com \
--cc=shaik.samsung@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.