diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2022-04-19 17:53:45 +0200 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2022-04-25 23:50:46 +0200 |
commit | dc43e923cd1478fad5ec7a2bbb67dc3d00c24f84 (patch) | |
tree | 559e8f3d64f0f9d81e7af9c3c86659af60597e9b /drivers/gpu/drm/msm/msm_mdss.c | |
parent | drm/msm: stop using device's match data pointer (diff) | |
download | linux-dc43e923cd1478fad5ec7a2bbb67dc3d00c24f84.tar.xz linux-dc43e923cd1478fad5ec7a2bbb67dc3d00c24f84.zip |
drm/msm: allow compile time selection of driver components
MSM DRM driver already allows one to compile out the DP or DSI support.
Add support for disabling other features like MDP4/MDP5/DPU drivers or
direct HDMI output support.
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/482508/
Link: https://lore.kernel.org/r/20220419155346.1272627-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_mdss.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_mdss.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index c94b78431687..0af86fc1a130 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -312,8 +312,17 @@ static const struct dev_pm_ops mdss_pm_ops = { static int find_mdp_node(struct device *dev, void *data) { - return of_match_node(dpu_dt_match, dev->of_node) || - of_match_node(mdp5_dt_match, dev->of_node); +#ifdef CONFIG_DRM_MSM_DPU + if (of_match_node(dpu_dt_match, dev->of_node)) + return true; +#endif + +#ifdef CONFIG_DRM_MSM_MDP5 + if (of_match_node(mdp5_dt_match, dev->of_node)) + return true; +#endif + + return false; } static int mdss_probe(struct platform_device *pdev) |