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/xlnx/zynqmp-dpsub: Fix dependencies for COMPILE_TEST
Date: Sun, 12 Apr 2026 12:56:35 +1000	[thread overview]
Message-ID: <review-patch1-20260408081430.1712335-1-wenst@chromium.org> (raw)
In-Reply-To: <20260408081430.1712335-1-wenst@chromium.org>

Patch Review

**Correctness: Good**

I verified the actual build-time dependencies in the driver source:

1. `zynqmp_dp.c` includes `<linux/phy/phy.h>` and calls `devm_phy_get()`, `phy_init()`, `phy_power_on()`, `phy_configure()`, `phy_exit()`. These are all generic PHY framework functions that are available when `GENERIC_PHY` is set — and the Kconfig already has `select GENERIC_PHY`. There is no direct include of or dependency on any `PHY_XILINX_ZYNQMP`-specific header.

2. `zynqmp_disp.c` includes `<linux/dma/xilinx_dpdma.h>` — but this header is just a trivial struct definition (`struct xilinx_dpdma_peripheral_config`) with no conditional compilation or dependency on `XILINX_ZYNQMP_DPDMA`. The actual DMA calls (`dma_request_chan()`, `dmaengine_prep_interleaved_dma()`, etc.) come from `<linux/dmaengine.h>`, which is provided by `DMA_ENGINE` (already selected).

So both `PHY_XILINX_ZYNQMP` and `XILINX_ZYNQMP_DPDMA` are indeed runtime-only dependencies — they ensure the specific hardware drivers are present so that `devm_phy_get()` and `dma_request_chan()` find their providers at probe time. They are not needed for compilation.

**The Kconfig logic:**

```kconfig
-	depends on ARCH_ZYNQMP || COMPILE_TEST
+	depends on (ARCH_ZYNQMP && PHY_XILINX_ZYNQMP && XILINX_ZYNQMP_DPDMA) || COMPILE_TEST
```

This correctly:
- Preserves the full dependency chain for real `ARCH_ZYNQMP` builds (PHY + DMA drivers must be enabled)
- Relaxes only for `COMPILE_TEST`, where those specific drivers aren't needed to compile

**Minor observation:** The author notes in the cover message that the two driver dependencies "could be removed altogether" (i.e., not required even for `ARCH_ZYNQMP` builds). This is technically true — the driver would just fail at probe with `-ENODEV`/`-EPROBE_DEFER` — but keeping them as hard dependencies for real hardware builds is a reasonable user-experience choice, preventing users from building a kernel that would silently fail to bring up the display. The current conservative approach is the right call.

**No issues found.** 

Reviewed-by worthy.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-04-12  2:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  8:14 [PATCH] drm/xlnx/zynqmp-dpsub: Fix dependencies for COMPILE_TEST Chen-Yu Tsai
2026-04-10  8:49 ` Tomi Valkeinen
2026-04-10  9:08   ` Chen-Yu Tsai
2026-04-10  9:27     ` Ville Syrjälä
2026-04-10 10:43     ` Tomi Valkeinen
2026-04-12  2:56 ` Claude review: " Claude Code Review Bot
2026-04-12  2:56 ` Claude Code Review Bot [this message]

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-20260408081430.1712335-1-wenst@chromium.org \
    --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