RE: [PATCH v10 04/12] drm: renesas: rz-du: Count all registered encoders for the possible clones
From: Biju Das
Date: Mon Nov 23 2026 - 11:16:58 EST
Hi Tommaso,
> -----Original Message-----
> From: Tommaso Merciai <tommaso.merciai.xr@xxxxxxxxxxxxxx>
> Sent: 13 November 2026 12:20
> Subject: [PATCH v10 04/12] drm: renesas: rz-du: Count all registered encoders for the possible clones
>
> rzg2l_du_modeset_init() sets the possible clones of every encoder registered with the DRM device, but
> builds the mask from the number of outputs that rzg2l_du_encoders_init() initialized successfully. An
> output whose bridge fails to attach after its encoder has been allocated is skipped and not counted,
> while its encoder stays registered. The mask then misses the bit of the last encoders, and
> drm_mode_config_validate() warns about bogus possible clones.
>
> Build the mask from the number of registered encoders instead.
Looks this is a fix. Can you please move this patch at the starting and add
Fixes tag.
Cheers,
Biju
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@xxxxxxxxxxxxxx>
> ---
> v9->v10:
> - No changes.
>
> v8->v9:
> - New patch.
>
> drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c b/drivers/gpu/drm/renesas/rz-
> du/rzg2l_du_kms.c
> index 13d14ecacba9..6eb1865f43b4 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c
> @@ -455,7 +455,7 @@ int rzg2l_du_modeset_init(struct rzg2l_du_device *rcdu)
> return -EINVAL;
> }
>
> - num_encoders = ret;
> + num_encoders = dev->mode_config.num_encoder;
>
> /*
> * Set the possible CRTCs and possible clones. There's always at least
> --
> 2.54.0