[PATCH v3 17/21] drm/msm: Export GPU component matching helper

From: Jayant Shekhar

Date: Thu Nov 26 2026 - 01:32:12 EST


The DCP DRM master needs to reuse MSM's GPU-component matching logic.

Assisted-by: LLM
Signed-off-by: Jayant Shekhar <jayant.shekhar@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/msm_drv.c | 6 +++---
drivers/gpu/drm/msm/msm_drv.h | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 3675df277f6a..bb383bb0fe8e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1094,8 +1094,8 @@ static const struct of_device_id msm_gpu_match[] = {
{ },
};

-static int add_gpu_components(struct device *dev,
- struct component_match **matchptr)
+int msm_add_gpu_components(struct device *dev,
+ struct component_match **matchptr)
{
struct device_node *np;

@@ -1154,7 +1154,7 @@ int msm_drv_probe(struct device *master_dev,
}

if (!msm_separate_gpu_kms_components()) {
- ret = add_gpu_components(master_dev, &match);
+ ret = msm_add_gpu_components(master_dev, &match);
if (ret)
return ret;
}
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 2840e8a5052d..aa5dfd82ac6f 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -523,6 +523,8 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout)
/* Driver helpers */

extern const struct component_master_ops msm_drm_ops;
+int msm_add_gpu_components(struct device *dev,
+ struct component_match **matchptr);

int msm_kms_pm_prepare(struct device *dev);
void msm_kms_pm_complete(struct device *dev);

--
2.43.0