2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/renesas
Maxime Ripard 98007a0d56
drm/bridge: Add encoder parameter to drm_bridge_funcs.attach
The drm_bridge structure contains an encoder pointer that is widely used
by bridge drivers. This pattern is largely documented as deprecated in
other KMS entities for atomic drivers.

However, one of the main use of that pointer is done in attach to just
call drm_bridge_attach on the next bridge to add it to the bridge list.
While this dereferences the bridge->encoder pointer, it's effectively
the same encoder the bridge was being attached to.

We can make it more explicit by adding the encoder the bridge is
attached to to the list of attach parameters. This also removes the need
to dereference bridge->encoder in most drivers.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250313-bridge-connector-v6-1-511c54a604fb@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-03-20 14:45:38 +01:00
..
rcar-du drm/bridge: Add encoder parameter to drm_bridge_funcs.attach 2025-03-20 14:45:38 +01:00
rz-du drm/bridge: Add encoder parameter to drm_bridge_funcs.attach 2025-03-20 14:45:38 +01:00
shmobile Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2024-12-09 16:35:21 +01:00
Kconfig drm: renesas: Add RZ/G2L DU Support 2024-02-21 17:21:21 +01:00
Makefile drm: renesas: Add RZ/G2L DU Support 2024-02-21 17:21:21 +01:00