From patchwork Mon Apr 21 22:39:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4027881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C0DDE9F319 for ; Tue, 22 Apr 2014 01:30:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB7F520357 for ; Tue, 22 Apr 2014 01:30:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 13578202B8 for ; Tue, 22 Apr 2014 01:30:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BFB96E7AE; Mon, 21 Apr 2014 18:30:17 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id AC9D06E460 for ; Mon, 21 Apr 2014 15:39:56 -0700 (PDT) Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4E00FYMKAK4H10@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 22 Apr 2014 07:39:56 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id DC.9D.14563.B3E95535; Tue, 22 Apr 2014 07:39:55 +0900 (KST) X-AuditID: cbfee68e-b7fd86d0000038e3-0e-53559e3b80d0 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D4.82.27725.B3E95535; Tue, 22 Apr 2014 07:39:55 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4E00B0HKA7C630@mmp1.samsung.com>; Tue, 22 Apr 2014 07:39:55 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH V2 4/9] drm/exynos: add exynos_dp_panel driver registration to drm driver Date: Tue, 22 Apr 2014 04:09:13 +0530 Message-id: <1398119958-32005-5-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398119958-32005-1-git-send-email-ajaykumar.rs@samsung.com> References: <1398119958-32005-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsWyRsSkVtd6Xmiwwfql1hYH3h9ksdjwZiGz xZWv79ksJt2fwGLxfdcXdosZ5/cxWaw6vIHdYu7BXAcOj52z7rJ7LNhU6nG/+ziTR9+WVYwe nzfJBbBGcdmkpOZklqUW6dslcGWc37qUpeCoUMXBTSfZGhj7BLoYOTkkBEwktv26ywphi0lc uLeerYuRi0NIYCmjxNl5X1lhih5Pmc4IkVjEKPF8+hEoZwKTxITW70wgVWwC2hLbpt9kAbFF BNwkmg7PZAUpYhaYwShx9+UDoLkcHMIC0RLX+sxAalgEVCWmrVrOCGLzCnhILLmwG6xEQkBB Ys4kG5Awp4CnxPZ5f8GOEAIqmbjnBzvISAmBZewS99s72SDmCEh8m3yIBaJXVmLTAWaIoyUl Dq64wTKBUXgBI8MqRtHUguSC4qT0IiO94sTc4tK8dL3k/NxNjMBgP/3vWd8OxpsHrA8xJgON m8gsJZqcD4yWvJJ4Q2MzIwtTE1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LfUazizGv/qXd5/Zlv2nXXBV1Zy+zzv+GFSaFAumev2fP7721eVWIozEg21mIuKEwGM E7Sm6QIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Mon, 21 Apr 2014 18:29:54 -0700 Cc: seanpaul@google.com, joshi@samsung.com, ajaynumb@gmail.com, prashanth.g@samsung.com, Ajay Kumar X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Register exynos_dp_panel before the list of exynos crtcs and connectors are probed. This is needed because exynos_dp_panel should be registered to the drm_panel list via panel-exynos-dp probe, i.e much before exynos_dp_bind calls of_drm_find_panel(). Signed-off-by: Ajay Kumar --- Changes since V1: Added platform_driver_unregister(&exynos_dp_panel_driver) to exynos_drm_platform_remove as per Jingoo Han's correction drivers/gpu/drm/exynos/exynos_drm_drv.c | 15 +++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 1d653f8..2db7f67 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -530,12 +530,23 @@ static int exynos_drm_platform_probe(struct platform_device *pdev) goto err_unregister_ipp_drv; #endif +#ifdef CONFIG_DRM_PANEL_EXYNOS_DP + ret = platform_driver_register(&exynos_dp_panel_driver); + if (ret < 0) + goto err_unregister_dp_panel; +#endif + ret = component_master_add(&pdev->dev, &exynos_drm_ops); if (ret < 0) DRM_DEBUG_KMS("re-tried by last sub driver probed later.\n"); return 0; +#ifdef CONFIG_DRM_PANEL_EXYNOS_DP + platform_driver_unregister(&exynos_dp_panel_driver); +err_unregister_dp_panel: +#endif + #ifdef CONFIG_DRM_EXYNOS_IPP err_unregister_ipp_drv: platform_driver_unregister(&ipp_driver); @@ -587,6 +598,10 @@ err_unregister_fimd_drv: static int exynos_drm_platform_remove(struct platform_device *pdev) { +#ifdef CONFIG_DRM_PANEL_EXYNOS_DP + platform_driver_unregister(&exynos_dp_panel_driver); +#endif + #ifdef CONFIG_DRM_EXYNOS_IPP exynos_platform_device_ipp_unregister(); platform_driver_unregister(&ipp_driver); diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index fc15fe6..b33050d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -368,4 +368,5 @@ extern struct platform_driver fimc_driver; extern struct platform_driver rotator_driver; extern struct platform_driver gsc_driver; extern struct platform_driver ipp_driver; +extern struct platform_driver exynos_dp_panel_driver; #endif