From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796527575; b=mwtRXypPed2FMuG/L8dxrjwOzJp1zf5iZgT87mWSHsjK2T30tpUrKWC7dHNIGjR3ktbw FEU3vp/EOEfjcjOhMPzpOpEFVHfEVrEbFmCllisKUq1bDFgfy6uVO4ABPoPYr4Tj6oKQ+ 4cwIYWVt3fQes7ckz0jHbWBrPXyzWO9DjZPECVdqaQ8vFJ5/9LNcVHWPfU9E8ZYvqv+ly eBX32Tjog0KwcwlATRtLwzqjQWLyEijsNcBMeobLunGsvypiQrd1XrZI2yakNLU5ocZlE RDx6vHWW72MWJLHaecmA7zTa7XE6c0/ikSwn1wbPU52zZ1n8Xl1vN3zW6xkZXEFCT2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796527575; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=wstxzyyAc7Xva441VsAIkGPGPSPelHyDZPZNcwYqP24=; b=HFMOaHGqFKfNdIMthcCZpxipydosicDz1jJZmxU8ltT2sBFaAcEvTs4H7l8kot0odHdl 8vMCffwYSHegSr3Isj2KMKXI+Zk/l6vH2wamNi3YFpzEW+ZxG/ydrUJdYjbv/ztLbl5e/ aCmdwv2J1il6RMc1dwPczOBuOEyofXHPAV+1O4wJWkqTt9mf9c3tG0neFDm/MlZk8HKMW GKdyIxg/UVCTYdRamqGp+wOTS78SI4NpaWxERIyyc/mLbWe7K15MFGCeE6oy+l1a/UE+D AjZ5M5VTh53FvnG9u6xM18kpUr0rd2L4jbsZs04CHj3wMovTlFjrzaDeLWweU6C6zrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QjqUwzNV; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C168606A321 for ; Sun, 6 Dec 2026 03:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QjqUwzNV Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1215A1F0093B; Sun, 6 Dec 2026 03:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796527575; bh=wstxzyyAc7Xva441VsAIkGPGPSPelHyDZPZNcwYqP24=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QjqUwzNV9BDx4794dctTZbMiLXR7PVgSHul5nrTy7NRTV9LwHzMgf6SiWGlsckWfs B6wEh6rShd0yGOffPHkEJLEK1fG95QcmoGrb4nxyE3MXu2Pn+Xh14HVpdx6MuOHH9z UbvOnswN6QKd+KeV6AjDca4+8v8N636MB6gqsit7ENUBiS7ByhlAo/E3CO8uT0wGs4 U0Cyp7XHl16/W0PZsgyEzYKcFbQiUlBtUdBGqqRk0YhJOH67NS8JwfbuY8BLv4JPvG c4vo/3t99Keb+R/CezOBRE4mjNfUR/DxI4V0+ToM3ZqBA53VEtDATkVtAWnmxoBv8C 3knOnde5taZ9g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/5] drm/rockchip: lvds: Add RK3128 support Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?TW9sbsOhciBNw6F0w6k=?= Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261206-rk3128-lvds-v1-4-09543f8e1e9f@gmail.com> References: <20261206-rk3128-lvds-v1-0-09543f8e1e9f@gmail.com> <20261206-rk3128-lvds-v1-4-09543f8e1e9f@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 03:26:14 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] drm/rockchip: Inno D-PHY left uncycled across RK3128 LVDS disable/enable - [Low] drm/rockchip: unbalanced pm_runtime_put() on rk3128 LVDS enable error -- commit 167c38fbb5c46d1d5b1e6afa49ade12ee926ef77 Author: Moln=C3=A1r M=C3=A1t=C3=A9 drm/rockchip: lvds: Add RK3128 support This commit adds RK3126/RK3128 LVDS transmitter support to the Rockchip LVDS driver, configuring GRF_LVDS_CON0 in new encoder enable/disable callbacks and factoring D-PHY initialization out of px30_lvds_probe() into a shared helper. > diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/r= ockchip/rockchip_lvds.c > index 231258974639a..a187e1caf3238 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c > +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c > @@ -422,6 +422,43 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_he= lper_funcs =3D { [ ... ] > +static void rk3128_lvds_encoder_enable(struct drm_encoder *encoder) > +{ > + struct rockchip_lvds *lvds =3D encoder_to_lvds(encoder); > + int ret; > + > + ret =3D pm_runtime_resume_and_get(lvds->dev); > + if (ret < 0) { > + DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret); > + return; > + } [Severity: Low] Can this early return cause an unbalanced pm_runtime_put() in rk3128_lvds_encoder_disable()? Because drm_encoder_helper_funcs.enable is void, DRM still treats the encoder as enabled if pm_runtime_resume_and_get() fails (for example, via the dphy supplier in RK3128_PD_VIO). The later disable then calls pm_runtime_put(lvds->dev), underflowing the runtime PM usage count. Tracking whether runtime PM was acquired on struct rockchip_lvds before calling pm_runtime_put() would avoid the imbalance. > + regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0, > + RK3128_LVDS_P2S_EN(1) | RK3128_LVDS_MODE_EN(1) | > + RK3128_LVDS_MSBSEL(1) | RK3128_LVDS_FORMAT(lvds->format)); > +} > + > +static void rk3128_lvds_encoder_disable(struct drm_encoder *encoder) > +{ > + struct rockchip_lvds *lvds =3D encoder_to_lvds(encoder); > + > + regmap_write(lvds->grf, RK3128_GRF_LVDS_CON0, > + RK3128_LVDS_P2S_EN(0) | RK3128_LVDS_MODE_EN(0)); > + pm_runtime_put(lvds->dev); > +} [Severity: High] Does leaving lvds->dphy uncycled across disable and enable break LVDS output after system suspend/resume? rockchip_lvds_dphy_init() calls phy_power_on(lvds->dphy) once at probe time, while rk3128_lvds_encoder_disable() and rk3128_lvds_encoder_enable() never call phy_power_off() or phy_power_on(). During system suspend, RK3128_PD_VIO is powered off and the Inno D-PHY loses its register state. Because inno_dsidphy_driver has no suspend/resume callbacks and rockchip_drm_sys_resume() relies on drm_mode_config_helper_resume() to re-enable the encoder, the D-PHY is never reinitialized on resume. It also keeps its PLL, clocks, and RK3128_PD_VIO active during DPMS off. Cycling phy_power_off()/phy_power_on() in disable/enable (while ensuring rockchip_lvds_unbind() does not disable an already-disabled encoder) would restore D-PHY state on resume and allow it to power down when blanked. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206-rk3128-lvd= s-v1-0-09543f8e1e9f@gmail.com?part=3D4