From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Benoit Parrot <bparrot@ti.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [Patch v5 1/2] media: v4l: ti-vpe: Add CAL v4l2 camera capture driver
Date: Tue, 15 Dec 2015 13:52:45 -0200 [thread overview]
Message-ID: <20151215135245.4d78f8a8@recife.lan> (raw)
In-Reply-To: <20151211221633.GF1517@ti.com>
Em Fri, 11 Dec 2015 16:16:33 -0600
Benoit Parrot <bparrot@ti.com> escreveu:
> Mauro Carvalho Chehab <mchehab@osg.samsung.com> wrote on Thu [2015-Dec-03 11:19:22 -0200]:
> > Em Wed, 18 Nov 2015 14:47:11 -0600
> > Benoit Parrot <bparrot@ti.com> escreveu:
> >
> > > The Camera Adaptation Layer (CAL) is a block which consists of a dual
> > > port CSI2/MIPI camera capture engine.
> > > Port #0 can handle CSI2 camera connected to up to 4 data lanes.
> > > Port #1 can handle CSI2 camera connected to up to 2 data lanes.
> > > The driver implements the required API/ioctls to be V4L2 compliant.
> > > Driver supports the following:
> > > - V4L2 API using DMABUF/MMAP buffer access based on videobuf2 api
> > > - Asynchronous sensor sub device registration
> >
> > Please see the comments I did for the git pull request. Additionally,
> > see below.
>
> Yes I'll take care of the comments about the MAINTAINERS mods and patch order.
>
> However I do have a few question on your comments, see below.
(removed the code that was already agreed or that Hans commented)
> > >
> > > +/* register field read/write helpers */
> > > +static inline int get_field(u32 value, u32 mask, int shift)
> > > +{
> > > + return (value & (mask << shift)) >> shift;
> > > +}
> >
> > Please use the macros defined at bitmap.h instead of writing your own
> > version of it.
>
> Not exactly sure what you meant here.
>
> Did you mean bitops.h instead as in change read_field() and write_field()
> to use __ffs or something like that?
>
> If that is the case then I would have to change all of the bit mask and shift
> macros in cal_regs.h before I do that I want to make sure we are on the same
> page.
Yes, i mean include/linux/bitops.h.
There are several things that you dould use to simplify it using some
definitions there (and not only __ffs).
See those macros, for example:
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
/*
* Create a contiguous bitmask starting at bit position @l and ending at
* position @h. For example
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
*/
#define GENMASK(h, l) \
(((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
#define GENMASK_ULL(h, l) \
(((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
Regards,
Mauro
next prev parent reply other threads:[~2015-12-15 15:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 20:47 [Patch v5 0/2] media: v4l: ti-vpe: Add CAL v4l2 camera capture driver Benoit Parrot
2015-11-18 20:47 ` [Patch v5 1/2] " Benoit Parrot
[not found] ` <1447879632-22635-2-git-send-email-bparrot-l0cyMroinI0@public.gmane.org>
2015-12-03 13:19 ` Mauro Carvalho Chehab
[not found] ` <20151203111922.7b9bb226-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org>
2015-12-11 22:16 ` Benoit Parrot
[not found] ` <20151211221633.GF1517-l0cyMroinI0@public.gmane.org>
2015-12-14 14:41 ` Hans Verkuil
2015-12-15 15:52 ` Mauro Carvalho Chehab [this message]
2015-11-18 20:47 ` [Patch v5 2/2] media: v4l: ti-vpe: Document DRA72 CAL h/w module Benoit Parrot
2015-11-19 14:51 ` Rob Herring
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=20151215135245.4d78f8a8@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=bparrot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).