From patchwork Mon Apr 14 06:09:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 3976581 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 768B7C0DA2 for ; Mon, 14 Apr 2014 06:10:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B929F20173 for ; Mon, 14 Apr 2014 06:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9511201DD for ; Mon, 14 Apr 2014 06:10:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbaDNGKD (ORCPT ); Mon, 14 Apr 2014 02:10:03 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48848 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbaDNGJ6 (ORCPT ); Mon, 14 Apr 2014 02:09:58 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4000F41BSKX360@mailout2.samsung.com>; Mon, 14 Apr 2014 15:09:56 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 5C.E0.10364.3BB7B435; Mon, 14 Apr 2014 15:09:56 +0900 (KST) X-AuditID: cbfee690-b7f266d00000287c-23-534b7bb32032 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5B.E2.29263.3BB7B435; Mon, 14 Apr 2014 15:09:55 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.83.67]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N400097VBSIQI40@mmp2.samsung.com>; Mon, 14 Apr 2014 15:09:55 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux-samsung-soc@vger.kernel.org, kyungmin.park@samsung.com, inki.dae@samsung.com, seanpaul@chromium.org, a.hajda@samsung.com, kgene.kim@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com Subject: [PATCH v5 1/9] drm/exynos: add super device support Date: Mon, 14 Apr 2014 15:09:46 +0900 Message-id: <1397455794-7759-2-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1397455794-7759-1-git-send-email-inki.dae@samsung.com> References: <1397455794-7759-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsWyRsSkSHdLtXewwb15TBa31p1jteg9d5LJ Yv4RIOvK1/dsFv1vFrJanHu1ktFi0v0JLBYv7l1ksehdcJXN4mzTG3aLGef3MVksvX6RyWLC 9LUsFq17j7Bb3N1wltFixuSXbA4CHmvmrWH0mN1wkcXjcl8vk8fK5V/YPDat6mTz2P7tAavH /e7jTB59W1YxenzeJBfAGcVlk5Kak1mWWqRvl8CV8ba/h6ng90LmijdbLzA2MO68xdTFyMkh IWAiMbdvAwuELSZx4d56ti5GLg4hgaWMEssebmSHKXrWfY8ZIjGdUeLnqp9QTjeTxOTeDWCj 2ARUJSauuM8GYosImEp0TFrKAlLELPCQSWLFiruMIAlhARuJl28OsYLYLEAN7ce+gDXwCjhL nGqZC1TDAbROQWLOJ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7Z7BguxJpYVV+YeYpTgYFYS 4d2W4RUsxJuSWFmVWpQfX1Sak1p8iDEZ6KaJzFKiyfnANJNXEm9obGJmZGlkbmhhZGxOmrCS OO+BVutAIYH0xJLU7NTUgtQimC1MHJxSDYxiOYW7gwU2T49YZNJ8+XC/hVmSmWDl7OA5Gm94 un5p2U/ewitnZLPvLNOvLSsvLw6om8Mn2mM+8VeOv8JSfqPzJYqON1csFz646OHp2TLrFMTm ODXtkshXOCaXfShG49cv1s2ab3x/LW489aztm0PEsnMB+1cKzl9ic20OU39N+wNetuztB2WU WIozEg21mIuKEwGMft67KQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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. Changlog v3: - Do not probe/remove dpi module if fimd node has no port node. Changelog v4: - Move some codes for getting resources from each bind function to each probe function. . if -EPROBE_DEFER is returned at bind context, components will be bound and unbound repeatedly by deferred probe feature. Changelog v5: - Return error only in case that there is no any compoment attached to master. - Add legacy dt binding support - Probe vidi driver in exynos_drm_init(), and release vidi driver correctly. - Remove duplicated coherent_dma_mask setting. 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 | 273 ++++++++++++++++++++---------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 78 ++++----- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 110 +++++++----- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 87 ++++++++-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 101 +++++++++-- drivers/gpu/drm/exynos/exynos_hdmi.c | 59 ++++--- drivers/gpu/drm/exynos/exynos_mixer.c | 54 ++++-- 12 files changed, 616 insertions(+), 444 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index aed533b..1cc3981 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