All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/2] [media] imx214: Add imx214 camera sensor driver
Date: Wed, 26 Sep 2018 07:26:24 +0200	[thread overview]
Message-ID: <CAPybu_3WF3x42k814dvEwqrMMfaxt2s4OpuK3BGMobBfmsgQ5Q@mail.gmail.com> (raw)
In-Reply-To: <20180924203252.wxeclgjc7zvepyhb@kekkonen.localdomain>

Hello Sakari
On Mon, Sep 24, 2018 at 10:32 PM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> Hi Ricardo,
>
> On Fri, Sep 21, 2018 at 12:15:55PM +0200, Ricardo Ribalda Delgado wrote:
> ...
> > > > +static struct reg_8 mode_1920x1080[];
> > > > +static struct reg_8 mode_4096x2304[];
> > >
> > > Const. Could you rearrange the bits to avoid the forward declarations?
> > Const done, but I prefer to keep the forward declaration. Otherwise
> > the long tables will "hide" the mode declaration.
>
> Well, I guess the long tables do "hide" a bunch of other stuff, too. :-)
> But... I agree there's no trivial way around those tables either.
>
> It appears I'm not the only one who's commented on the matter of the
> forward declaration.

Ok, I will change it, Eppur si muove  ;)
>
> ...
>
> > > > +static int imx214_probe(struct i2c_client *client)
> > > > +{
> > > > +     struct device *dev = &client->dev;
> > > > +     struct imx214 *imx214;
> > > > +     struct fwnode_handle *endpoint;
> > > > +     int ret;
> > > > +     static const s64 link_freq[] = {
> > > > +             (IMX214_DEFAULT_PIXEL_RATE * 10LL) / 8,
> > >
> > > You should check the link frequency matches with that from the firmware.
> >
> > I am not sure what you mean here sorry.
>
> The system firmware holds safe frequencies for the CSI-2 bus on that
> particular system; you should check that the register lists are valid for
> that frequency.
>
> ...
>
> > > > +     imx214->pixel_rate = v4l2_ctrl_new_std(&imx214->ctrls, NULL,
> > > > +                                            V4L2_CID_PIXEL_RATE, 0,
> > > > +                                            IMX214_DEFAULT_PIXEL_RATE, 1,
> > > > +                                            IMX214_DEFAULT_PIXEL_RATE);
> > > > +     imx214->link_freq = v4l2_ctrl_new_int_menu(&imx214->ctrls, NULL,
> > > > +                                                V4L2_CID_LINK_FREQ,
> > > > +                                                ARRAY_SIZE(link_freq) - 1,
> > > > +                                                0, link_freq);
> > >
> > > Do I understand this correctly that the driver does not support setting
> > > e.g. exposure time or gain? Those are very basic features...
> >
> >
> > Yep :), this is just a first step. I do not have the register set from
> > the device :(. So I am reverse engineering a lot of things.
> > I will add more controls as I am done with them.
>
> Looking at the registers you have in the register list, the sensor's
> registers appear similar to those used by the smiapp driver (the old SMIA
> standard).
>
> I'd guess the same register would work for setting the exposure time. I'm
> less certain about the limits though.

Thanks for the pointer! I will try this out and probably add it as a patch.

>
> >
> > >
> > > You'll also need to ensure the s_ctrl() callback works without s_power()
> > > being called. My suggestion is to switch to PM runtime; see e.g. the ov1385
> > > driver in the current media tree master.
> >
> >
> > There is one limitation with this chip on the dragonboard. I2c only
> > works if the camss is ON. Therefore whatever s_ctrl needs to be
> > cached and written at streamon.
>
> That's something that doesn't belong to this driver. It's the I涎 adapter
> driver / camss issue, and not necessarily related to drivers only. Is the
> I涎 controller part of the camss btw.?

I am with you here. The i2c controller is a different driver but is
integrated with camss. Checkout
https://patchwork.kernel.org/patch/10569961/ I am interacting with
Todor and Vinod to enable the i2c port indepently with camss. At least
now it does not kill the port after an i2c timeout :)

Will fix the fwd declaration and the csi-2 register. Then I wll upload
it to my github, try it on real hw next monday and send back to the
mailing list

Thanks!

>
> --
> Regards,
>
> Sakari Ailus
> sakari.ailus@linux.intel.com



-- 
Ricardo Ribalda

  reply	other threads:[~2018-09-26  5:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  8:54 [PATCH 1/2] [media] imx214: Add imx214 camera sensor driver Ricardo Ribalda Delgado
2018-09-21  8:54 ` [PATCH 2/2] [media] imx214: device tree binding Ricardo Ribalda Delgado
2018-09-21  9:28 ` [PATCH 1/2] [media] imx214: Add imx214 camera sensor driver Sakari Ailus
2018-09-21 10:15   ` Ricardo Ribalda Delgado
2018-09-24 20:32     ` Sakari Ailus
2018-09-26  5:26       ` Ricardo Ribalda Delgado [this message]
2018-09-26  6:06         ` Ricardo Ribalda Delgado
2018-09-26  7:54           ` Sakari Ailus

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=CAPybu_3WF3x42k814dvEwqrMMfaxt2s4OpuK3BGMobBfmsgQ5Q@mail.gmail.com \
    --to=ricardo.ribalda@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=sakari.ailus@linux.intel.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.