From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Alain Volmat <alain.volmat@foss.st.com>,
Raphael Gallais-Pou <rgallaispou@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Hui Pu <Hui.Pu@gehealthcare.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/sti: hda: convert to devm_drm_bridge_alloc() API
Date: Wed, 9 Jul 2025 11:22:31 +0200 [thread overview]
Message-ID: <20250709112231.05aa90bc@booty> (raw)
In-Reply-To: <20250709-foamy-neon-woodpecker-eea693@houat>
Hi Maxime,
On Wed, 9 Jul 2025 09:32:28 +0200
Maxime Ripard <mripard@kernel.org> wrote:
...
> > @@ -677,7 +683,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
> > struct drm_encoder *encoder;
> > struct sti_hda_connector *connector;
> > struct drm_connector *drm_connector;
> > - struct drm_bridge *bridge;
> > int err;
> >
> > /* Set the drm device handle */
> > @@ -693,13 +698,7 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
> >
> > connector->hda = hda;
> >
> > - bridge = devm_kzalloc(dev, sizeof(*bridge), GFP_KERNEL);
> > - if (!bridge)
> > - return -ENOMEM;
> > -
> > - bridge->driver_private = hda;
> > - bridge->funcs = &sti_hda_bridge_funcs;
> > - drm_bridge_attach(encoder, bridge, NULL, 0);
> > + drm_bridge_attach(encoder, &hda->bridge, NULL, 0);
>
> It's not entirely related, but the connector is also allocated right
> before and could be moved into the structure instead of storing a
> pointer.
>
> Either way,
> Reviewed-by: Maxime Ripard <mripard@kernel.org>
Given this patch as-is is fixing a (potentially invisible) bug due to
using the old bridge allocation policy, and the connector allocation
change is an improvements but not a fix, I'll apply as is.
BTW, as a side effect, this series is removing two users of
bridge->driver_private :)
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-07-09 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 15:24 [PATCH 0/2] drm: fix missing conversions of bridge drivers to devm_drm_bridge_alloc() Luca Ceresoli
2025-07-08 15:24 ` [PATCH 1/2] drm/sti: hdmi: convert to devm_drm_bridge_alloc() API Luca Ceresoli
2025-07-09 7:30 ` Maxime Ripard
2025-07-08 15:24 ` [PATCH 2/2] drm/sti: hda: " Luca Ceresoli
2025-07-09 7:32 ` Maxime Ripard
2025-07-09 9:22 ` Luca Ceresoli [this message]
2025-07-09 9:35 ` [PATCH 0/2] drm: fix missing conversions of bridge drivers to devm_drm_bridge_alloc() Luca Ceresoli
2025-07-09 12:05 ` Maxime Ripard
2025-07-09 15:17 ` Luca Ceresoli
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=20250709112231.05aa90bc@booty \
--to=luca.ceresoli@bootlin.com \
--cc=Hui.Pu@gehealthcare.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rgallaispou@gmail.com \
--cc=simona@ffwll.ch \
--cc=thomas.petazzoni@bootlin.com \
--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;
as well as URLs for NNTP newsgroup(s).