From 8665040850e3cb1a5d288bcb2c5164538e80373e Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Thu, 11 Jun 2015 23:23:37 +0900 Subject: 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 Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'drivers/gpu/drm/exynos/exynos_drm_vidi.c') diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index a12ae3850256..a277191343ba 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -505,16 +505,6 @@ static int vidi_probe(struct platform_device *pdev) ctx->default_win = 0; ctx->pdev = pdev; - ret = exynos_drm_component_add(&pdev->dev, EXYNOS_DEVICE_TYPE_CRTC, - EXYNOS_DISPLAY_TYPE_VIDI); - if (ret) - return ret; - - ret = exynos_drm_component_add(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR, - ctx->display.type); - if (ret) - goto err_del_crtc_component; - INIT_WORK(&ctx->work, vidi_fake_vblank_handler); mutex_init(&ctx->lock); @@ -524,7 +514,7 @@ static int vidi_probe(struct platform_device *pdev) ret = device_create_file(&pdev->dev, &dev_attr_connection); if (ret < 0) { DRM_ERROR("failed to create connection sysfs.\n"); - goto err_del_conn_component; + return ret; } ret = component_add(&pdev->dev, &vidi_component_ops); @@ -535,10 +525,6 @@ static int vidi_probe(struct platform_device *pdev) err_remove_file: device_remove_file(&pdev->dev, &dev_attr_connection); -err_del_conn_component: - exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR); -err_del_crtc_component: - exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CRTC); return ret; } @@ -555,8 +541,6 @@ static int vidi_remove(struct platform_device *pdev) } component_del(&pdev->dev, &vidi_component_ops); - exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CONNECTOR); - exynos_drm_component_del(&pdev->dev, EXYNOS_DEVICE_TYPE_CRTC); return 0; } -- cgit v1.2.3