From patchwork Thu Mar 2 10:20:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9599847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C9EA600CB for ; Thu, 2 Mar 2017 10:21:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0226F27B2F for ; Thu, 2 Mar 2017 10:21:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EABCA28598; Thu, 2 Mar 2017 10:21:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A905927B2F for ; Thu, 2 Mar 2017 10:21:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6ABD76EACA; Thu, 2 Mar 2017 10:21:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTPS id 652B96EAC2 for ; Thu, 2 Mar 2017 10:21:17 +0000 (UTC) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OM601BGQNFE5P80@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 02 Mar 2017 19:21:14 +0900 (KST) Received: from epsmges1p1.samsung.com (unknown [182.195.40.69]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170302102114epcas1p1b5f13bd9a35a53bf2ad2d3dd00c76015~oCXTKiYMT0747007470epcas1p1p; Thu, 2 Mar 2017 10:21:14 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 79.3C.06711.912F7B85; Thu, 2 Mar 2017 19:21:14 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170302102113epcas1p306e85959e4bbfe1ecb0e5af8fcd18b7d~oCXS1WQ9W3123231232epcas1p37; Thu, 2 Mar 2017 10:21:13 +0000 (GMT) X-AuditID: b6c32a35-f79d66d000001a37-bf-58b7f2192214 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id BD.A1.06425.912F7B85; Thu, 2 Mar 2017 19:21:13 +0900 (KST) Received: from localhost.localdomain ([10.113.63.38]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OM60041RNFALS20@mmp2.samsung.com>; Thu, 02 Mar 2017 19:21:13 +0900 (KST) From: Hoegeun Kwon To: inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v3 5/7] drm/exynos: dsi: Fix the parse_dt function Date: Thu, 02 Mar 2017 19:20:17 +0900 Message-id: <1488450019-6482-6-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1488450019-6482-1-git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tn95cmztzv1l70NuFRPykKzFc6LejS5NGgiK r+paWfm875KPCz6xYMTeemzvDVcBTQipHBOGWwXuHyYisGKTAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHIsWRmVeSWpSXmKPExsVy+t9jQV3JT9sjDN4/0rDoPXeSyeL9sh5G i/lHzrFaXPn6ns3i/fIuNotJ9yewWLx5u4bJ4sW9iywW/Y9fM1ucP7+B3WLT42usFpd3zWGz mHF+H5PF0usXmSxa9x5ht5gx+SWbxcuPJ1gcBD3WzFvD6LFpVSebx/ZvD1g97ncfZ/LYvKTe Y0v/XXaPvi2rGD0+b5IL4Ihys8lITUxJLVJIzUvOT8nMS7dVCg1x07VQUshLzE21VYrQ9Q0J UlIoS8wpBfKMDNCAg3OAe7CSvl2CW8b6LvuCgwIV2zt/sjQw7uXtYuTkkBAwkdh3eCIThC0m ceHeerYuRi4OIYFZjBJ/Tj5ihXC+M0o8PD6JEaSKTUBX4mvPdSaQhIjALUaJM9PPgLUwC7xl lLjz+h8zSJWwgJPE4pOLwTpYBFQldm3exgZi8wq4S/y584kdYp+cxMljk1lBbE4BD4nXc6aA 1QgB1Sw7OYV1AiPvAkaGVYwSqQXJBcVJ6bmGeanlesWJucWleel6yfm5mxjBcfVMagfjwV3u hxgFOBiVeHgPMG2PEGJNLCuuzD3EKMHBrCTCK/gUKMSbklhZlVqUH19UmpNafIjRFOiwicxS osn5wJjPK4k3NDE3MTc2sDC3tDQxUhLnbZz9LFxIID2xJDU7NbUgtQimj4mDU6qBca2D2neD 8gLLaTMESh/wmWUwWdafyP81MeBr3qLumYeyD5X8rfpWdHQDu0aEZrSHWN3MfdlH96xqXt/C qs34WywvqPbtDwkm/ombg7SuLXAJNdnO6qNtduZquECl9O7v+z7H/18g98tWRsrlLq9clMiF z4tOnPNm9X3BWhTPudpi3czcY5v3K7EUZyQaajEXFScCAADi7f/BAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170302102113epcas1p306e85959e4bbfe1ecb0e5af8fcd18b7d X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?6raM7ZqM6re8G1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?SG9lZ2V1biBLd29uG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170302102113epcas1p306e85959e4bbfe1ecb0e5af8fcd18b7d X-RootMTR: 20170302102113epcas1p306e85959e4bbfe1ecb0e5af8fcd18b7d References: <1488450019-6482-1-git-send-email-hoegeun.kwon@samsung.com> Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, javier@osg.samsung.com, Hoegeun Kwon , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP The dsi + panel is a parental relationship, so OF grpah is not needed. Therefore, the current dsi_parse_dt function will throw an error, because there is no linked OF graph for case such as fimd + dsi + panel. So this patch parse the Pll, burst and esc clock frequency properties in dsi_parse_dt and modified to create a bridge_node only if there is an OF graph associated with dsi. So I think the ABI breakage is needed. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index f5c04d0..2d4e118 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1652,39 +1652,23 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) if (ret < 0) return ret; - ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0); - if (!ep) { - dev_err(dev, "no output port with endpoint specified\n"); - return -EINVAL; - } - - ret = exynos_dsi_of_read_u32(ep, "samsung,burst-clock-frequency", + ret = exynos_dsi_of_read_u32(node, "samsung,burst-clock-frequency", &dsi->burst_clk_rate); if (ret < 0) - goto end; + return ret; - ret = exynos_dsi_of_read_u32(ep, "samsung,esc-clock-frequency", + ret = exynos_dsi_of_read_u32(node, "samsung,esc-clock-frequency", &dsi->esc_clk_rate); if (ret < 0) - goto end; - - of_node_put(ep); + return ret; ep = of_graph_get_next_endpoint(node, NULL); - if (!ep) { - ret = -EINVAL; - goto end; - } - - dsi->bridge_node = of_graph_get_remote_port_parent(ep); - if (!dsi->bridge_node) { - ret = -EINVAL; - goto end; + if (ep) { + dsi->bridge_node = of_graph_get_remote_port_parent(ep); + of_node_put(ep); } -end: - of_node_put(ep); - return ret; + return 0; } static int exynos_dsi_bind(struct device *dev, struct device *master,