Devicetree
 help / color / mirror / Atom feed
From: "Artur Andrzejczak" <andrzejczak.artur@gmail.com>
To: "Dumitru Ceclan" <dumitru.ceclan@analog.com>,
	"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Julien Massot" <julien.massot@collabora.com>,
	"Rob Herring" <robh@kernel.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: mitrutzceclan@gmail.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-gpio@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Martin Hecht" <Martin.Hecht@avnet.eu>,
	"Andrian Suciu" <Adrian.Suciu@analog.com>,
	"Cosmin Tanislav" <demonsingur@gmail.com>
Subject: Re: [PATCH v15 15/22] media: i2c: add Maxim GMSL2/3 deserializer framework
Date: Mon, 17 Aug 2026 23:39:13 +0200	[thread overview]
Message-ID: <DKRJLVL3NMYG.2J2QX2YKJJHKW@gmail.com> (raw)
In-Reply-To: <20260807-gmsl2-3_serdes-v15-15-7212e9e5156a@analog.com>

On Fri Aug 7, 2026 at 3:02 PM CEST, Dumitru Ceclan wrote:
> [...]

hweight_long(des->info->versions) >= 1 is true for any driver that
declares a version, so the check makes .set_link_version mandatory for
every chip driver. The "Multiple version" message suggests "> 1" was
intended. Both error messages also name .select_link_version(), which
does not exist.

An automated review already flagged the unguarded .select_links() call
in max_des_init_link_ser_xlate(). The same unguarded call is in
max_des_ser_attach_addr() (out_select_links) and max_des_i2c_atr_init().
Only max_des_i2c_mux_select() checks the op before calling it. The
">= 1" check is what currently requires every driver to provide the op,
so changing it to "> 1" alone would expose those call sites to a
single-version driver without .select_links.

In max_des_parse_src_dt_endpoint(): "Unsupported bus-type %u on port %u"
is printed with (pad, bus_type). The arguments seem swapped.

Doubled 10/12-bpp is handled at the PHY level via alt_mem_map10/12 in
max_des_get_phy_mode(), but the pipe-level dbl10/dbl12 (the
BPP10DBL/BPP12DBL bits the chip drivers write) are never set by the
core. Only dbl8 is. Is this on purpose, or should
max_des_get_pipe_mode() set dbl10/dbl12 as well? If it is intentional,
isn't the dbl10/dbl12 handling in the chip drivers unused?

The version loop in max_des_ser_attach_addr() sets RX_RATE using
set_link_version() and seems to rely on the select_links() call inside
max_des_init_link_ser_xlate() doing RESET_ONESHOT to latch it, as the
multi-link paths do. But max9296a_select_links() returns early for
num_links == 1, before the reset. max96714_des_info declares both 3G and
6G speeds, so on MAX96714 the fallback iteration writes a new rate with
no oneshot reset after it. The fallback rate would then not take effect,
and a 3G-only serializer may fail to attach, or attach with the wrong
version stored. How is the new rate meant to take effect in that case?

Also in the same loop, if no version bit is inside [min, max], the loop
ends with ret == 0, and the code after it marks ser_xlate.en = true with
version = min - 1 and no serializer attached. Not reachable with the
current chip infos, but an info with an empty versions mask might hit it
(an empty mask also passes the probe check above, since
hweight_long(0) == 0). Initializing ret to -ENOENT could solve it.

Kind Regards,
Artur Andrzejczak

  parent reply	other threads:[~2026-08-17 21:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 13:02 [PATCH v15 00/22] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 01/22] media: mc: Add INTERNAL pad flag Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 02/22] dt-bindings: media: i2c: max96717: add support for I2C ATR Dumitru Ceclan via B4 Relay
2026-08-07 13:17   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 03/22] dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 04/22] dt-bindings: media: i2c: max96717: add support for MAX9295A Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 05/22] dt-bindings: media: i2c: max96717: add support for MAX96793 Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 06/22] dt-bindings: media: i2c: max96712: use pattern properties for ports Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 07/22] dt-bindings: media: i2c: max96712: add support for I2C ATR Dumitru Ceclan via B4 Relay
2026-08-07 13:32   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 08/22] dt-bindings: media: i2c: max96712: add support for POC supplies Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 09/22] dt-bindings: media: i2c: max96712: add support for MAX96724F/R Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 10/22] dt-bindings: media: i2c: max96712: add control-channel-port property Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 11/22] dt-bindings: media: i2c: max96714: add support for MAX96714R Dumitru Ceclan via B4 Relay
2026-08-07 13:26   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 12/22] dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A Dumitru Ceclan via B4 Relay
2026-08-07 13:38   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 13/22] media: i2c: add Maxim GMSL2/3 serializer and deserializer framework Dumitru Ceclan via B4 Relay
2026-08-07 13:36   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 14/22] media: i2c: add Maxim GMSL2/3 serializer framework Dumitru Ceclan via B4 Relay
2026-08-07 13:42   ` sashiko-bot
2026-08-17 21:37   ` Artur Andrzejczak
2026-08-07 13:02 ` [PATCH v15 15/22] media: i2c: add Maxim GMSL2/3 deserializer framework Dumitru Ceclan via B4 Relay
2026-08-07 13:42   ` sashiko-bot
2026-08-17 21:39   ` Artur Andrzejczak [this message]
2026-08-07 13:02 ` [PATCH v15 16/22] media: i2c: maxim-serdes: add MAX96717 driver Dumitru Ceclan via B4 Relay
2026-08-07 13:51   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 17/22] media: i2c: maxim-serdes: add MAX96724 driver Dumitru Ceclan via B4 Relay
2026-08-17 21:39   ` Artur Andrzejczak
2026-08-07 13:02 ` [PATCH v15 18/22] media: i2c: maxim-serdes: add MAX9296A driver Dumitru Ceclan via B4 Relay
2026-08-07 13:55   ` sashiko-bot
2026-08-17 21:40   ` Artur Andrzejczak
2026-08-07 13:02 ` [PATCH v15 19/22] arm64: defconfig: disable deprecated MAX96712 driver Dumitru Ceclan via B4 Relay
2026-08-07 13:47   ` sashiko-bot
2026-08-07 13:02 ` [PATCH v15 20/22] staging: media: remove " Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 21/22] media: i2c: remove MAX96717 driver Dumitru Ceclan via B4 Relay
2026-08-07 13:02 ` [PATCH v15 22/22] media: i2c: remove MAX96714 driver Dumitru Ceclan via B4 Relay
2026-08-17 21:41 ` [PATCH v15 00/22] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Artur Andrzejczak

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=DKRJLVL3NMYG.2J2QX2YKJJHKW@gmail.com \
    --to=andrzejczak.artur@gmail.com \
    --cc=Adrian.Suciu@analog.com \
    --cc=Martin.Hecht@avnet.eu \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dumitru.ceclan@analog.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julien.massot@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mitrutzceclan@gmail.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen+renesas@ideasonboard.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