From: Benoit Parrot <bparrot@ti.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: "Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
"Cyprian Wronka" <cwronka@cadence.com>,
"Neil Webb" <neilw@cadence.com>,
"Richard Sproul" <sproul@cadence.com>,
"Alan Douglas" <adouglas@cadence.com>,
"Steve Creaney" <screaney@cadence.com>,
"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
"Boris Brezillon" <boris.brezillon@free-electrons.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v3 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver
Date: Tue, 12 Sep 2017 14:13:12 -0500 [thread overview]
Message-ID: <20170912191312.GB27713@ti.com> (raw)
In-Reply-To: <20170912182339.GA27713@ti.com>
Benoit Parrot <bparrot@ti.com> wrote on Tue [2017-Sep-12 13:23:39 -0500]:
<snip>
> > +static int csi2rx_start(struct csi2rx_priv *csi2rx)
> > +{
> > + unsigned int i;
> > + u32 reg;
> > + int ret;
> > +
> > + /*
> > + * We're not the first users, there's no need to enable the
> > + * whole controller.
> > + */
> > + if (atomic_inc_return(&csi2rx->count) > 1)
> > + return 0;
> > +
> > + clk_prepare_enable(csi2rx->p_clk);
> > +
> > + printk("%s %d\n", __func__, __LINE__);
>
> Some left over debug...
>
> > +
> > + csi2rx_reset(csi2rx);
> > +
> > + reg = csi2rx->num_lanes << 8;
> > + for (i = 0; i < csi2rx->num_lanes; i++)
> > + reg |= CSI2RX_STATIC_CFG_DLANE_MAP(i, csi2rx->lanes[i]);
> > +
> > + writel(reg, csi2rx->base + CSI2RX_STATIC_CFG_REG);
> > +
> > + ret = v4l2_subdev_call(csi2rx->source_subdev, video, s_stream, true);
> > + if (ret)
> > + return ret;
> > +
> > + /*
> > + * Create a static mapping between the CSI virtual channels
> > + * and the output stream.
> > + *
> > + * This should be enhanced, but v4l2 lacks the support for
> > + * changing that mapping dynamically.
> > + *
> > + * We also cannot enable and disable independant streams here,
> > + * hence the reference counting.
> > + */
> > + for (i = 0; i < csi2rx->max_streams; i++) {
> > + clk_prepare_enable(csi2rx->pixel_clk[i]);
> > +
> > + writel(CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF,
> > + csi2rx->base + CSI2RX_STREAM_CFG_REG(i));
> > +
> > + writel(CSI2RX_STREAM_DATA_CFG_EN_VC_SELECT |
> > + CSI2RX_STREAM_DATA_CFG_VC_SELECT(i),
> > + csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i));
I see here that we are setting the data_type to 0 (as we are not setting
it) so effectively capturing everything on the channel(s).
Will we be adding a method to select/filter specific data type?
For instance if we only want to grab YUV data in one stream and only
RGB24 in another. Of course that would not be possible here as is...
Benoit
> > +
> > + writel(CSI2RX_STREAM_CTRL_START,
> > + csi2rx->base + CSI2RX_STREAM_CTRL_REG(i));
> > + }
> > +
> > + clk_prepare_enable(csi2rx->sys_clk);
> > +
> > + clk_disable_unprepare(csi2rx->p_clk);
> > +
> > + return 0;
> > +}
<snip>
next prev parent reply other threads:[~2017-09-12 19:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 13:03 [PATCH v3 0/2] media: v4l: Add support for the Cadence MIPI-CSI2 RX Maxime Ripard
2017-09-04 13:03 ` [PATCH v3 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 RX Device Tree bindings Maxime Ripard
2017-09-05 14:46 ` Sakari Ailus
2017-09-14 18:40 ` Laurent Pinchart
2017-09-04 13:03 ` [PATCH v3 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver Maxime Ripard
2017-09-12 18:23 ` Benoit Parrot
2017-09-12 19:13 ` Benoit Parrot [this message]
2017-09-14 11:57 ` Maxime Ripard
2017-09-14 11:54 ` Maxime Ripard
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=20170912191312.GB27713@ti.com \
--to=bparrot@ti.com \
--cc=adouglas@cadence.com \
--cc=boris.brezillon@free-electrons.com \
--cc=cwronka@cadence.com \
--cc=devicetree@vger.kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=mchehab@kernel.org \
--cc=neilw@cadence.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=screaney@cadence.com \
--cc=sproul@cadence.com \
--cc=thomas.petazzoni@free-electrons.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