From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: bridge: cadence: Update mhdp8546 mailbox access functions
Date: Mon, 25 May 2026 22:48:48 +1000 [thread overview]
Message-ID: <review-patch2-20260519-dcss-hdmi-upstreaming-v23-2-5615524a9c63@oss.nxp.com> (raw)
In-Reply-To: <20260519-dcss-hdmi-upstreaming-v23-2-5615524a9c63@oss.nxp.com>
Patch Review
Mechanical conversion of the existing mhdp8546 driver to use the new shared helpers. Well done — removes ~550 lines of duplicated code.
**Issues:**
1. **Data duplication in `cdns_mhdp_device`**: The patch adds `struct cdns_mhdp_base base` which contains `regs`, `sapb_regs`, and `dev` pointers, but the existing struct already has these same fields. In probe:
```c
mhdp->base.dev = mhdp->dev;
mhdp->base.regs = mhdp->regs;
mhdp->base.sapb_regs = mhdp->sapb_regs;
```
This creates two copies of the same pointers. Consider embedding `base` at the start of the struct and removing the duplicate fields, or at least making the existing fields point into `base`.
2. **`set_firmware_active` response handling changed**: The old code sent a raw 5-byte message and read back a response. The new code uses `cdns_mhdp_mailbox_send_recv()` with `sizeof(status)` (1 byte) for both message and response sizes. The old message was 5 bytes (including header). Make sure the firmware protocol is actually `send(1 byte) → recv(1 byte)` and not `send(5 bytes including header)`.
3. **`disable_irq`/cancel work ordering in remove()**: The patch adds:
```c
disable_irq(mhdp->irq);
cancel_work_sync(&mhdp->modeset_retry_work);
flush_work(&mhdp->hpd_work);
```
before `wait_event_timeout`. The original code did `cancel_work_sync` + `flush_work` after `pm_runtime_put_sync`. Moving `disable_irq` to the top of remove is correct for preventing new work from being scheduled, but the `drm_bridge_remove()` call above it may trigger disconnect callbacks that reference the device — ensure there's no ordering issue with the bridge still being live when the IRQ is disabled.
4. **`mutex_destroy` without corresponding `mutex_init` movement**: `mutex_init(&mhdp->base.mailbox_mutex)` is in probe, and `mutex_destroy(&mhdp->base.mailbox_mutex)` is in remove. But the old `mutex_init(&mhdp->mbox_mutex)` is removed without adding the destroy. This is correct since the new mutex is the replacement, but the asymmetric placement (init in probe, destroy at end of remove after pm_runtime_disable) is fine.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 12:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 14:42 [PATCH v23 0/8] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Laurentiu Palcu
2026-05-19 14:42 ` [PATCH v23 1/8] soc: cadence: Create helper functions for Cadence MHDP Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 2/8] drm: bridge: cadence: Update mhdp8546 mailbox access functions Laurentiu Palcu
2026-05-25 12:48 ` Claude Code Review Bot [this message]
2026-05-19 14:42 ` [PATCH v23 3/8] dt-bindings: phy: Add Freescale iMX8MQ DP and HDMI PHY Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 4/8] phy: freescale: Add DisplayPort/HDMI Combo-PHY driver for i.MX8MQ Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 5/8] dt-bindings: display: bridge: Add Cadence MHDP8501 Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 6/8] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 7/8] arm64: dts: imx8mq: Add DCSS + HDMI/DP display pipeline Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-19 14:42 ` [PATCH v23 8/8] arm64: dts: imx8mq: tqma8mq-mba8mx: Enable HDMI support Laurentiu Palcu
2026-05-25 12:48 ` Claude review: " Claude Code Review Bot
2026-05-25 12:48 ` Claude review: Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-04-07 14:31 [PATCH v21 0/8] " Laurentiu Palcu
2026-04-07 14:31 ` [PATCH v21 2/8] drm: bridge: cadence: Update mhdp8546 mailbox access functions Laurentiu Palcu
2026-04-12 3:34 ` Claude review: " 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-patch2-20260519-dcss-hdmi-upstreaming-v23-2-5615524a9c63@oss.nxp.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