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: Cadence: Add MHDP8501 DP/HDMI driver
Date: Mon, 25 May 2026 22:48:49 +1000	[thread overview]
Message-ID: <review-patch6-20260519-dcss-hdmi-upstreaming-v23-6-5615524a9c63@oss.nxp.com> (raw)
In-Reply-To: <20260519-dcss-hdmi-upstreaming-v23-6-5615524a9c63@oss.nxp.com>

Patch Review

This is the main new driver (3 source files, ~2000 lines). Overall well-structured with proper use of DRM atomic helpers.

**Issues:**

1. **IRQ vs. removal race**: The `removing` flag uses `WRITE_ONCE`/`READ_ONCE` but this is not sufficient to prevent the IRQ handler from scheduling `hotplug_work` between checking the flag and calling `disable_irq()` in remove. The sequence should be:
```c
// In remove():
WRITE_ONCE(mhdp->removing, true);
disable_irq(mhdp->irq[IRQ_IN]);
disable_irq(mhdp->irq[IRQ_OUT]);
cancel_delayed_work_sync(&mhdp->hotplug_work);
```
rather than relying on `READ_ONCE` in the IRQ handler to prevent scheduling.

2. **HDMI I2C adapter limitation**: The adapter only supports SCDC slave (0x54). While documented, the `i2c_algorithm` should return an error for unsupported addresses rather than silently failing. The code does check:
```c
if (msgs[0].addr != DDC_SEGMENT_ADDR && msgs[0].addr != DDC_ADDR)
```
but returns `-EINVAL` without explanation. A `dev_dbg` message would help.

3. **`dev_set_drvdata(dev, &mhdp->base)`**: The bridge driver stores `&mhdp->base` (not `mhdp` itself) via `dev_set_drvdata` so the PHY child can find it. This is clever but fragile — any caller using `dev_get_drvdata` must know to expect a `cdns_mhdp_base*`, not the full device struct. A comment at the `dev_set_drvdata` call site would prevent confusion.

4. **Debugfs firmware version**: The firmware version is read at debugfs open time via mailbox. If the firmware is not loaded/ready, this will fail silently or block. Consider caching the version after firmware ready is confirmed.

5. **HDMI infoframe handling**: `cdns_hdmi_config_infoframe()` silently returns if `len > 31` without reporting an error. The caller should know the configuration failed.

---
Generated by Claude Code Patch Reviewer

  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 review: " Claude Code Review Bot
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 Code Review Bot [this message]
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 4/8] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver 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-patch6-20260519-dcss-hdmi-upstreaming-v23-6-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