From patchwork Thu Mar 27 12:43:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 3897881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96893BF549 for ; Thu, 27 Mar 2014 12:44:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29E7120240 for ; Thu, 27 Mar 2014 12:44:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4C30620253 for ; Thu, 27 Mar 2014 12:44:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DAA386E914; Thu, 27 Mar 2014 05:43:58 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 652706E914 for ; Thu, 27 Mar 2014 05:43:57 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N33006DTI164Y10@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 27 Mar 2014 21:43:54 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 8B.57.14803.90D14335; Thu, 27 Mar 2014 21:43:54 +0900 (KST) X-AuditID: cbfee691-b7efc6d0000039d3-19-53341d0947f7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 84.CA.29263.90D14335; Thu, 27 Mar 2014 21:43:53 +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 <0N3300FWWI144G90@mmp2.samsung.com>; Thu, 27 Mar 2014 21:43:53 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm/exynos: add super device support Date: Thu, 27 Mar 2014 21:43:50 +0900 Message-id: <1395924232-26673-2-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1395924232-26673-1-git-send-email-inki.dae@samsung.com> References: <1395924232-26673-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNLMWRmVeSWpSXmKPExsWyRsSkRJdL1iTY4OccDotb686xWvSeO8lk ceXrezaLSfcnsFicbXrDbnF3w1lGBzaP2Q0XWTy2f3vA6nG/+ziTR9+WVYwBLFFcNimpOZll qUX6dglcGff2XGEu+H6PqaJ3vnsD4/TFTF2MnBwSAiYS7R/ns0DYYhIX7q1n62Lk4hASWMoo 8evEYkaYoo1bd7NDJKYzSky9NIEJwulmkphydQo7SBWbgKrExBX32UBsEQFTiY5JS4HGcnAw C+RIXN3AD2IKC1hKbDoHNpMFqHrZ1JXMIDavgIvE8t5FrCAlEgIKEnMm2YCYnAKuEk2LC0Eq hIAqdp69CXaahMBkdonHf+4wQ4wRkPg2+RALRKusxKYDzBAXS0ocXHGDZQKj8AJGhlWMoqkF yQXFSelFpnrFibnFpXnpesn5uZsYgQF9+t+ziTsY7x+wPsSYDDRuIrOUaHI+MCLySuINjc2M LExNTI2NzC3NSBNWEudNf5QUJCSQnliSmp2aWpBaFF9UmpNafIiRiYNTqoExo7le8NCz48W6 mvza1/K3l7M9Npx3WTuH3XkFkw2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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.6 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, exynos-drm { compatible = "samsung,exynos-drm"; crtcs = <&fimd>; connectors = <&dsi>; }; In case of using DisplayPort, exynos-drm { compatible = "samsung,exynos-drm"; crtcs = <&fimd>; connectors = <&dp>; }; In case of using Parallel panel, exynos-drm { compatible = "samsung,exynos-drm"; crtcs = <&fimd>; connectors = <&panel>; }; And if you don't add connectors property to machine dt file like below, default parallel panel feature of exynos_drm_dpi module will be used as default. exynos-drm { compatible = "samsung,exynos-drm"; crtcs = <&fimd>; }; crtcs property can have the following device nodes, fimd or mixer connectors property can have the following device nodes, Panel, MIPI-DSI, eDP, 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. 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 | 14 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 218 +++++++++++++++++------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 69 ++++------ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 57 ++++++-- 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 ++++++-- 11 files changed, 401 insertions(+), 399 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