linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Shaik Ameer Basha <ameersk@gmail.com>
Cc: Shaik Ameer Basha <shaik.ameer@samsung.com>,
	linux-media@vger.kernel.org, sungchun.kang@samsung.com,
	khw0178.kim@samsung.com, sy0816.kang@samsung.com,
	s.nawrocki@samsung.com, posciak@google.com,
	alim.akhtar@gmail.com, prashanth.g@samsung.com,
	joshi@samsung.com
Subject: Re: [PATCH v2 01/01] media: gscaler: Add new driver for generic scaler
Date: Mon, 23 Jul 2012 20:35:39 +0200	[thread overview]
Message-ID: <500D997B.9060606@gmail.com> (raw)
In-Reply-To: <CAFSwF2f7QmdgYM_PEU7ZqFezOx2nj4gSRKo+pedseaJZw_8sVA@mail.gmail.com>

Hi Shaik,

On 07/23/2012 08:18 AM, Shaik Ameer Basha wrote:
>>> +struct gsc_fmt *find_fmt(u32 *pixelformat, u32 *mbus_code, int index)
>>> +{
>>> +     struct gsc_fmt *fmt, *def_fmt = NULL;
>>> +     unsigned int i;
>>> +
>>> +     if (index>= ARRAY_SIZE(gsc_formats))
>>
>>          if (index>= (int)ARRAY_SIZE(gsc_formats))
> 
> changed the function prototype to take "u32 index"....

Yeah, that's fine too, since you seem not to be passing negative values
as the third argument to this function.

>>
>> (otherwise negative indexes won't work)
>>
>>> +             return NULL;
>>> +
>>> +     for (i = 0; i<   ARRAY_SIZE(gsc_formats); ++i) {
>>> +             fmt = get_format(i);
>>> +             if (pixelformat&&   fmt->pixelformat == *pixelformat)
>>> +                     return fmt;
>>> +             if (mbus_code&&   fmt->mbus_code == *mbus_code)
>>> +                     return fmt;
>>> +             if (index == i)
>>> +                     def_fmt = fmt;
>>> +     }
>>> +     return def_fmt;
>>> +
>>> +}
...
>>> +     cap->capabilities = V4L2_CAP_STREAMING |
>>> +             V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>>
>> Need to set device_caps as well:
>>
>>   cap->device_caps = V4L2_CAP_STREAMING |
>>                      V4L2_CAP_VIDEO_CAPTURE_MPLANE |
>>                      V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>>
>>   cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
>>
> 
> OK. I will change that.
> 
>>
>> Howewer this will probably need to be
>>
>>   cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE;
>>
>> as per http://www.mail-archive.com/linux-media@vger.kernel.org/msg48498.html
>> by the time this patch is to be merged (v3.7 ?).
>>
> 
> currently my plan is to merge these changes in v3.6.
> Isn't it possible ????

I presume it's still possible. It depends how quick you resolve all
issues pointed out during reviews. However v3.6 merge window has already
opened. So you should probably send the pull request this week at the 
latest. And don't worry too much about the new M2M capability flag.

However, there was previously a rule that everything for next release
must be pushed to the -next tree before a merge window opens.
If this is still in force then it's already too late.

I would suggest to address the review comments and to send a pull 
request to Mauro and let him decide if he pulls it for 3.6 or not.

Here is some more details regarding patch submitting rules:
http://linuxtv.org/wiki/index.php/Maintaining_Git_trees

>>> +     return 0;
>>> +}
>>> +
>> [...]
>>> +static int gsc_m2m_g_selection(struct file *file, void *fh,
>>> +                     struct v4l2_selection *s)
>>> +{
>>> +     struct gsc_frame *frame;
>>> +     struct gsc_ctx *ctx = fh_to_ctx(fh);
>>> +
>>> +     if ((s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)&&
>>> +         (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE))
>>> +             return -EINVAL;
>>> +
>>> +     frame = ctx_get_frame(ctx, s->type);
>>> +     if (IS_ERR(frame))
>>> +             return PTR_ERR(frame);
>>> +
>>> +     switch (s->target) {
>>> +     case V4L2_SEL_TGT_COMPOSE_DEFAULT:
>>> +     case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>>> +     case V4L2_SEL_TGT_CROP_BOUNDS:
>>> +     case V4L2_SEL_TGT_CROP_DEFAULT:
>>> +             s->r.left = 0;
>>> +             s->r.top = 0;
>>> +             s->r.width = frame->f_width;
>>> +             s->r.height = frame->f_height;
>>> +             return 0;
>>> +
>>> +     case V4L2_SEL_TGT_COMPOSE_ACTIVE:
>>> +     case V4L2_SEL_TGT_CROP_ACTIVE:
>>
>> Please use V4L2_SEL_TGT_CROP/COMPOSE instead of V4L2_SEL_TGT_CROP/COMPOSE_ACTIVE
>> which is being phased out.
>>
>> http://git.linuxtv.org/media_tree.git/commit/c133482300113b3b71fa4a1fd2118531e765b36a
>>
> 
> currently, I am rebasing the code on media-next git...
> http://linuxtv.org/git/mchehab/media-next.git
> 
> I am not able to find the above changes mentioned in this git...
> do you want me to rebase my code on top of the patch you provided ????
> 
> Or should i use any other git repository for rebasing my code ???

The proper tree you should base your patches of off for next kernel
release is:

git://linuxtv.org/media_tree.git
branch: staging/for_v{N + 0.1}, where N is current kernel release.

So in your case staging/for_v3.6. You'll find there the changes 
I talked about previously and other patches queued up for v3.6.

More details can be found here:
http://git.linuxtv.org/media_tree.git

--

Regards,
Sylwester

      reply	other threads:[~2012-07-23 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 10:27 [PATCH v2 00/01] Add new driver for generic scaler Shaik Ameer Basha
2012-07-05 10:27 ` [PATCH v2 01/01] media: gscaler: " Shaik Ameer Basha
2012-07-11 17:52   ` Pawel Osciak
2012-07-24  9:30     ` Shaik Ameer Basha
2012-07-11 22:39   ` Sylwester Nawrocki
2012-07-11 23:44     ` Sylwester Nawrocki
2012-07-12 19:09   ` Sylwester Nawrocki
2012-07-23  6:18     ` Shaik Ameer Basha
2012-07-23 18:35       ` Sylwester Nawrocki [this message]

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=500D997B.9060606@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=alim.akhtar@gmail.com \
    --cc=ameersk@gmail.com \
    --cc=joshi@samsung.com \
    --cc=khw0178.kim@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=posciak@google.com \
    --cc=prashanth.g@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=shaik.ameer@samsung.com \
    --cc=sungchun.kang@samsung.com \
    --cc=sy0816.kang@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;
as well as URLs for NNTP newsgroup(s).