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: soc: cadence: Create helper functions for Cadence MHDP
Date: Sun, 12 Apr 2026 13:34:44 +1000	[thread overview]
Message-ID: <review-patch1-20260407-dcss-hdmi-upstreaming-v21-1-4681070ab82f@oss.nxp.com> (raw)
In-Reply-To: <20260407-dcss-hdmi-upstreaming-v21-1-4681070ab82f@oss.nxp.com>

Patch Review

**Placement under `drivers/soc/cadence/`**: This is somewhat unconventional. Mailbox helpers for a DRM bridge IP typically live under `drivers/gpu/drm/bridge/` or at least `include/drm/`. Putting it under `drivers/soc/` makes sense only if the PHY driver also uses it (which it does), but it creates an unusual dependency path. Prior discussion may have settled this; worth confirming the subsystem maintainer is comfortable.

**Global mutex concern:**
```c
static DEFINE_MUTEX(mhdp_mailbox_mutex);
```
A process-wide static mutex means all MHDP instances (across different SoC blocks or even different SoCs sharing the kernel) are serialized. A per-instance mutex stored in `struct cdns_mhdp_base` would be more correct. The original mhdp8546 code used per-instance `mhdp->mbox_mutex`.

**Typo in error message:**
```c
dev_err(base->dev, "ModuleID=%d, Resp_CMD=%d recv data1 failed: %d\n",
```
In `cdns_mhdp_mailbox_send_recv_multi()`, the second `mhdp_mailbox_recv_data` failure prints "recv data1" instead of "recv data2".

**Typo in commit message:**
> "These helper fucntions will be reused..."

Should be "functions".

**Kerneldoc `@param` format:** The kerneldoc uses `@param base:` which is not standard kernel kerneldoc format; it should be `@base:` (without `@param`). This applies to all the exported functions in this file.

**`HDCP_TRAN_IS_REC_ID_VALID` special-casing in `cdns_mhdp_secure_mailbox_send_recv_multi`:**
```c
if (module_id == MB_MODULE_ID_HDCP_TX &&
    opcode == HDCP_TRAN_IS_REC_ID_VALID)
    ret = mhdp_mailbox_recv_data(base->sapb_regs, resp2, 5 * resp1[0]);
```
This HDCP-specific logic in a generic helper is a code smell. The caller should handle the dynamic size by passing the correct `resp2_size`. Having the helper know about HDCP protocol details leaks abstraction.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-12  3:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 14:31 [PATCH v21 0/8] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Laurentiu Palcu
2026-04-07 14:31 ` [PATCH v21 1/8] soc: cadence: Create helper functions for Cadence MHDP Laurentiu Palcu
2026-04-12  3:34   ` Claude Code Review Bot [this message]
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
2026-04-07 14:31 ` [PATCH v21 3/8] dt-bindings: display: bridge: Add Cadence MHDP8501 Laurentiu Palcu
2026-04-08  6:42   ` Krzysztof Kozlowski
2026-04-08  7:13     ` Laurentiu Palcu
2026-04-08  7:32       ` Krzysztof Kozlowski
2026-04-08 14:36         ` Laurentiu Palcu
2026-04-12  3:34   ` Claude review: " Claude Code Review Bot
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
2026-04-07 14:31 ` [PATCH v21 5/8] dt-bindings: phy: Add Freescale iMX8MQ DP and HDMI PHY Laurentiu Palcu
2026-04-12  3:34   ` Claude review: " Claude Code Review Bot
2026-04-07 14:31 ` [PATCH v21 6/8] phy: freescale: Add DisplayPort/HDMI Combo-PHY driver for i.MX8MQ Laurentiu Palcu
2026-04-12  3:34   ` Claude review: " Claude Code Review Bot
2026-04-07 14:31 ` [PATCH v21 7/8] arm64: dts: imx8mq: Add DCSS + HDMI/DP display pipeline Laurentiu Palcu
2026-04-12  3:34   ` Claude review: " Claude Code Review Bot
2026-04-07 14:31 ` [PATCH v21 8/8] arm64: dts: imx8mq: tqma8mq-mba8mx: Enable HDMI support Laurentiu Palcu
2026-04-12  3:34   ` Claude review: " Claude Code Review Bot
2026-04-08  6:38 ` [PATCH v21 0/8] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Krzysztof Kozlowski
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-patch1-20260407-dcss-hdmi-upstreaming-v21-1-4681070ab82f@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