From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sowjanya Komatineni <skomatineni@nvidia.com>,
thierry.reding@gmail.com, jonathanh@nvidia.com,
sakari.ailus@iki.fi, robh+dt@kernel.org
Cc: bparrot@ti.com, mchehab@kernel.org, linux-media@vger.kernel.org,
linux-tegra@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v3 10/13] media: v4l2-fwnode: Update V4L2_FWNODE_CSI2_MAX_DATA_LANES to 8
Date: Mon, 7 Dec 2020 11:47:38 +0100 [thread overview]
Message-ID: <845dfd4a-fa11-625c-78a3-cc8adc68bfc7@xs4all.nl> (raw)
In-Reply-To: <1607022002-26575-11-git-send-email-skomatineni@nvidia.com>
On 03/12/2020 19:59, Sowjanya Komatineni wrote:
> Some CSI2 receivers support 8 data lanes.
>
> So, this patch updates CSI2 maximum data lanes to be 8.
>
> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> ---
> drivers/media/platform/ti-vpe/cal-camerarx.c | 2 +-
> include/media/v4l2-fwnode.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti-vpe/cal-camerarx.c
> index 806cbf1..47e2143 100644
> --- a/drivers/media/platform/ti-vpe/cal-camerarx.c
> +++ b/drivers/media/platform/ti-vpe/cal-camerarx.c
> @@ -534,7 +534,7 @@ static int cal_camerarx_parse_dt(struct cal_camerarx *phy)
> {
> struct v4l2_fwnode_endpoint *endpoint = &phy->endpoint;
> struct device_node *ep_node;
> - char data_lanes[V4L2_FWNODE_CSI2_MAX_DATA_LANES * 2];
> + char data_lanes[V4L2_FWNODE_CSI2_MAX_DATA_LANES];
> unsigned int i;
> int ret;
>
I'm not so sure about this change: it relies on the implicit knowledge that
this cal driver can handle only 4 lanes max, so that doubling
V4L2_FWNODE_CSI2_MAX_DATA_LANES is the same as the old 'V4L2_FWNODE_CSI2_MAX_DATA_LANES * 2'.
I think we should either keep the existing code (which means data_lanes
is now larger than needed, so stack usage increases by 8 bytes), or perhaps
create a new define for this driver like CAL_MAX_DATA_LANES and use that.
In my opinion the original code should just be kept, but I've CC-ed Laurent
on this to hear what he thinks.
Regards,
Hans
> diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h
> index 4e1f6e1d..92401c1 100644
> --- a/include/media/v4l2-fwnode.h
> +++ b/include/media/v4l2-fwnode.h
> @@ -25,7 +25,7 @@ struct fwnode_handle;
> struct v4l2_async_notifier;
> struct v4l2_async_subdev;
>
> -#define V4L2_FWNODE_CSI2_MAX_DATA_LANES 4
> +#define V4L2_FWNODE_CSI2_MAX_DATA_LANES 8
>
> /**
> * struct v4l2_fwnode_bus_mipi_csi2 - MIPI CSI-2 bus data structure
>
next prev parent reply other threads:[~2020-12-07 10:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 18:59 [PATCH v3 00/13] tegra-video: Add support for capturing from HDMI-to-CSI bridge Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 01/13] media: tegra-video: Use zero crop settings if subdev has no get_selection Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 02/13] media: tegra-video: Enable VI pixel transform for YUV and RGB formats Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 03/13] media: tegra-video: Fix V4L2 pixel format RGB and YUV Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 04/13] media: tegra-video: Add support for V4L2_PIX_FMT_NV16 Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 05/13] media: tegra-video: Add DV timing support Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 06/13] media: tegra-video: Add support for EDID ioctl ops Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 07/13] media: tegra-video: Add support for VIDIOC_LOG_STATUS ioctl Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 08/13] media: tegra-video: Add support for V4L2_EVENT_SOURCE_CHANGE Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 09/13] media: tegra-video: Implement V4L2 device notify callback Sowjanya Komatineni
2020-12-03 18:59 ` [PATCH v3 10/13] media: v4l2-fwnode: Update V4L2_FWNODE_CSI2_MAX_DATA_LANES to 8 Sowjanya Komatineni
2020-12-04 12:48 ` Sakari Ailus
2020-12-07 10:47 ` Hans Verkuil [this message]
2020-12-08 19:59 ` Sakari Ailus
2020-12-08 20:27 ` Sowjanya Komatineni
2020-12-03 19:00 ` [PATCH v3 11/13] dt-bindings: tegra: Update csi data-lanes to maximum 8 lanes Sowjanya Komatineni
2020-12-04 12:49 ` Sakari Ailus
2020-12-09 20:16 ` Rob Herring
2020-12-03 19:00 ` [PATCH v3 12/13] media: tegra-video: Add support for x8 captures with gang ports Sowjanya Komatineni
2020-12-03 19:00 ` [PATCH v3 13/13] media: tegra-video: Add custom V4L2 control V4L2_CID_TEGRA_SYNCPT_TIMEOUT_RETRY Sowjanya Komatineni
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=845dfd4a-fa11-625c-78a3-cc8adc68bfc7@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=bparrot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.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).