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/bridge: cdns-dsi: Replace deprecated UNIVERSAL_DEV_PM_OPS() Date: Sun, 12 Apr 2026 13:22:18 +1000 Message-ID: In-Reply-To: <20260407144142.1420354-2-ivitro@gmail.com> References: <20260407144142.1420354-2-ivitro@gmail.com> <20260407144142.1420354-2-ivitro@gmail.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 **Correctness: Good** The core change is replacing: ```c static UNIVERSAL_DEV_PM_OPS(cdns_dsi_pm_ops, cdns_dsi_suspend, cdns_dsi_res= ume, NULL); ``` with: ```c static const struct dev_pm_ops cdns_dsi_pm_ops =3D { RUNTIME_PM_OPS(cdns_dsi_suspend, cdns_dsi_resume, NULL) }; ``` This is correct because: 1. `UNIVERSAL_DEV_PM_OPS` (pm.h:458-462) expands to both `SET_SYSTEM_SLEEP_= PM_OPS` and `SET_RUNTIME_PM_OPS` using the *same* callbacks, which is exact= ly what causes the double-disable bug described in the commit message. 2. The bridge's `atomic_pre_enable` calls `pm_runtime_get_sync()` (line 736= ) and `atomic_post_disable` calls `pm_runtime_put()` (line 631). This means= the DRM framework already handles bringing the device in/out of runtime PM= around display usage. During system suspend, the DRM core will call `atomi= c_post_disable` which triggers `pm_runtime_put` =E2=86=92 runtime suspend = =E2=86=92 `cdns_dsi_suspend`. There is no need for separate system sleep PM= ops. 3. The `__maybe_unused` removal from `cdns_dsi_resume` and `cdns_dsi_suspen= d` is correct. The old `SET_RUNTIME_PM_OPS` macro was conditionally compile= d (guarded by `#ifdef CONFIG_PM`), which could leave the functions unrefere= nced when PM was disabled, requiring `__maybe_unused`. The new `RUNTIME_PM_= OPS` macro (pm.h:338-341) unconditionally expands regardless of CONFIG_PM, = so the functions are always referenced. The `pm_ptr()` wrapper on the drive= r side handles the compile-out when CONFIG_PM is disabled. 4. The change from `.pm =3D &cdns_dsi_pm_ops` to `.pm =3D pm_ptr(&cdns_dsi_= pm_ops)` is the correct modern pattern =E2=80=94 it compiles out the PM ops= pointer when `CONFIG_PM` is not enabled, allowing the compiler to dead-cod= e-eliminate the entire `cdns_dsi_pm_ops` structure and the suspend/resume f= unctions. **Minor note on commit message:** The commit message text says "SET_RUNTIME= _PM_OPS()" but the actual code uses `RUNTIME_PM_OPS()`. These are functiona= lly equivalent (`SET_RUNTIME_PM_OPS` is just an alias per pm.h:365-366), bu= t ideally the commit message would match the code. This is a very minor nit= and not worth respinning the patch for, especially since it already has a = Reviewed-by. **No issues found. Patch is ready to merge.** --- Generated by Claude Code Patch Reviewer