From patchwork Thu Feb 9 01:26:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9565837 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 5174B601E9 for ; Fri, 10 Feb 2017 01:43:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 444B428540 for ; Fri, 10 Feb 2017 01:43:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 392202853F; Fri, 10 Feb 2017 01:43:00 +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 AD8D12853F for ; Fri, 10 Feb 2017 01:42:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE5C16EBF5; Fri, 10 Feb 2017 01:41:35 +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 2FC4F6E146 for ; Thu, 9 Feb 2017 01:37:18 +0000 (UTC) Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OL30278G2PG2C00@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 09 Feb 2017 10:27:16 +0900 (KST) Received: from epsmges1p1.samsung.com (unknown [182.195.40.70]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170209012716epcas1p20a3a735012a5d916451a73211cf7b072~heiGENhT00378903789epcas1p2m; Thu, 9 Feb 2017 01:27:16 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id C1.71.06731.475CB985; Thu, 9 Feb 2017 10:27:16 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170209012716epcas1p33915757c95d5defb88c7d2c54cee3582~heiFyCksN2446124461epcas1p31; Thu, 9 Feb 2017 01:27:16 +0000 (GMT) X-AuditID: b6c32a35-f79166d000001a4b-10-589bc57412f0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id F7.B4.06487.375CB985; Thu, 9 Feb 2017 10:27:16 +0900 (KST) Received: from khg_DeskTop.10.32.193.11 ([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 <0OL3001BI2PBUE70@mmp2.samsung.com>; Thu, 09 Feb 2017 10:27:15 +0900 (KST) From: Hoegeun Kwon To: inki.dae@samsung.com, robh+dt@kernel.org, krzk@kernel.org Subject: [PATCH v2 1/5] drm/exynos: dsi: Fix the parse_dt function Date: Thu, 09 Feb 2017 10:26:37 +0900 Message-id: <1486603601-26826-2-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1486603601-26826-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDKsWRmVeSWpSXmKPExsWy7bCmvm7J0dkRBvNahC3mHznHanHl63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/HZNG69wi7A7vHplWdbB73u48zefRtWcXo8XmTXABLlJtN RmpiSmqRQmpecn5KZl66rVJoiJuuhZJCXmJuqq1ShK5vSJCSQlliTimQZ2SABhycA9yDlfTt EtwyLt6YxVzQL1AxvXcbcwPjBN4uRk4OCQETiZfTf7FB2GISF+6tB7K5OIQEZjFKfDx1ghnC +cUosbi1hQWkik1AV+Jrz3UmEFtEwFbiVON5sCJmgV5GifaPv5hBEsICThLbnlxmBbFZBFQl Wt+0gDXwCnhI3P54gQVinZzEyWOTwWo4BTwlHvw8B1YjBFTzdscaxgmMvAsYGVYxSqQWJBcU J6XnGuallusVJ+YWl+al6yXn525iBAfzM6kdjAd3uR9iFOBgVOLhLaidHSHEmlhWXJl7iFGC g1lJhNfgMFCINyWxsiq1KD++qDQntfgQoynQYROZpUST84GRllcSb2hibmJubGBhbmlpYqQk zts4+1m4kEB6YklqdmpqQWoRTB8TB6dUA+OCRfdWTTIQKTbPCN91oCjqUu+9jRICv2q1HFZv ldzzuspl+aXe19qLV7+eJ+GXYxRtwvpv8d+tPh6Bey/sM1LY+EC5w+/DpS2Bf87fWXzu+TsP WeHqK/cnfTbJu198oo9x8q6Smb76xzok55W+tGo/GP39LOdh1ZVfD3yvL+7RmC54zvZbk3WY EktxRqKhFnNRcSIA9RXdWHwCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170209012716epcas1p33915757c95d5defb88c7d2c54cee3582 X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?6raM7ZqM6re8G1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzMo7IKs7JuQKS/sgqzsm5A=?= X-Global-Sender: =?UTF-8?B?SG9lZ2V1biBLd29uG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTMy9Bc3Npc3RhbnQgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170209012716epcas1p33915757c95d5defb88c7d2c54cee3582 X-RootMTR: 20170209012716epcas1p33915757c95d5defb88c7d2c54cee3582 References: <1486603601-26826-1-git-send-email-hoegeun.kwon@samsung.com> X-Mailman-Approved-At: Fri, 10 Feb 2017 01:41:18 +0000 Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Hoegeun Kwon , dri-devel@lists.freedesktop.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 --- 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 e07cb1f..214d486 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,