Re: [PATCH v10 11/13] drm/atomic-helper: Separate out bridge pre_enable/post_disable from enable/disable

From: Sverdlin, Alexander
Date: Tue Mar 25 2025 - 15:16:35 EST


On Wed, 2025-02-26 at 21:27 +0530, Aradhya Bhatia wrote:
> The encoder-bridge ops occur by looping over the new connector states of
> the display pipelines. The enable sequence runs as follows -
>
> - pre_enable(bridge),
> - enable(encoder),
> - enable(bridge),
>
> while the disable sequnce runs as follows -
>
> - disable(bridge),
> - disable(encoder),
> - post_disable(bridge).
>
> Separate out the pre_enable(bridge), and the post_disable(bridge)
> operations into separate functions each.
>
> This patch keeps the sequence same for any singular disaplay pipe, but
> changes the sequence across multiple display pipelines.
>
> This patch is meant to be an interim patch, to cleanly pave the way for
> the sequence re-ordering patch, and maintain bisectability in the
> process.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> Reviewed-by: Jayesh Choudhary <j-choudhary@xxxxxx>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> Tested-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> Signed-off-by: Aradhya Bhatia <aradhya.bhatia@xxxxxxxxx>

Tested with AM62 OLDI series [1] on AM625 with single channel AUO 800x480
LVDS panel. No issues with the patch!

Tested-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>

[1] Link: https://lore.kernel.org/all/20250226181300.756610-1-aradhya.bhatia@xxxxxxxxx/

> ---
> Note on checkpatch warning:
> This patch causes the checkpatch to flare up for 1 checkpatch 'check' -
>
> CHECK: Lines should not end with a '('
> #77: FILE: drivers/gpu/drm/drm_atomic_helper.c:1304:
> +                       new_crtc_state = drm_atomic_get_new_crtc_state(
>
> This patch is largely duplicating the original code, with minor differences to
> perform different operations. This line of code pre-exists in the file and
> have simply been duplicated. I have decided to keep it as is to maintain the
> uniformity and the originally intended readability. Should perhaps a fix be
> required, this patch/series is not the right place, and another patch can be
> created to fix this across the whole file.
>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 91 ++++++++++++++++++++++++++++-
>  1 file changed, 88 insertions(+), 3 deletions(-)

--
Alexander Sverdlin
Siemens AG
www.siemens.com