From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
"Mauro Carvalho Chehab" <mchehab@infradead.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Guennadi Liakhovetski" <g.liakhovetski@gmx.de>,
"Mats Randgaard" <matrandg@cisco.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Bhumika Goyal" <bhumirks@gmail.com>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Julia Lawall" <Julia.Lawall@lip6.fr>,
"Fabio Estevam" <fabio.estevam@nxp.com>,
"Janusz Krzysztofik" <jmkrzyszt@gmail.com>,
"Markus Elfring" <elfring@users.sourceforge.net>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
"Petr Cvek" <petr.cvek@tul.cz>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Sebastian Reichel" <sre@kernel.org>,
"Tomasz Figa" <tfiga@chromium.org>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 5/8] media: v4l2-mediabus: convert flags to enums and document them
Date: Tue, 19 Dec 2017 09:11:38 -0200 [thread overview]
Message-ID: <20171219091138.51dc1e0d@vento.lan> (raw)
In-Reply-To: <1513675815.7538.4.camel@pengutronix.de>
Em Tue, 19 Dec 2017 10:30:15 +0100
Philipp Zabel <p.zabel@pengutronix.de> escreveu:
> Hi Mauro,
>
> On Mon, 2017-12-18 at 17:53 -0200, Mauro Carvalho Chehab wrote:
> > There is a mess with media bus flags: there are two sets of
> > flags, one used by parallel and ITU-R BT.656 outputs,
> > and another one for CSI2.
> >
> > Depending on the type, the same bit has different meanings.
> >
> > That's very confusing, and counter-intuitive. So, split them
> > into two sets of flags, inside an enum.
> >
> > This way, it becomes clearer that there are two separate sets
> > of flags. It also makes easier if CSI1, CSP, CSI3, etc. would
> > need a different set of flags.
> >
> > As a side effect, enums can be documented via kernel-docs,
> > so there will be an improvement at flags documentation.
> >
> > Unfortunately, soc_camera and pxa_camera do a mess with
> > the flags, using either one set of flags without proper
> > checks about the type. That could be fixed, but, as both drivers
> > are obsolete and in the process of cleanings, I opted to just
> > keep the behavior, using an unsigned int inside those two
> > drivers.
> >
> > Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
>
> If I am not mistaken this is missing a conversion of
> drivers/staging/media/imx/imx-media-csi.c:
>
> --------8<--------
> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> index eb7be5093a9d5..b1daac3a537d9 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -636,9 +636,10 @@ static int csi_setup(struct csi_priv *priv)
>
> /* compose mbus_config from the upstream endpoint */
> mbus_cfg.type = priv->upstream_ep.bus_type;
> - mbus_cfg.flags = (priv->upstream_ep.bus_type == V4L2_MBUS_CSI2) ?
> - priv->upstream_ep.bus.mipi_csi2.flags :
> - priv->upstream_ep.bus.parallel.flags;
> + if (priv->upstream_ep.bus_type == V4L2_MBUS_CSI2)
> + mbus_cfg.csi2_flags = priv->upstream_ep.bus.mipi_csi2.flags;
> + else
> + mbus_cfg.pb_flags = priv->upstream_ep.bus.parallel.flags;
>
> /*
> * we need to pass input frame to CSI interface, but
Oh, thanks for noticing! I really hate having drivers that don't
build with COMPILE_TEST, as that makes a lot harder to check if
something broke.
Thanks,
Mauro
next prev parent reply other threads:[~2017-12-19 11:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 19:53 [PATCH 0/8] Some V4L2 documentation pending patches Mauro Carvalho Chehab
2017-12-18 19:53 ` [PATCH 1/8] media: v4l2-device.h: document helper macros Mauro Carvalho Chehab
2017-12-18 19:53 ` [PATCH 2/8] media: v4l2-ioctl.h: convert debug into an enum of bits Mauro Carvalho Chehab
2017-12-19 11:39 ` Sakari Ailus
2017-12-19 14:02 ` Laurent Pinchart
2017-12-19 14:05 ` Laurent Pinchart
2017-12-19 15:34 ` Mauro Carvalho Chehab
2017-12-20 10:47 ` Laurent Pinchart
2017-12-20 13:34 ` Mauro Carvalho Chehab
2017-12-19 14:12 ` Sakari Ailus
2017-12-19 15:37 ` Mauro Carvalho Chehab
2017-12-19 17:17 ` Laurent Pinchart
2017-12-19 19:20 ` Mauro Carvalho Chehab
2017-12-18 19:53 ` [PATCH 3/8] media: v4l2-async: simplify v4l2_async_subdev structure Mauro Carvalho Chehab
2017-12-18 19:53 ` Mauro Carvalho Chehab
2017-12-18 19:53 ` Mauro Carvalho Chehab
2017-12-18 20:01 ` Benoit Parrot
2017-12-18 20:01 ` Benoit Parrot
2017-12-18 20:01 ` Benoit Parrot
2017-12-18 22:27 ` Alexandre Belloni
2017-12-18 22:27 ` Alexandre Belloni
2017-12-18 22:27 ` Alexandre Belloni
2017-12-19 8:27 ` Sakari Ailus
2017-12-19 8:27 ` Sakari Ailus
2017-12-19 8:27 ` Sakari Ailus
2017-12-19 9:16 ` Philipp Zabel
2017-12-19 9:16 ` Philipp Zabel
2017-12-19 9:16 ` Philipp Zabel
2017-12-18 19:53 ` [PATCH 4/8] media: v4l2-async: better describe match union at async match struct Mauro Carvalho Chehab
2017-12-18 19:53 ` [PATCH 5/8] media: v4l2-mediabus: convert flags to enums and document them Mauro Carvalho Chehab
2017-12-19 9:30 ` Philipp Zabel
2017-12-19 11:11 ` Mauro Carvalho Chehab [this message]
2017-12-18 19:54 ` [PATCH 6/8] media: v4l2-subdev: get rid of __V4L2_SUBDEV_MK_GET_TRY() macro Mauro Carvalho Chehab
2017-12-18 19:54 ` [PATCH 7/8] media: v4l2-subdev: document remaining undocumented functions Mauro Carvalho Chehab
2017-12-18 19:54 ` [PATCH 8/8] media: v4l2-subdev: use kernel-doc markups to document subdev flags Mauro Carvalho Chehab
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=20171219091138.51dc1e0d@vento.lan \
--to=mchehab@s-opensource.com \
--cc=Julia.Lawall@lip6.fr \
--cc=arnd@arndb.de \
--cc=bhumirks@gmail.com \
--cc=elfring@users.sourceforge.net \
--cc=fabio.estevam@nxp.com \
--cc=g.liakhovetski@gmx.de \
--cc=garsilva@embeddedor.com \
--cc=hans.verkuil@cisco.com \
--cc=jmkrzyszt@gmail.com \
--cc=lars@metafoo.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=matrandg@cisco.com \
--cc=mchehab@infradead.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=p.zabel@pengutronix.de \
--cc=petr.cvek@tul.cz \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sre@kernel.org \
--cc=tfiga@chromium.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 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.