Re: [PATCH v2 41/41] drm: renesas: shmobile: remove now-redundant call to drm_connector_attach_encoder()

Dmitry Baryshkov
2026-04-23T12:45:25Z

On Thu, Apr 23, 2026 at 01:55:50PM +0200, Luca Ceresoli wrote:
> shmob_drm_connector_create() can init the connector in two ways, based on
> the 'if (sdev->pdata)':
>
> 1. manually in shmob_drm_connector_create(), or
> 2. delegating to drm_bridge_connector_init()
>
> Whichever branch is taken, drm_connector_attach_encoder() is called
> immediately after to attach the connector to the encoder.
>
> Now drm_bridge_connector_init() calls drm_connector_attach_encoder() on the
> connector so it is not needed anymore in case 2 and should be removed, but
> it is still needed in case 1. Move drm_connector_attach_encoder() from the
> common path to inside shmob_drm_connector_create() in order to get back to
> a single drm_connector_attach_encoder() in both cases.
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
>
> ---
>
> Changes in v2:
> - rewrote completely, fixing potential ERR_PTR deref and ending up with
> a cleaner patch
> - also wrote more extensive commit message
> ---
> .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)

LGTM now.

--
With best wishes
Dmitry