All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	dri-devel@lists.freedesktop.org,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Douglas Anderson <dianders@chromium.org>,
	Damon Ding <damon.ding@rock-chips.com>
Subject: Re: [PATCH] drm/bridge: analogix_dp: Use devm_drm_bridge_alloc() API
Date: Thu, 3 Jul 2025 17:50:32 +0200	[thread overview]
Message-ID: <20250703175032.6f49f862@booty> (raw)
In-Reply-To: <20250701-petite-mutant-starling-24bbe5@houat>

Hi Maxime,

On Tue, 1 Jul 2025 16:27:54 +0200
Maxime Ripard <mripard@kernel.org> wrote:

> On Tue, Jul 01, 2025 at 04:02:19PM +0200, Luca Ceresoli wrote:
> > Hello Marek, Maxime,
> > 
> > thanks Marek for spotting the issue and sending a patch!
> > 
> > On Mon, 30 Jun 2025 18:44:24 +0200
> > Maxime Ripard <mripard@kernel.org> wrote:
> >   
> > > > @@ -1643,7 +1625,7 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
> > > >  		return ret;
> > > >  	}
> > > >  
> > > > -	ret = analogix_dp_create_bridge(drm_dev, dp);
> > > > +	ret = drm_bridge_attach(dp->encoder, &dp->bridge, NULL, 0);
> > > >  	if (ret) {
> > > >  		DRM_ERROR("failed to create bridge (%d)\n", ret);
> > > >  		goto err_unregister_aux;    
> > > 
> > > It looks like you don't set bridge->driver_private anymore. Is it on purpose?  
> > 
> > This looks correct to me. In current code, driver_private is used to
> > hold a pointer to the driver private struct (struct
> > analogix_dp_device). With devm_drm_bridge_alloc() container_of() is now
> > enough, no pointer is needed. With the patch applied, driver_private
> > becomes unused.  
> 
> Then we should remove it from the structure if it's unused.

Makes sense now that struct drm_bridge is meant to be always embedded
in a driver-private struct. But several drivers are still using it, so
those would need to be updated beforehand:

$ git grep  -l driver_private -- drivers/gpu/drm/ | wc -l
23
$

So I think this patch should be taken as it fixes a regression. Do you
agree on this?

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2025-07-03 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250627165702eucas1p12dbc50fea261d6846e67880bbef5c564@eucas1p1.samsung.com>
2025-06-27 16:56 ` [PATCH] drm/bridge: analogix_dp: Use devm_drm_bridge_alloc() API Marek Szyprowski
2025-06-30 16:44   ` Maxime Ripard
2025-07-01 14:02     ` Luca Ceresoli
2025-07-01 14:27       ` Maxime Ripard
2025-07-03 15:50         ` Luca Ceresoli [this message]
2025-07-07  9:07           ` Marek Szyprowski
2025-07-07 10:59             ` Luca Ceresoli
2025-07-08 14:19               ` Luca Ceresoli
2025-07-09  9:24                 ` Maxime Ripard
2025-07-07  9:21           ` Maxime Ripard
2025-07-07 10:12             ` Marek Szyprowski
2025-07-07 10:25               ` Luca Ceresoli
2025-07-07 10:50   ` 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=20250703175032.6f49f862@booty \
    --to=luca.ceresoli@bootlin.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=damon.ding@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=m.szyprowski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.