* [PATCH v2] drm/msm: add missing MODULE_DEVICE_ID definitions
@ 2026-02-28 17:20 Dmitry Baryshkov
2026-03-03 4:09 ` Claude review: " Claude Code Review Bot
2026-03-03 4:09 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2026-02-28 17:20 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Akhil P Oommen,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Marijn Suijten,
David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel,
Loïc Minier
The drm/msm module bundles several drivers, each of them having a
separate OF match table, however only MDSS (subsystem), KMS devices and
GPU have corresponding MODULE_DEVICE_ID tables.
Add MODULE_DEVICE_ID to the display-related driver and to all other
drivers in this module, simplifying userspace job.
Fixes: 060530f1ea67 ("drm/msm: use componentised device support")
Reported-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
The Fixes tag points to the first commit introducing OF-based GPU
matching (and thus possibility for the headless GPU binding). Other
are not usable without the main MDP4 / MDP5 / DPU drivers, so they
didn't get the Fixes tags of their own.
---
Changes in v2:
- Rebased on msm/msm-fixes, dropping GPU chunk and updating the Fixes
tag and the commit message.
- Link to v1: https://lore.kernel.org/r/20260219-msm-device-id-v1-1-9e7315a6fd20@oss.qualcomm.com
---
drivers/gpu/drm/msm/dp/dp_display.c | 1 +
drivers/gpu/drm/msm/dsi/dsi.c | 1 +
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 1 +
drivers/gpu/drm/msm/hdmi/hdmi.c | 1 +
drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 1 +
5 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index a082f4d3ebe2..0d8cb362fb0e 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -210,6 +210,7 @@ static const struct of_device_id msm_dp_dt_match[] = {
{ .compatible = "qcom,x1e80100-dp", .data = &msm_dp_desc_x1e80100 },
{}
};
+MODULE_DEVICE_TABLE(of, msm_dp_dt_match);
static struct msm_dp_display_private *dev_get_dp_display_private(struct device *dev)
{
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index d8bb40ef820e..3c9f01ed6271 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -198,6 +198,7 @@ static const struct of_device_id dt_match[] = {
{ .compatible = "qcom,dsi-ctrl-6g-qcm2290" },
{}
};
+MODULE_DEVICE_TABLE(of, dt_match);
static const struct dev_pm_ops dsi_pm_ops = {
SET_RUNTIME_PM_OPS(msm_dsi_runtime_suspend, msm_dsi_runtime_resume, NULL)
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 7937266de1d2..c59375aaae19 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -582,6 +582,7 @@ static const struct of_device_id dsi_phy_dt_match[] = {
#endif
{}
};
+MODULE_DEVICE_TABLE(of, dsi_phy_dt_match);
/*
* Currently, we only support one SoC for each PHY type. When we have multiple
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index 5afac09c0d33..d5ef5089c9e9 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -441,6 +441,7 @@ static const struct of_device_id msm_hdmi_dt_match[] = {
{ .compatible = "qcom,hdmi-tx-8660", .data = &hdmi_tx_8960_config },
{}
};
+MODULE_DEVICE_TABLE(of, msm_hdmi_dt_match);
static struct platform_driver msm_hdmi_driver = {
.probe = msm_hdmi_dev_probe,
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
index 667573f1db7c..f726555bb681 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
@@ -204,6 +204,7 @@ static const struct of_device_id msm_hdmi_phy_dt_match[] = {
.data = &msm_hdmi_phy_8998_cfg },
{}
};
+MODULE_DEVICE_TABLE(of, msm_hdmi_phy_dt_match);
static struct platform_driver msm_hdmi_phy_platform_driver = {
.probe = msm_hdmi_phy_probe,
---
base-commit: ac47870fd795549f03d57e0879fc730c79119f4b
change-id: 20260219-msm-device-id-84b95d22c0b0
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Claude review: drm/msm: add missing MODULE_DEVICE_ID definitions
2026-02-28 17:20 [PATCH v2] drm/msm: add missing MODULE_DEVICE_ID definitions Dmitry Baryshkov
2026-03-03 4:09 ` Claude review: " Claude Code Review Bot
@ 2026-03-03 4:09 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 4:09 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/msm: add missing MODULE_DEVICE_ID definitions
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patches: 1
Reviewed: 2026-03-03T14:09:11.569887
---
This is a single, straightforward patch that adds missing `MODULE_DEVICE_TABLE(of, ...)` declarations to five MSM DRM sub-drivers (DP, DSI, DSI PHY, HDMI, HDMI PHY). The `drm/msm` module bundles all these sub-drivers into a single `.ko`, and without these declarations, udev's module autoloading won't trigger when only these devices appear in the device tree. The fix is correct and necessary for proper module autoloading.
The patch is minimal, mechanical, and correct. One minor naming concern is noted below but is not a blocking issue.
**Verdict: Looks good. Recommend merge.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: drm/msm: add missing MODULE_DEVICE_ID definitions
2026-02-28 17:20 [PATCH v2] drm/msm: add missing MODULE_DEVICE_ID definitions Dmitry Baryshkov
@ 2026-03-03 4:09 ` Claude Code Review Bot
2026-03-03 4:09 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 4:09 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness**: All five `MODULE_DEVICE_TABLE` additions reference the correct array names for their respective files. Each array is a `static const struct of_device_id[]` properly terminated with `{}`, as expected.
**Minor observation — generic table name in dsi.c**: The DSI driver uses the generic name `dt_match`:
```c
MODULE_DEVICE_TABLE(of, dt_match);
```
This stands out because `adreno/adreno_device.c` also has a `static const struct of_device_id dt_match[]` (without `MODULE_DEVICE_TABLE`). The `MODULE_DEVICE_TABLE` macro creates a global alias symbol `__mod_of__dt_match_device_table`. Currently this works fine since only `dsi.c` generates that alias. However, if a `MODULE_DEVICE_TABLE(of, dt_match)` were ever added to `adreno_device.c`, it would cause a duplicate symbol at link time. All the other tables use descriptive prefixed names (`msm_dp_dt_match`, `dsi_phy_dt_match`, `msm_hdmi_dt_match`, `msm_hdmi_phy_dt_match`), so `dt_match` is inconsistent. This is a pre-existing naming issue though, not something introduced by this patch, so it's not a blocker.
**Fixes tag**: The tag references `060530f1ea67 ("drm/msm: use componentised device support")`, which introduced the component-based driver model requiring module autoloading for sub-devices. The author's note explains the v2 dropped the GPU chunk (presumably already in `msm-fixes`). The commit message still says "only MDSS (subsystem), KMS devices and GPU have corresponding MODULE_DEVICE_ID tables" — this is slightly misleading post-rebase since the GPU `MODULE_DEVICE_TABLE` doesn't appear to be present in the tree. A minor commit message clarity issue, not a code concern.
**No other issues found.** The placement of each `MODULE_DEVICE_TABLE` immediately after its corresponding match table's closing brace is consistent with kernel conventions.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-03 4:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-28 17:20 [PATCH v2] drm/msm: add missing MODULE_DEVICE_ID definitions Dmitry Baryshkov
2026-03-03 4:09 ` Claude review: " Claude Code Review Bot
2026-03-03 4:09 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox