summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_dsi.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2015-05-29 13:46:51 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:46:02 +0900
commit6a3a8d8a25b6e9349ec60c0e82edaf9c8bdb2ec3 (patch)
treeabc491ba6e03fb5bd006a4af04af2028e01ec236 /drivers/gpu/drm/exynos/exynos_drm_dsi.c
parent75dcaa096bd25f92e8822fbac44a02b5253b00b4 (diff)
drm/exynos: fix broken component binding in case of multiple pipelines
In case there are multiple pipelines and deferred probe occurs, only components of first pipeline were bound. As a result only one pipeline were available. The main cause of this issue was dynamic generation of component match table - every component driver during probe registered itself on helper list, if there was at least one pipeline present on this list component match table were created without deferred components. This patch removes this helper list, instead it creates match table from existing devices requiring exynos_drm KMS drivers. This way match table do not depends on probe/deferral order and contains all KMS components. As a side effect patch makes the code cleaner and significantly smaller. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_dsi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dsi.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index f89018b1e22a..46d2ec7e2716 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1865,11 +1865,6 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dsi->display.type = EXYNOS_DISPLAY_TYPE_LCD;
dsi->display.ops = &exynos_dsi_display_ops;
- ret = exynos_drm_component_add(dev, EXYNOS_DEVICE_TYPE_CONNECTOR,
- dsi->display.type);
- if (ret)
- return ret;
-
/* To be checked as invalid one */
dsi->te_gpio = -ENOENT;
@@ -1885,7 +1880,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
ret = exynos_dsi_parse_dt(dsi);
if (ret)
- goto err_del_component;
+ return ret;
dsi->supplies[0].supply = "vddcore";
dsi->supplies[1].supply = "vddio";
@@ -1900,7 +1895,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
sizeof(*dsi->clks) * dsi->driver_data->num_clks,
GFP_KERNEL);
if (!dsi->clks)
- goto err_del_component;
+ return -ENOMEM;
for (i = 0; i < dsi->driver_data->num_clks; i++) {
dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
@@ -1913,8 +1908,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dev_info(dev, "failed to get the clock: %s\n",
clk_names[i]);
- ret = PTR_ERR(dsi->clks[i]);
- goto err_del_component;
+ return PTR_ERR(dsi->clks[i]);
}
}
@@ -1922,22 +1916,19 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dsi->reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(dsi->reg_base)) {
dev_err(dev, "failed to remap io region\n");
- ret = PTR_ERR(dsi->reg_base);
- goto err_del_component;
+ return PTR_ERR(dsi->reg_base);
}
dsi->phy = devm_phy_get(dev, "dsim");
if (IS_ERR(dsi->phy)) {
dev_info(dev, "failed to get dsim phy\n");
- ret = PTR_ERR(dsi->phy);
- goto err_del_component;
+ return PTR_ERR(dsi->phy);
}
dsi->irq = platform_get_irq(pdev, 0);
if (dsi->irq < 0) {
dev_err(dev, "failed to request dsi irq resource\n");
- ret = dsi->irq;
- goto err_del_component;
+ return dsi->irq;
}
irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
@@ -1946,26 +1937,17 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dev_name(dev), dsi);
if (ret) {
dev_err(dev, "failed to request dsi irq\n");
- goto err_del_component;
+ return ret;
}
platform_set_drvdata(pdev, &dsi->display);
- ret = component_add(dev, &exynos_dsi_component_ops);
- if (ret)
- goto err_del_component;
-
- return ret;
-
-err_del_component:
- exynos_drm_component_del(dev, EXYNOS_DEVICE_TYPE_CONNECTOR);
- return ret;
+ return component_add(dev, &exynos_dsi_component_ops);
}
static int exynos_dsi_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &exynos_dsi_component_ops);
- exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR);
return 0;
}