From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/hdmi: switch to generic PHY subsystem
Date: Sat, 16 May 2026 11:32:09 +1000 [thread overview]
Message-ID: <review-patch1-20260513-fd-hdmi-phy-v9-1-ca98c72f1f9f@oss.qualcomm.com> (raw)
In-Reply-To: <20260513-fd-hdmi-phy-v9-1-ca98c72f1f9f@oss.qualcomm.com>
Patch Review
This is the core refactoring patch (~174k). It removes the old ad-hoc HDMI PHY driver from `drm/msm` and creates new PHY drivers under `drivers/phy/qualcomm/`.
**DRM side (hdmi_bridge.c)**: The power sequencing changes look correct. The new flow is:
```
phy_init() -> pm_runtime_get_sync() -> phy_configure() -> phy_power_on() -> extp_clk -> set_mode
```
and the reverse on disable. The addition of `hdmi->phy_power_on` tracking is good.
**Concern - locking**: In `msm_hdmi_bridge_atomic_pre_enable()`, the `phy_configure()` and `phy_power_on()` calls happen inside `state_mutex`, but the `extp_clk` setup and `msm_hdmi_set_mode()` happen after `mutex_unlock()`. This asymmetry with `atomic_post_disable()` (where `msm_hdmi_set_mode()` and `extp_clk` disable happen inside the mutex) could lead to subtle races if HPD changes happen concurrently. Worth double-checking that the ordering is intentional.
**Concern - `pm_runtime_get_sync()` vs `pm_runtime_resume_and_get()`**: In `atomic_pre_enable`, the code uses `pm_runtime_get_sync()`:
```c
pm_runtime_get_sync(&hdmi->pdev->dev);
```
This doesn't check the return value and doesn't decrement the refcount on failure. The old code used `pm_runtime_resume_and_get()`. The comment in the changelog says this was intentional because `atomic_pre_enable()` can't fail, but the PHY's `phy_init()` also calls `pm_runtime_resume_and_get()` which *can* fail. This inconsistency deserves a comment or unification.
**Duplicated helpers**: `write16()`, `write24()`, and `read24()` are duplicated identically across 4 files: `phy-qcom-hdmi-28lpm.c`, `phy-qcom-hdmi-28hpm.c` (added in patch 5), `phy-qcom-qmp-hdmi-msm8996.c`, and `phy-qcom-qmp-hdmi-msm8998.c`. These could be factored into a shared header. Not a blocker, but a cleanup opportunity.
**Minor**: `phy-qcom-hdmi-preqmp.c` MODULE_DESCRIPTION says "Qualcomm MSMpreqmp" which looks like a concatenation typo -- should be "Qualcomm MSM pre-QMP HDMI PHY driver".
**Kconfig**: The `PHY_QCOM_QMP_HDMI` entry is missing `depends on` lines for `ARCH_QCOM || COMPILE_TEST` and `OF`, unlike its sibling `PHY_QCOM_HDMI` and other QMP entries. It only has `default PHY_QCOM_QMP && DRM_MSM_HDMI` which may not be sufficient to prevent build issues on non-Qualcomm platforms.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 1:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 18:14 [PATCH v9 0/5] drm/msm/hdmi & phy: use generic PHY framework Dmitry Baryshkov
2026-05-13 18:14 ` [PATCH v9 1/5] drm/msm/hdmi: switch to generic PHY subsystem Dmitry Baryshkov
2026-05-16 1:32 ` Claude Code Review Bot [this message]
2026-05-13 18:14 ` [PATCH v9 2/5] phy: qualcomm: hdmi-28lpm: provide dynamic configuration Dmitry Baryshkov
2026-05-16 1:32 ` Claude review: " Claude Code Review Bot
2026-05-13 18:14 ` [PATCH v9 3/5] phy: qcom: apq8064-sata: extract UNI PLL register defines Dmitry Baryshkov
2026-05-16 1:32 ` Claude review: " Claude Code Review Bot
2026-05-13 18:14 ` [PATCH v9 4/5] phy: qcom-uniphy: add more registers from display PHYs Dmitry Baryshkov
2026-05-16 1:32 ` Claude review: " Claude Code Review Bot
2026-05-13 18:14 ` [PATCH v9 5/5] phy: qualcomm: add MSM8974 HDMI PHY support Dmitry Baryshkov
2026-05-16 1:32 ` Claude review: " Claude Code Review Bot
2026-05-16 1:32 ` Claude review: drm/msm/hdmi & phy: use generic PHY framework Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-23 22:56 [PATCH v7 0/4] " Dmitry Baryshkov
2026-03-23 22:56 ` [PATCH v7 1/4] drm/msm/hdmi: switch to generic PHY subsystem Dmitry Baryshkov
2026-03-24 21:14 ` Claude review: " Claude Code Review Bot
2026-03-19 3:48 [PATCH v6 0/4] drm/msm/hdmi & phy: use generic PHY framework Dmitry Baryshkov
2026-03-19 3:48 ` [PATCH v6 1/4] drm/msm/hdmi: switch to generic PHY subsystem Dmitry Baryshkov
2026-03-21 18:56 ` Claude review: " Claude Code Review Bot
2026-03-14 5:06 [PATCH v5 0/4] drm/msm/hdmi & phy: use generic PHY framework Dmitry Baryshkov
2026-03-14 5:06 ` [PATCH v5 1/4] drm/msm/hdmi: switch to generic PHY subsystem Dmitry Baryshkov
2026-03-16 2:07 ` 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-20260513-fd-hdmi-phy-v9-1-ca98c72f1f9f@oss.qualcomm.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