]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/atomic-helper: Refactor crtc & encoder-bridge op loops into separate functions
authorAradhya Bhatia <a-bhatia1@ti.com>
Thu, 5 Jun 2025 17:15:21 +0000 (22:45 +0530)
committerMaxime Ripard <mripard@kernel.org>
Fri, 6 Jun 2025 12:24:56 +0000 (14:24 +0200)
commitf6ee26f5887089bb2ea9032d2d169e5b2cb14e95
treecf74005ebeded8ecf5b1101572a6c006f9833350
parent1273d22b532657e6379f3eb4f6860bf871d65eb5
drm/atomic-helper: Refactor crtc & encoder-bridge op loops into separate functions

The way any singular display pipeline, in need of a modeset, gets
enabled is as follows -

crtc enable
(all) bridge pre-enable
encoder enable
(all) bridge enable

- and the disable sequence is exactly the reverse of this.

The crtc operations occur by looping over the old and new crtc states,
while the encoder and bridge operations occur together, by looping over
the connector states of the display pipelines.

Refactor these operations - crtc enable/disable, and encoder & bridge
(pre/post) enable/disable - into separate functions each, to make way
for the re-ordering of the enable/disable sequences.

This patch doesn't alter the sequence of crtc/encoder/bridge operations
in any way, but helps to cleanly pave the way for the next two patches,
by maintaining logical bisectability.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Tested-by: Devarsh Thakkar <devarsht@ti.com>
Link: https://lore.kernel.org/r/20250605171524.27222-2-aradhya.bhatia@linux.dev
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/drm_atomic_helper.c