]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/bridge: imx8qxp-pixel-link: simplify logic to find next bridge
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Wed, 7 Jan 2026 09:56:26 +0000 (10:56 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Thu, 29 Jan 2026 17:44:03 +0000 (18:44 +0100)
commit96476ab8690290aa27084b12a481e48f3af7afb2
treec5824b45e7200c0cf7a371e4bd76f5c608d50b5a
parent3aecd55af5b83d16d84e3c333d4163999ee8ff51
drm/bridge: imx8qxp-pixel-link: simplify logic to find next bridge

imx8qxp_pixel_link_find_next_bridge() uses a sophisticated logic to find
the preferred next bridge, using an array with two supporting index
variables. This is more sophisticated than required because we only ever
need a pointer to the "current" bridge and to the "best so far" bridge.

Additionally this logic is going to make the addition of proper refcounting
quite complex.

Rewrite the logic using two drm_bridge pointers, which is by itself
slightly simpler and is a preparation step for introducing bridge
refcounting in a later commit.

Also reword a comment to make it clearer.

Reviewed-by: Liu Ying <victor.liu@nxp.com>
Link: https://patch.msgid.link/20260107-drm-bridge-alloc-getput-drm_of_find_bridge-v4-1-a62b4399a6bf@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c