From patchwork Tue Apr 1 12:37:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 3922101 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 98D649F2F7 for ; Tue, 1 Apr 2014 12:38:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1629A203AF for ; Tue, 1 Apr 2014 12:38:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 45998203C4 for ; Tue, 1 Apr 2014 12:38:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89DAC6E658; Tue, 1 Apr 2014 05:38:09 -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 1ABDA6E64B for ; Tue, 1 Apr 2014 05:38:05 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3C00MCHR3GRI40@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 01 Apr 2014 21:38:04 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id E6.CB.14803.B23BA335; Tue, 01 Apr 2014 21:38:04 +0900 (KST) X-AuditID: cbfee691-b7efc6d0000039d3-61-533ab32b7f32 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 98.9D.29263.B23BA335; Tue, 01 Apr 2014 21:38:03 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.75.62]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N3C005N9R3E6X60@mmp2.samsung.com>; Tue, 01 Apr 2014 21:38:03 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/7] drm/exynos: add super device support Date: Tue, 01 Apr 2014 21:37:56 +0900 Message-id: <1396355882-17010-2-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1396355882-17010-1-git-send-email-inki.dae@samsung.com> References: <1396355882-17010-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsWyRsSkRFdns1Wwwac+Dotb686xWvSeO8lk ceXrezaLSfcnsFicbXrDbnF3w1lGBzaP2Q0XWTy2f3vA6nG/+ziTR9+WVYwBLFFcNimpOZll qUX6dglcGfuXXmQrOP+bqWLe8inMDYwbdzN1MXJySAiYSHTdeMYMYYtJXLi3nq2LkYtDSGAp o8TJpwsYYYo6T7SD2UIC0xklfk+pgSjqZpJ4+PspK0iCTUBVYuKK+2wgtoiAqUTHpKUsXYwc HMwCORJXN/CDhIUFbCS+tz8AK2EBKn856T2YzSvgIvHjzg9WkHIJAQWJOZNsQMKcAq4Sd27f AAsLAZVc31QEslVCoJ9d4unta0wQYwQkvk0+xALRKiux6QDUK5ISB1fcYJnAKLyAkWEVo2hq QXJBcVJ6kalecWJucWleul5yfu4mRmBIn/73bOIOxvsHrA8xJgONm8gsJZqcD4yJvJJ4Q2Mz IwtTE1NjI3NLM9KElcR50x8lBQkJpCeWpGanphakFsUXleakFh9iZOLglGpgLE4qn7iZccEP l3d1x8Qu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000000000000000@CPGS X-CFilter-Loop: Reflected Cc: a.hajda@samsung.com, kyungmin.park@samsung.com 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 This patch adds super device support to bind sub drivers using device tree. For this, you should add a super device node to each machine dt files like belows, In case of using MIPI-DSI, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>, <&dsi>; }; In case of using DisplayPort, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>, <&dp>; }; In case of using Parallel panel, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>; }; And if you don't add connector device node to ports property, default parallel panel driver, exynos_drm_dpi module, will be used. ports property can have the following device nodes, fimd, mixer, Image Enhancer, MIPI-DSI, eDP, LVDS Bridge, or HDMI With this patch, we can resolve the probing order issue without some global lists. So this patch also removes the unnecessary lists and stuff related to these lists. Previous RFC patch, http://www.spinics.net/lists/dri-devel/msg54671.html Changelog since RFC patch: - Register sub drivers and probe them at load(). In case of non sub drivers, sub driver probe is needed. - Enable runtime pm at fimd_probe() instead of fimd_bind(). runtime pm should be enabled before iommu device is attached to fimd device. - Do not return an error with component_master_add fail. - Remove super device support from mipi dsi driver which was in RFC. - Add super device support to parallel driver. Changelog v2: - Add super device support to mipi dsi driver. - Bind fimd driver only in case that a drm_panel for parallel panel driver is added to panel_list of drm_panel module. - Change super node name to 'display-subsystem' . 'exynos-drm' is specific to Linux so change it to generic name. - Change propery name of super node to 'ports' . crtcs and connectors propery names are also specific to Linux so change them to generic name. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_dp_core.c | 45 ++++--- drivers/gpu/drm/exynos/exynos_drm_core.c | 216 +++++------------------------- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 17 +++ drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 + drivers/gpu/drm/exynos/exynos_drm_dpi.c | 16 ++- drivers/gpu/drm/exynos/exynos_drm_drv.c | 202 +++++++++++++++------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 73 +++++----- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 38 +++++- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 76 ++++++++--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 61 +++++++-- drivers/gpu/drm/exynos/exynos_hdmi.c | 45 ++++--- drivers/gpu/drm/exynos/exynos_mixer.c | 54 ++++++-- 12 files changed, 442 insertions(+), 405 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index a59bca9..cb9aa58 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include