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: Sun, 22 Mar 2026 04:56:09 +1000 Message-ID: In-Reply-To: <20260319-fd-hdmi-phy-v6-1-cefc08a55470@oss.qualcomm.com> References: <20260319-fd-hdmi-phy-v6-0-cefc08a55470@oss.qualcomm.com> <20260319-fd-hdmi-phy-v6-1-cefc08a55470@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This is the core patch (~5500 lines of diff) that removes the old PHY code = from `drivers/gpu/drm/msm/hdmi/` and creates new standalone PHY drivers und= er `drivers/phy/qualcomm/`. **Critical: Missing compatible strings** The old code in `hdmi_phy.c` handled these compatibles: ``` { .compatible =3D "qcom,hdmi-phy-8084", .data =3D &msm_hdmi_phy_8x74_cfg }, { .compatible =3D "qcom,hdmi-phy-8998", .data =3D &msm_hdmi_phy_8998_cfg }, ``` The new `phy-qcom-hdmi-28hpm.c` only has: ```c static const struct of_device_id qcom_hdmi_phy_28hpm_of_match[] =3D { { .compatible =3D "qcom,hdmi-phy-8974", .data =3D &msm8974_hdmi_phy_cfg }, { }, }; ``` And the new `phy-qcom-qmp-hdmi-msm8998.c` only has MSM8996 in its match tab= le (if any). The `qcom,hdmi-phy-8084` compatible (which shared the 8x74 PHY= config) and `qcom,hdmi-phy-8998` are dropped, breaking those platforms. **Use `device_get_match_data()` instead of `of_device_get_match_data()`** In `phy-qcom-hdmi-preqmp.c`: ```c const struct qcom_hdmi_preqmp_cfg *cfg =3D of_device_get_match_data(dev); ``` And in `phy-qcom-qmp-hdmi-base.c`: ```c const struct qmp_hdmi_phy_cfg *cfg =3D of_device_get_match_data(dev); ``` The kernel community prefers `device_get_match_data()` which works for both= OF and ACPI matching, and avoids the `__iomem` casting warnings that `of_d= evice_get_match_data()` can produce. **Typo in Kconfig help text** ``` config PHY_QCOM_HDMI ... help Enable this to support HDMI PHY presend on pre-QMP Qualcomm platforms ``` "presend" should be "present". **Typo in MODULE_DESCRIPTION** In `phy-qcom-hdmi-preqmp.c`: ```c MODULE_DESCRIPTION("Qualcomm MSMpreqmp HDMI PHY driver"); ``` Should have a space: "Qualcomm MSM pre-QMP HDMI PHY driver" or similar. **Duplicated helper functions** `write16()`, `write24()`, and `read24()` are defined identically in both `p= hy-qcom-hdmi-28lpm.c` and `phy-qcom-hdmi-28hpm.c`. These could be placed in= the shared `phy-qcom-hdmi-preqmp.h` header or a common source file to avoi= d duplication. **`pm_runtime_get_sync` vs `pm_runtime_resume_and_get`** In `phy-qcom-hdmi-preqmp.c`: ```c ret =3D pm_runtime_get_sync(dev); if (ret < 0) { pm_runtime_put_sync(dev); return ret; } ``` `pm_runtime_resume_and_get()` is the preferred pattern =E2=80=94 it handles= the error path automatically, avoiding the need for the manual `pm_runtime= _put_sync()` on failure. **Bridge code conversion looks correct** The `hdmi_bridge.c` changes properly sequence the generic PHY calls: ```c phy_init(hdmi->phy); phy_configure(hdmi->phy, &opts); phy_power_on(hdmi->phy); ... phy_power_off(hdmi->phy); phy_exit(hdmi->phy); ``` This correctly maps to the old `hdmi->phy->funcs->powerup()` / `powerdown()= ` flow. --- --- Generated by Claude Code Patch Reviewer