From patchwork Tue Feb 28 08:17:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9595069 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 5605360429 for ; Tue, 28 Feb 2017 10:06:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3430F284FF for ; Tue, 28 Feb 2017 10:06:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26F9A28518; Tue, 28 Feb 2017 10:06:51 +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 5308F284FF for ; Tue, 28 Feb 2017 10:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751805AbdB1KGu (ORCPT ); Tue, 28 Feb 2017 05:06:50 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:38680 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbdB1KGk (ORCPT ); Tue, 28 Feb 2017 05:06:40 -0500 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OM200PAJSEC1T00@mailout3.samsung.com>; Tue, 28 Feb 2017 17:18:12 +0900 (KST) Received: from epsmges5p1.samsung.com (unknown [182.195.40.64]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170228081812epcas1p192733367d7d15a5591c312d3124f0dca~nZZTrlX2m2796927969epcas1p1U; Tue, 28 Feb 2017 08:18:12 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1.samsung.com (EPCPMTA) with SMTP id F4.FF.04848.34235B85; Tue, 28 Feb 2017 17:18:12 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20170228081811epcas5p3931e12839e81f94b58bbd5eaa7a4b63b~nZZTUAX3_3012830128epcas5p3g; Tue, 28 Feb 2017 08:18:11 +0000 (GMT) X-AuditID: b6c32a2c-f79b56d0000012f0-82-58b532431662 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 9B.19.06422.34235B85; Tue, 28 Feb 2017 17:18:11 +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 <0OM200JH6SE80Q80@mmp2.samsung.com>; Tue, 28 Feb 2017 17:18:11 +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 Cc: javier@osg.samsung.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Hoegeun Kwon Subject: [RESEND PATCH v2 1/5] drm/exynos: dsi: Fix the parse_dt function Date: Tue, 28 Feb 2017 17:17:55 +0900 Message-id: <1488269879-28876-2-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1488269879-28876-1-git-send-email-hoegeun.kwon@samsung.com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zn+/N59sU3Pb1zxBLlMb0bBnOH9 Gk9h9rv5FatK5zVuLK5cmxhwJt7DEJKZZ5fgdon/C+Ki2VyTAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRmVeSWpSXmKPExsVy+t9jQV1no60RBjNOaFr0njvJZPF+WQ+j xfwj51gtrnx9z2bxfnkXm8Wk+xNYLN68XcNk8eLeRRaL/sevmS3On9/AbrHp8TVWi8u75rBZ zDi/j8li6fWLTBate4+wW8yY/JLN4uXHEywOgh5r5q1h9Ni0qpPNY/u3B6we97uPM3lsXlLv saX/LrtH35ZVjB6fN8kFcES52WSkJqakFimk5iXnp2TmpdsqhYa46VooKeQl5qbaKkXo+oYE KSmUJeaUAnlGBmjAwTnAPVhJ3y7BLWN9l33BQYGK7Z0/WRoY9/J2MXJwSAiYSNx+lN3FyAlk iklcuLeerYuRi0NIYBajxJ7udawQzndGiedPfrGDVLEJ6Ep87bnOBJIQEbjFKHFm+hmwFmaB t4wSd17/YwapEhbwlDjw7SojiM0ioCqx+9JCMJtXwENi0/vfzBD75CROHpvMCmJzAtVPfDaB GeQkIaCaplmmExh5FzAyrGKUSC1ILihOSs81ykst1ytOzC0uzUvXS87P3cQIjqln0jsYD+9y P8QowMGoxMNrYbwlQog1say4MvcQowQHs5IIb8dPoBBvSmJlVWpRfnxRaU5q8SFGU6C7JjJL iSbnA+M9ryTe0MTcxNzYwMLc0tLESEmct3H2s3AhgfTEktTs1NSC1CKYPiYOTqkGRvsjGg2m /m8DRayczkwyKPOae1b3erld2GzH2EqB/l1fp/zp3OklcWF28vq5HDH+ExUSH1z/xdb88oKj gMjZFem9/FcVhdiOvvNV7XJ/bK22bIVr2ur9W2bO/VOaK7f6+e4Dh8vXmbZ+FPpV9jAzMyx7 S/mWmrRdel8vHNv8+fi1wMM3WeS0G5VYijMSDbWYi4oTAQsNYZ+/AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170228081811epcas5p3931e12839e81f94b58bbd5eaa7a4b63b X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 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: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170228081811epcas5p3931e12839e81f94b58bbd5eaa7a4b63b X-RootMTR: 20170228081811epcas5p3931e12839e81f94b58bbd5eaa7a4b63b References: <1488269879-28876-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 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,