From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Subject: Re: [PATCH 07/18] media: rcar-csi2: Fix typo
Date: Wed, 19 Feb 2025 16:50:16 +0200 [thread overview]
Message-ID: <be974670-508c-4b07-8a4a-e3fc6156c131@ideasonboard.com> (raw)
In-Reply-To: <20250219144658.GA515486@ragnatech.se>
Hi,
On 19/02/2025 16:46, Niklas Söderlund wrote:
> On 2025-02-19 16:36:27 +0200, Tomi Valkeinen wrote:
>> Hi,
>>
>> On 19/02/2025 16:24, Niklas Söderlund wrote:
>>> Hi Tomi,
>>>
>>> On 2025-02-19 15:49:01 +0200, Tomi Valkeinen wrote:
>>>> Fix typo with variable name 'msps'.
>>>
>>> FWIW, this is not a typo, C-PHY uses symbols per seconds, not bits per
>>> second.
>>
>> Hmm, but the code calls rcsi2_calc_mbps() and uses the returned value as
>> msps. How can that be right, if it's symbols?
>
> I don't recall all the details off hand, but IIRC it's just a naming
> thing in the specification. I'm fine with using either, just wanted to
> point out it was not a typo but intentional name.
Ok. I don't mind either way that much, it was just very confusing. I'm
not familiar with C-PHY, but I thought usually "symbol" is something
else than a single bit. As msps is used in some other places in the
file, adding a comment to the place where we switch from mbps to msps
should be enough.
Tomi
>
>>
>> Tomi
>>
>>>>
>>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
>>>> ---
>>>> drivers/media/platform/renesas/rcar-csi2.c | 10 +++++-----
>>>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
>>>> index 845fb3e155f1..92697ea3df01 100644
>>>> --- a/drivers/media/platform/renesas/rcar-csi2.c
>>>> +++ b/drivers/media/platform/renesas/rcar-csi2.c
>>>> @@ -1301,7 +1301,7 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>> const struct rcar_csi2_format *format;
>>>> const struct v4l2_mbus_framefmt *fmt;
>>>> unsigned int lanes;
>>>> - int msps;
>>>> + int mbps;
>>>> int ret;
>>>> /* Use the format on the sink pad to compute the receiver config. */
>>>> @@ -1314,9 +1314,9 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>> if (ret)
>>>> return ret;
>>>> - msps = rcsi2_calc_mbps(priv, format->bpp, lanes);
>>>> - if (msps < 0)
>>>> - return msps;
>>>> + mbps = rcsi2_calc_mbps(priv, format->bpp, lanes);
>>>> + if (mbps < 0)
>>>> + return mbps;
>>>> /* Reset LINK and PHY*/
>>>> rcsi2_write(priv, V4H_CSI2_RESETN_REG, 0);
>>>> @@ -1352,7 +1352,7 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>> rcsi2_write16(priv, V4H_PPI_RW_COMMON_CFG_REG, 0x0003);
>>>> /* C-PHY settings */
>>>> - ret = rcsi2_c_phy_setting_v4h(priv, msps);
>>>> + ret = rcsi2_c_phy_setting_v4h(priv, mbps);
>>>> if (ret)
>>>> return ret;
>>>>
>>>> --
>>>> 2.43.0
>>>>
>>>
>>
>
next prev parent reply other threads:[~2025-02-19 14:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 13:48 [PATCH 00/18] media: rcar: Streams support Tomi Valkeinen
2025-02-19 13:48 ` [PATCH 01/18] media: rcar-vin: Add RCAR_GEN4 model value Tomi Valkeinen
2025-02-19 13:48 ` [PATCH 02/18] media: rcar-vin: Fix RAW8 Tomi Valkeinen
2025-02-19 13:48 ` [PATCH 03/18] media: rcar-vin: Fix RAW10 Tomi Valkeinen
2025-02-19 13:48 ` [PATCH 04/18] media: rcar-isp: Improve ISPPROCMODE_DT_PROC_MODE_VC Tomi Valkeinen
2025-02-19 13:48 ` [PATCH 05/18] media: rcar-isp: Move {enable|disable}_streams() calls Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 06/18] media: rcar-csi2: " Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 07/18] media: rcar-csi2: Fix typo Tomi Valkeinen
2025-02-19 14:24 ` Niklas Söderlund
2025-02-19 14:36 ` Tomi Valkeinen
2025-02-19 14:46 ` Niklas Söderlund
2025-02-19 14:50 ` Tomi Valkeinen [this message]
2025-02-19 13:49 ` [PATCH 08/18] media: rcar-csi2: Move rcar2_calc_mbps() Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 09/18] media: rcar-csi2: Simplify rcsi2_calc_mbps() Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 10/18] media: rcar-csi2: Optimize rcsi2_calc_mbps() Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 11/18] media: rcar-csi2: Switch to Streams API Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 12/18] media: rcar-isp: " Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 13/18] media: rcar-csi2: Add .get_frame_desc op Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 14/18] media: rcar-isp: Call get_frame_desc to find out VC & DT Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 15/18] media: rcar-csi2: Add more stream support to rcsi2_calc_mbps() Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 16/18] media: rcar-csi2: Call get_frame_desc to find out VC & DT (Gen3) Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 17/18] media: rcar-csi2: Add full streams support Tomi Valkeinen
2025-02-19 13:49 ` [PATCH 18/18] media: rcar-isp: " Tomi Valkeinen
2025-02-19 14:22 ` [PATCH 00/18] media: rcar: Streams support Niklas Söderlund
2025-02-19 14:41 ` Tomi Valkeinen
2025-02-19 14:56 ` Niklas Söderlund
2025-02-19 15:00 ` Tomi Valkeinen
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=be974670-508c-4b07-8a4a-e3fc6156c131@ideasonboard.com \
--to=tomi.valkeinen+renesas@ideasonboard.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox