* [PATCH] drm/rockchip: dsi: Set .owner = THIS_MODULE in dw_mipi_dsi_dphy_ops
@ 2026-12-03 17:15 Ian Rogers
0 siblings, 0 replies; only message in thread
From: Ian Rogers @ 2026-12-03 17:15 UTC (permalink / raw)
To: Sandy Huang, Heiko Stuebner, Andy Yan
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Nathan Chancellor, dri-devel, linux-rockchip,
linux-arm-kernel, llvm, linux-kernel, Ian Rogers
phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin
the PHY provider module while the PHY is in use, and of_phy_put() calls
module_put(phy->ops->owner). When CONFIG_DRM_ROCKCHIP=m and
CONFIG_ROCKCHIP_DW_MIPI_DSI=y, dw-mipi-dsi-rockchip.o is linked into
rockchipdrm.ko, so omitting .owner leaves phy->ops->owner NULL and does
not pin the module when used as a standalone D-PHY provider.
Set .owner = THIS_MODULE in dw_mipi_dsi_dphy_ops, found with Clang's
require_explicit_initialization attribute.
Fixes: 71f68fe7f121 ("drm/rockchip: dsi: add ability to work as a phy instead of full dsi")
Signed-off-by: Ian Rogers <irogers@google.com>
---
Note: Found using Clang's require_explicit_initialization attribute;
an AI coding assistant helped audit call sites, verify Fixes commits,
and draft the changelog.
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 30d6f83cd5da..d0e2c8338d87 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -1366,6 +1366,7 @@ static const struct phy_ops dw_mipi_dsi_dphy_ops = {
.power_off = dw_mipi_dsi_dphy_power_off,
.init = dw_mipi_dsi_dphy_init,
.exit = dw_mipi_dsi_dphy_exit,
+ .owner = THIS_MODULE,
};
static int __maybe_unused dw_mipi_dsi_rockchip_resume(struct device *dev)
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.56.1.839.g22a8290db9-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-03 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:15 [PATCH] drm/rockchip: dsi: Set .owner = THIS_MODULE in dw_mipi_dsi_dphy_ops Ian Rogers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox