From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sui Jingfeng <sui.jingfeng@linux.dev>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Abel Vesa <abel.vesa@linaro.org>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Johan Hovold <johan@kernel.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge
Date: Wed, 30 Oct 2024 21:39:28 +0200 [thread overview]
Message-ID: <20241030193928.GC920@pendragon.ideasonboard.com> (raw)
In-Reply-To: <f2119a4d-7ba3-4f11-91d7-54aac51ef950@linux.dev>
On Thu, Oct 31, 2024 at 12:45:24AM +0800, Sui Jingfeng wrote:
> Hi,
>
> On 2024/10/18 23:43, Dmitry Baryshkov wrote:
> > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote:
> >> The assignment of the of_node to the aux bridge needs to mark the
> >> of_node as reused as well, otherwise resource providers like pinctrl will
> >> report a gpio as already requested by a different device when both pinconf
> >> and gpios property are present.
> >> Fix that by using the device_set_of_node_from_dev() helper instead.
> >>
> >> Fixes: 6914968a0b52 ("drm/bridge: properly refcount DT nodes in aux bridge drivers")
> >> Cc: stable@vger.kernel.org # 6.8
> >> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> >> ---
> >> Changes in v2:
> >> - Re-worded commit to be more explicit of what it fixes, as Johan suggested
> >> - Used device_set_of_node_from_dev() helper, as per Johan's suggestion
> >> - Added Fixes tag and cc'ed stable
> >> - Link to v1: https://lore.kernel.org/r/20241017-drm-aux-bridge-mark-of-node-reused-v1-1-7cd5702bb4f2@linaro.org
> >> ---
> >> drivers/gpu/drm/bridge/aux-bridge.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> Technically speaking, your driver just move the burden to its caller.
> Because this driver requires its user call drm_aux_bridge_register()
> to create an AUX child device manually, you need it call ida_alloc()
> to generate a unique id.
There's a relevant discussion for a ti-sn65dsi86 patch, see
https://lore.kernel.org/r/20241030102846.GB14276@pendragon.ideasonboard.com
I agree it shouldn't be the responsibility of each caller to generate
unique IDs.
> Functions symbols still have to leak to other subsystems, which is
> not really preserve coding sharing.
>
> What's worse, the action that allocating unique device id traditionally
> is the duty of driver core. Why breaks (so called) perfect device driver
> model by moving that out of core. Especially in the DT world that the
> core knows very well how to populate device instance and manage the
> reference counter.
>
> HPD handling is traditionally belongs to connector, create standalone
> driver like this one *abuse* to both Maxime's simple bridge driver and
> Laurent's display-connector bridge driver or drm_bridge_connector or
> whatever. Why those work can't satisfy you? At least, their drivers
> are able to passing the mode setting states to the next bridge.
>
> Basically those AUX drivers implementation abusing the definition of
> bridge, abusing the definition of connector and abusing the DT.
> Its just manually populate instances across drivers.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-10-30 19:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 12:49 [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge Abel Vesa
2024-10-18 15:43 ` Dmitry Baryshkov
2024-10-30 16:45 ` Sui Jingfeng
2024-10-30 19:39 ` Laurent Pinchart [this message]
2024-10-31 12:29 ` Neil Armstrong
2024-10-21 7:12 ` Neil Armstrong
2024-10-21 7:23 ` Johan Hovold
2024-10-31 14:05 ` Johan Hovold
2024-10-31 16:13 ` Abel Vesa
2024-10-31 16:33 ` Johan Hovold
2024-11-01 9:49 ` Abel Vesa
2024-10-31 15:48 ` Dmitry Baryshkov
2024-10-31 16:26 ` Johan Hovold
2024-10-21 13:08 ` Neil Armstrong
2024-10-30 14:49 ` Sui Jingfeng
2024-10-31 12:31 ` Neil Armstrong
2024-10-31 14:02 ` Johan Hovold
2024-10-31 15:31 ` Sui Jingfeng
2024-10-31 15:06 ` Sui Jingfeng
2024-10-31 16:23 ` Johan Hovold
2024-11-01 3:49 ` Sui Jingfeng
2024-11-01 7:27 ` Johan Hovold
2024-11-01 9:20 ` Laurent Pinchart
2024-11-01 10:27 ` Dmitry Baryshkov
2024-11-01 14:43 ` Laurent Pinchart
2024-11-01 6:15 ` Sui Jingfeng
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=20241030193928.GC920@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=abel.vesa@linaro.org \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=johan@kernel.org \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=sui.jingfeng@linux.dev \
--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