summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorAndrzej Hajda2015-06-11 16:23:37 +0200
committerInki Dae2015-06-19 17:32:55 +0200
commit8665040850e3cb1a5d288bcb2c5164538e80373e (patch)
tree1a2bfd6db2aec4e41da1f61faa6a8304e6d5a2df /drivers/gpu/drm/exynos/exynos_hdmi.c
parentdrm/exynos: consolidate driver/device initialization code (diff)
downloadkernel-qcow2-linux-8665040850e3cb1a5d288bcb2c5164538e80373e.tar.gz
kernel-qcow2-linux-8665040850e3cb1a5d288bcb2c5164538e80373e.tar.xz
kernel-qcow2-linux-8665040850e3cb1a5d288bcb2c5164538e80373e.zip
drm/exynos: fix broken component binding in case of multiple pipelines
In case there are multiple pipelines and deferred probe occurs, only components of the first pipeline were bound. As a result only one pipeline was 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 depend 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> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 8c3c27b6475a..99e286489031 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2360,20 +2360,13 @@ static int hdmi_probe(struct platform_device *pdev)
hdata->display.type = EXYNOS_DISPLAY_TYPE_HDMI;
hdata->display.ops = &hdmi_display_ops;
- ret = exynos_drm_component_add(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR,
- hdata->display.type);
- if (ret)
- return ret;
-
mutex_init(&hdata->hdmi_mutex);
platform_set_drvdata(pdev, hdata);
match = of_match_node(hdmi_match_types, dev->of_node);
- if (!match) {
- ret = -ENODEV;
- goto err_del_component;
- }
+ if (!match)
+ return -ENODEV;
drv_data = (struct hdmi_driver_data *)match->data;
hdata->type = drv_data->type;
@@ -2393,13 +2386,13 @@ static int hdmi_probe(struct platform_device *pdev)
hdata->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(hdata->regs)) {
ret = PTR_ERR(hdata->regs);
- goto err_del_component;
+ return ret;
}
ret = devm_gpio_request(dev, hdata->hpd_gpio, "HPD");
if (ret) {
DRM_ERROR("failed to request HPD gpio\n");
- goto err_del_component;
+ return ret;
}
ddc_node = hdmi_legacy_ddc_dt_binding(dev);
@@ -2410,8 +2403,7 @@ static int hdmi_probe(struct platform_device *pdev)
ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
if (!ddc_node) {
DRM_ERROR("Failed to find ddc node in device tree\n");
- ret = -ENODEV;
- goto err_del_component;
+ return -ENODEV;
}
out_get_ddc_adpt:
@@ -2495,9 +2487,6 @@ err_hdmiphy:
err_ddc:
put_device(&hdata->ddc_adpt->dev);
-err_del_component:
- exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR);
-
return ret;
}
@@ -2517,7 +2506,6 @@ static int hdmi_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
component_del(&pdev->dev, &hdmi_component_ops);
- exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR);
return 0;
}