From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260513-fd-hdmi-phy-v9-1-ca98c72f1f9f@oss.qualcomm.com> References: <20260513-fd-hdmi-phy-v9-0-ca98c72f1f9f@oss.qualcomm.com> <20260513-fd-hdmi-phy-v9-1-ca98c72f1f9f@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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