From: Ian Rogers <irogers@google.com>
To: Sandy Huang <hjc@rock-chips.com>,
Heiko Stuebner <heiko@sntech.de>, Andy Yan <andyshrk@163.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Nathan Chancellor <nathan@kernel.org>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev,
linux-kernel@vger.kernel.org, Ian Rogers <irogers@google.com>
Subject: [PATCH] drm/rockchip: dsi: Set .owner = THIS_MODULE in dw_mipi_dsi_dphy_ops
Date: Thu, 3 Dec 2026 09:15:03 -0800 [thread overview]
Message-ID: <20261203171504.437153-1-irogers@google.com> (raw)
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
reply other threads:[~2026-12-03 17:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203171504.437153-1-irogers@google.com \
--to=irogers@google.com \
--cc=airlied@gmail.com \
--cc=andyshrk@163.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nathan@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox