mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Damon Ding <damon.ding@rock-chips.com>
Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>,
	hjc@rock-chips.com,  heiko@sntech.de, andy.yan@rock-chips.com,
	maarten.lankhorst@linux.intel.com,  mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
	 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	 andrzej.hajda@intel.com, neil.armstrong@linaro.org,
	rfoss@kernel.org,  Laurent.pinchart@ideasonboard.com,
	jonas@kwiboo.se,  jernej.skrabec@gmail.com,
	nicolas.frattaroli@collabora.com,
	 cristian.ciocaltea@collabora.com,
	sebastian.reichel@collabora.com,
	 dmitry.baryshkov@oss.qualcomm.com, dianders@chromium.org,
	 m.szyprowski@samsung.com, dri-devel@lists.freedesktop.org,
	 devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] drm/bridge: analogix_dp: Add validation for samsung,lane-count property
Date: Mon, 01 Jun 2026 14:02:48 +0200	[thread overview]
Message-ID: <178031536852.7135.7751258958371598959.b4-reply@b4> (raw)
In-Reply-To: <17160115-6c30-434b-9dab-b768110cd8d6@rock-chips.com>

Hello Damon,

On 2026-06-01 10:59:27+08:00, Damon Ding wrote:
> Hi Luca,
>
> On 5/30/2026 9:38 PM, Luca Ceresoli wrote:
>
> > On Sat May 30, 2026 at 3:33 PM CEST, Luca Ceresoli wrote:
> >
> > Meh, messed up with 'b4 review' :-/ Apologies
> >
> > "This sashiko report" [0] was about an enum being signed, so '== 0' could miss
> > negative numbers coming from bogus DT values higher than 1^31.
>
> Ah, I agree. It would be better to add a new inline function to validate
> that the lane count passed from DT is exactly 1, 2, or 4, just as
> Sashiko suggested.
>
> >>
> >
> > And this was about "Additionally, does this check inadvertently allow 3,
> > which is an invalid DisplayPort lane count?"
>
> Yes, the DisplayPort specification only allows lane counts of 1, 2, or
> 4. I did miss the check for the invalid value 3 in the current code.
>
> (BTW: I did not find a common helper function in drm_dp_helper.h to
> validate valid DP lane counts (1, 2, 4). I'm not sure if it would be
> better to add a generic lane count validation function to the DP helper
> library instead, to avoid duplicating the same functionality across
> individual DP drivers. Perhaps other DP experts could provide some
> advice on this.)

A bool function in common code, to be reused by all DP drivers, would be
good.


  reply	other threads:[~2026-06-01 12:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  4:05 [PATCH v4 0/3] Add eDP lane mapping support Damon Ding
2026-05-29  4:05 ` [PATCH v4 1/3] dt-bindings: display: bridge: analogix-dp: Add data-lanes support for endpoint Damon Ding
2026-05-29 16:43   ` Conor Dooley
2026-06-01 11:55   ` Sebastian Reichel
2026-05-29  4:05 ` [PATCH v4 2/3] drm/bridge: analogix_dp: Add validation for samsung,lane-count property Damon Ding
2026-05-30 13:33   ` Luca Ceresoli
2026-05-30 13:38     ` Luca Ceresoli
2026-06-01  2:59       ` Damon Ding
2026-06-01 12:02         ` Luca Ceresoli [this message]
2026-06-01 12:24           ` Damon Ding
2026-05-29  4:05 ` [PATCH v4 3/3] drm/bridge: analogix_dp: Add support for optional data-lanes mapping Damon Ding
2026-06-01 11:59   ` Sebastian Reichel

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=178031536852.7135.7751258958371598959.b4-reply@b4 \
    --to=luca.ceresoli@bootlin.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=damon.ding@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®