From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/bridge: protect encoder bridge chain with a mutex Date: Wed, 25 Mar 2026 06:59:29 +1000 Message-ID: In-Reply-To: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-0-8bf786c5c7e6@bootlin.com> References: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-0-8bf786c5c7e6@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/bridge: protect encoder bridge chain with a mutex Author: Luca Ceresoli Patches: 8 Reviewed: 2026-03-25T06:59:29.998864 --- This is a well-structured v5 series that adds mutex protection to the DRM encoder bridge chain, preparing for hot-pluggable bridge support. The approach is sound: a per-encoder mutex serializes bridge chain modifications (attach/detach) against iterations over the chain. The series is incremental and logical, building from mutex introduction through progressive coverage of all iteration sites. The ABBA deadlock avoidance in patch 2 (using `list_cut_before` to a temporary list) is clever and correct. The scoped for_each macros in patch 4 are well-designed, using `__free()` cleanup attributes to ensure the mutex is always released even on early return/break. One concern worth noting: patches 6 and 7 hold the mutex while calling bridge driver callbacks (`atomic_disable`, `atomic_enable`, `pre_enable`, `post_disable`, etc.). If any bridge driver callback were to attempt a bridge attach/detach on the same encoder, this would deadlock. This seems unlikely in practice, but should be documented or at least noted. Overall: the series looks correct and ready to merge. Minor issues noted below. --- Generated by Claude Code Patch Reviewer