summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_io_utils.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2024-02-08 18:01:09 +0300
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2024-02-19 14:39:39 +0300
commit39b06ed6d4f325072f479bf5358cfe2013569e27 (patch)
tree8f69545b9a1e6e3bb6cadbb6719b9ee1b59bcd25 /drivers/gpu/drm/msm/msm_io_utils.c
parentd2570ee67a4719802f7ce4ad79260a97f07c6bd9 (diff)
downloadlinux-39b06ed6d4f325072f479bf5358cfe2013569e27.tar.xz
drm/msm/dpu: support binding to the mdp5 devices
Existing MDP5 devices have slightly different bindings. The main register region is called `mdp_phys' instead of `mdp'. Also vbif register regions are a part of the parent, MDSS device. Add support for handling this binding differences. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/577505/ Link: https://lore.kernel.org/r/20240208-fd-migrate-mdp5-v4-2-945d08ef3fa8@linaro.org
Diffstat (limited to 'drivers/gpu/drm/msm/msm_io_utils.c')
-rw-r--r--drivers/gpu/drm/msm/msm_io_utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index 59d2788c4510..afedd61c3e28 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -50,6 +50,19 @@ struct clk *msm_clk_get(struct platform_device *pdev, const char *name)
return clk;
}
+void __iomem *msm_ioremap_mdss(struct platform_device *mdss_pdev,
+ struct platform_device *pdev,
+ const char *name)
+{
+ struct resource *res;
+
+ res = platform_get_resource_byname(mdss_pdev, IORESOURCE_MEM, name);
+ if (!res)
+ return ERR_PTR(-EINVAL);
+
+ return devm_ioremap_resource(&pdev->dev, res);
+}
+
static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,
bool quiet, phys_addr_t *psize)
{