public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: prevent encoder chain changes in pre_enable/post_disable
Date: Wed, 25 Mar 2026 06:59:31 +1000	[thread overview]
Message-ID: <review-patch7-20260324-drm-bridge-alloc-encoder-chain-mutex-v5-7-8bf786c5c7e6@bootlin.com> (raw)
In-Reply-To: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-7-8bf786c5c7e6@bootlin.com>

Patch Review

Adds explicit `mutex_lock`/`mutex_unlock` around the outer loops in `drm_atomic_bridge_chain_post_disable()` and `drm_atomic_bridge_chain_pre_enable()`. As the commit message notes, there are no break or return points inside the outer loops (the `break` statements terminate the outer `list_for_each` which then falls through to the unlock), so the placement is correct.

**Note on holding the mutex during callbacks:** Both `drm_atomic_bridge_call_post_disable()` and `drm_atomic_bridge_call_pre_enable()` call into bridge driver callbacks while the mutex is held. This is the same situation as patch 6. If a bridge driver's `pre_enable`/`post_disable` callback were to call `drm_bridge_attach`/`drm_bridge_detach` on the same encoder, it would deadlock. This is extremely unlikely but might warrant a `lockdep_assert_held` annotation or documentation note in the future.

No blocking issues.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-24 20:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24  8:58 [PATCH v5 0/7] drm/bridge: protect encoder bridge chain with a mutex Luca Ceresoli
2026-03-24  8:58 ` [PATCH v5 1/7] drm/encoder: add mutex to protect the bridge chain Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 2/7] drm/encoder: drm_encoder_cleanup: lock the encoder chain mutex during removal Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 3/7] drm/bridge: drm_bridge_attach: lock the encoder chain mutex during insertion Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 4/7] drm/bridge: lock the encoder chain in scoped for_each loops Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 5/7] drm/bridge: prevent encoder chain changes while iterating with list_for_each_entry_from() Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 6/7] drm/bridge: prevent encoder chain changes while iterating with list_for_each_entry_reverse() Luca Ceresoli
2026-03-24 20:59   ` Claude review: " Claude Code Review Bot
2026-03-24  8:58 ` [PATCH v5 7/7] drm/bridge: prevent encoder chain changes in pre_enable/post_disable Luca Ceresoli
2026-03-24 20:59   ` Claude Code Review Bot [this message]
2026-03-24 20:59 ` Claude review: drm/bridge: protect encoder bridge chain with a mutex Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch7-20260324-drm-bridge-alloc-encoder-chain-mutex-v5-7-8bf786c5c7e6@bootlin.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox