drm/bridge: Add a function to abstract away panels
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Sep 2021 13:09:39 +0000 (15:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:24 +0000 (14:23 +0200)
commited486d15084f7429298ca4c577e5647a3fdca934
tree9ae760875f7f198e1266f796c4c67a372594fb9e
parentb6fea72ea1aabdbbe9b08d3dae25c166d6ee038f
drm/bridge: Add a function to abstract away panels

[ Upstream commit 87ea95808d53e56b03e620e8f8f3add48899a88d ]

Display drivers so far need to have a lot of boilerplate to first
retrieve either the panel or bridge that they are connected to using
drm_of_find_panel_or_bridge(), and then either deal with each with ad-hoc
functions or create a drm panel bridge through drm_panel_bridge_add.

In order to reduce the boilerplate and hopefully create a path of least
resistance towards using the DRM panel bridge layer, let's create the
function devm_drm_of_get_bridge() to reduce that boilerplate.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210910130941.1740182-2-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_bridge.c
drivers/gpu/drm/drm_of.c
include/drm/drm_bridge.h