]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/encoder: add mutex to protect the bridge chain
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 24 Mar 2026 08:58:08 +0000 (09:58 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Thu, 16 Apr 2026 07:08:42 +0000 (09:08 +0200)
commit01b92f0d18214660d9978f0c4dd9507ee8d27d06
tree863a072a492f391ddba8e70f3372155a27e82c01
parent8065890f5cda3f8a503f3b9d326aab0e9cca39e7
drm/encoder: add mutex to protect the bridge chain

The per-encoder bridge chain is currently assumed to be static once it is
fully initialized. Work is in progress to add hot-pluggable bridges,
breaking that assumption.

With bridge removal, the encoder chain can change without notice, removing
tail bridges. This can be problematic while iterating over the chain.

Add a mutex to be taken whenever looping or changing the encoder chain.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://patch.msgid.link/20260324-drm-bridge-alloc-encoder-chain-mutex-v5-1-8bf786c5c7e6@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/drm_encoder.c
include/drm/drm_encoder.h