Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752991AbdCFEnc (ORCPT ); Sun, 5 Mar 2017 23:43:32 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:59069 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752859AbdCFEmk (ORCPT ); Sun, 5 Mar 2017 23:42:40 -0500 X-AuditID: b6c32a2d-f793d6d0000012b6-41-58bce8bc51c2 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: [PATCH v4 3/5] drm/exynos: dsi: Fix the parse_dt function Date: Mon, 06 Mar 2017 13:42:21 +0900 Message-id: <1488775343-6236-4-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1488775343-6236-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgk+LIzCtJLcpLzFFi42LZdlhTU3fPiz0RBl+7DSx6z51ksni/rIfR Yv6Rc6wWV76+Z7N4v7yLzWLS/QksFm/ermGyeHHvIotF/+PXzBbnz29gt9j0+BqrxeVdc9gs Zpzfx2Sx9PpFJovWvUfYLWZMfslm8fLjCRYHQY8189Ywemxa1cnmsf3bA1aP+93HmTw2L6n3 2NJ/l92jb8sqRo/Pm+QCOKJSbTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwMdQ0tLcyVFPIS c1NtlVx8AnTdMnOA3lBSKEvMKQUKBSQWFyvp29kU5ZeWpCpk5BeX2CpFGxoa6RkamOsZGRnp mRjHWhmZApUkpG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RQlphTCuQZGaABB+cA92AlfbsEt4z1XfYFBwUqtnf+ZGlg3MvbxcjJISFgInH7WCcjhC0m ceHeejYQW0hgKaPElcmCXYxcQPZ3Rom9v5ewgiTYBHQlvvZcZwJJiAjcYpQ4M/0MG4jDLPCW UeLO63/MXYwcHMICThJ3/kSANLAIqEq0t3eCNfMKuEuc/LmGFWKbnMTJY5PBbE4BD4m9pw8z QWx2l/jwdQr7BEbeBYwMqxglUguSC4qT0nON8lLL9YoTc4tL89L1kvNzNzGCY+qZ9A7Gw7vc DzEKcDAq8fB2JO2JEGJNLCuuzD3EKMHBrCTCe3ALUIg3JbGyKrUoP76oNCe1+BCjKdBhE5ml RJPzgfGeVxJvaGJuYm5sYGFuaWlipCTO2zj7WbiQQHpiSWp2ampBahFMHxMHp1QDo+HTEqfX yq3csZyvvetDlVvUile+XO0YnbbxwYHTvEcfPr1ZYNVfIzDRcPWFycv1f+WI+vJGiX7lypy3 5pqdbV/XyT0pDwwf31kp8ltI/WxtnYv2odL9jKVV89n2HDKM6HqsZ2ew+V3w9/BeBs1NCvvS Ty488uSKs/Ks1Sf/sB37eun8FFmmMiWW4oxEQy3mouJEANyZyca/AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170306044236epcas5p326440b0139bee5a33fd6545d0400bb57 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 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: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170306044236epcas5p326440b0139bee5a33fd6545d0400bb57 X-RootMTR: 20170306044236epcas5p326440b0139bee5a33fd6545d0400bb57 References: <1488775343-6236-1-git-send-email-hoegeun.kwon@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2043 Lines: 68 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, -- 1.9.1