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: 9563857 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 4C55A601EA for ; Thu, 9 Feb 2017 01:27:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFAE72029B for ; Thu, 9 Feb 2017 01:27:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A451426CF9; Thu, 9 Feb 2017 01:27:25 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17CC22029B for ; Thu, 9 Feb 2017 01:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520AbdBIB1X (ORCPT ); Wed, 8 Feb 2017 20:27:23 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:52925 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdBIB1S (ORCPT ); Wed, 8 Feb 2017 20:27:18 -0500 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>; 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 Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Hoegeun Kwon 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+NgFtrDKsWRmVeSWpSXmKPExsWy7bCmvm7J0dkRBvNahC3mHznHanHl63s2 i/fLu9gsJt2fwGJx/vwGdosZ5/cxWbTuPcLuwO6xaVUnm8f97uN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5KZl66rVJoiJuuhZJCXmJuqq1ShK5vSJCSQlliTimQZ2SABhycA9yDlfTt 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 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,