]> git.ipfire.org Git - thirdparty/linux.git/commit
drm: of: forbid bridge-only calls to drm_of_find_panel_or_bridge()
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Mon, 11 May 2026 16:40:15 +0000 (18:40 +0200)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 19 May 2026 08:57:26 +0000 (10:57 +0200)
commit0d5da248ea2d7802a5055ab6762340ac870bd0ee
tree0e25a5d2f782d74a16c20ed9ffd1db5572e114f1
parent62f1a79e1b004b250e68e10c32a29fd954fc9725
drm: of: forbid bridge-only calls to drm_of_find_panel_or_bridge()

Up to now drm_of_find_panel_or_bridge() can be called with a bridge pointer
only, a panel pointer only, or both a bridge and a panel pointers. The
logic to handle all the three cases is somewhat complex to read however.

Now all bridge-only callers have been converted to
of_drm_get_bridge_by_endpoint(), which is simpler and handles bridge
refcounting. So forbid new bridge-only users by mandating a non-NULL panel
pointer in the docs and in the sanity checks along with a warning.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://patch.msgid.link/20260511-drm-bridge-alloc-getput-panel_or_bridge-v6-11-f61c9e498b3f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/drm_of.c