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: 9599857 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 55E00600CB for ; Thu, 2 Mar 2017 10:22:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 382B8284F4 for ; Thu, 2 Mar 2017 10:22:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28BCE28598; Thu, 2 Mar 2017 10:22:47 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B02FB284F4 for ; Thu, 2 Mar 2017 10:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9uvv42aXUWVgdgJYievrNcKeoivuvIFXYBf4++kAjDQ=; b=Eza62wQG5rwic3RI46q1SP/HFK LEkzODW4b83SWHHp3CGpzDURT7mSkbhf8Z5OdDS2xZwMxGoQdvOUWXseOrAlDXJNFfs4dsw+Qbxd/ 2e7vTnm3SIpfe/w4sCrgYfMhTnzacDXPS9LJd7vhShcWmkcsMce9RQC9oAXQ3QmONLsqMFCRBHQ86 dSXwmdh2GXc7l7ONghsS6EYuYav2Tq3vbj/0IqpoZ6fS/1LIOgA4u1OTHWSYjDtSMNukRczri8bbJ x2DdS711fXOHGp6ETw+RCS623LQTqNmIlZ8ngzpel9Td/II2PHMqEruuBc6YUL85od1cMAg/1GWv/ iIwmY5Gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cjNsj-0005fm-KA; Thu, 02 Mar 2017 10:22:45 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjNrb-0004zf-2T for linux-arm-kernel@lists.infradead.org; Thu, 02 Mar 2017 10:21:37 +0000 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 linux-arm-kernel@lists.infradead.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-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe0hTYRjG+845O5vl7LhuX6tETgRlbO3MqV+h3bMD+YdUhBWhJz1N0222 s5WWpUE313JbFzI07WolojIlzTLUwpJA7YI3SiULMjUpWReI6rhj/z3v+/3e5+H9eBW4Ko9U K9LMNt5q5jJocjpx/8kyjUb9rS5B17UDnWtvw9B4mROg0qftMvTGN06i8TsOEp0fcBNodKwC Q5/6XxLINTSCo46OajnyDnXJ0OuGYhIVdjzG0O3ulxg62fhUjgovDJNo+OtzYm0wW1FSAVhv eT7J1n0flLEDZ59hbM2tXLbW9U7OFtSWA3bCGxKv2MVHp/JcCm8N5c3JlpQ0szGG3rItcUNi RKSO0TArURQdauZMfAy9MS5eE5uWIW5Bhx7kMuxiK54TBHrF6mirxW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uXtYuTkkBAwkdh3eCIThC0m 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170302_022135_342021_2EDEAD37 X-CRM114-Status: GOOD ( 14.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,