From patchwork Wed Mar 8 04:54:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9610357 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 E0DE860414 for ; Wed, 8 Mar 2017 04:57:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B224E2854A for ; Wed, 8 Mar 2017 04:57:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A697E285C2; Wed, 8 Mar 2017 04:57:28 +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 7F6F72854A for ; Wed, 8 Mar 2017 04:57:27 +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=p3XrzPq/R/Ij0xDfqBGf/Y5f0TmocTBIDxj2MgnEWV4=; b=RCShRVxRI4ribM33Kwsvvz7X6D sFRVGZkj1iKtR/CIkreg/yzrneMV4aD+aZZTqK0uy8wYwEyteGI4ovgFBTTFNFykrvy1H1jYUxluU /BwtdIM4jAmql9urXPD52nieMfgbrYXv5ZJuqFgL7m/DEsSITCmvlpgN8+u92qWjUo33W0nQMnIu7 Kvi02ZM3wGW2JAs2VHIFo5Rz5amk8Zs8jDGa45gsOUl/JLHbvKSJhZumaX4M04J0/igJJgj+3F33g OkDAAjuORvU5Wpc9KSmI3kSymww5J4XCnSFj5M91u8cH4rYoFxpVIO0hQkpfEqd3vaY6XSk34GGoh M2Xl6vvA==; 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 1clTfD-0006T9-58; Wed, 08 Mar 2017 04:57:27 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1clTdI-0004VA-9I for linux-arm-kernel@lists.infradead.org; Wed, 08 Mar 2017 04:55:30 +0000 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OMH01JC2CBRQE10@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 08 Mar 2017 13:55:03 +0900 (KST) Received: from epsmges1p1.samsung.com (unknown [182.195.40.69]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170308045503epcas1p30d195d6c6e96d501fd150a6e9c842116~pzyN4cCW61254712547epcas1p30; Wed, 8 Mar 2017 04:55:03 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id D9.28.06711.6AE8FB85; Wed, 8 Mar 2017 13:55:03 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170308045502epcas1p2d2f7a0f768082b7a54b2ebe260e78436~pzyNlwVqr1805118051epcas1p2k; Wed, 8 Mar 2017 04:55:02 +0000 (GMT) X-AuditID: b6c32a35-f79d66d000001a37-60-58bf8ea646d4 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 6B.62.06425.6AE8FB85; Wed, 8 Mar 2017 13:55:02 +0900 (KST) Received: from localhost.localdomain ([10.113.63.38]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OMH0081XCBOTY00@mmp1.samsung.com>; Wed, 08 Mar 2017 13:55:02 +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 v5 3/5] drm/exynos: dsi: Fix the parse_dt function Date: Wed, 08 Mar 2017 13:54:10 +0900 Message-id: <1488948852-5380-4-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1488948852-5380-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSbUxTVxjHd+5bL2bX3BSnJziV3ETjIK291wIHAkadupuMDyQmSzOy4Q09 oWjf0lsI6AfJMkVrLVQ2XwJWnWw4JLBUNojJQF6G4DJQEUSSFVRmxqY2hhQ2o8aWW7/9/8/z e/4nz8nDkno/k8aWO73Y41TsArOC+mXgoy2GlkCvxdR0jUDT7aM0Ojk6QqCuwSc0iv7gB+jC YLx2LxZlULTFx6BTM/UUevqsjUB/R+5QqO7xvyQaG/tJh8KPJ2k0fr2JQWfHegj0/f07BDry 66AOnW2YZ9D8i2Fqe6rcFmoDcrj1OCN3Lc7S8syJm4R8rfmw3Fn3p04OdLYCeSG8voj9HOfb sGLFnnTsLHVZy51lBcKne0s+LsnKNokGMRflCOlOxYELhF2F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ssScUiDPyAANODgHuAcr6dsluGWsu9fBWLBeoKLt/UvGBsYtvF2MnBwS AiYS+xr62CBsMYkL99YD2VwcQgJLGSXmHp/FCuF8Z5T4seAhO0gVm4CuxNee60wgCRGBW4wS Z6afAWthFpjFJHG19zIrSJWwgJPEhKPPwOayCKhKXD52kwnE5hVwl7h69RIzxD45iZPHJgPV c3BwCnhIXPmoBRIWAio53jiTcQIj7wJGhlWMEqkFyQXFSem5hnmp5XrFibnFpXnpesn5uZsY wbH2TGoH48Fd7ocYBTgYlXh4P5zaFyHEmlhWXJl7iFGCg1lJhLfdcn+EEG9KYmVValF+fFFp TmrxIUZToLsmMkuJJucD00BeSbyhibmJubGBhbmlpYmRkjhv4+xn4UIC6YklqdmpqQWpRTB9 TBycUg2MKokb7sx265galz4/9v3rRzs7VWZ/nVPk5P3ssUzSe1XHT7Etm/v+ecgWHUyMDgte 88dQx/HhzWWiZ/6x5uybv72Os63lity8JlFWS7dojynb6w585ttf6JPbobhvUcD8OdLruUr3 RRgWudcVZ66LiHwmVeDXuUbG8EDpKnVl3efXrN6GtdYqsRRnJBpqMRcVJwIAM90y+8sCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170308045502epcas1p2d2f7a0f768082b7a54b2ebe260e78436 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: 20170308045502epcas1p2d2f7a0f768082b7a54b2ebe260e78436 X-RootMTR: 20170308045502epcas1p2d2f7a0f768082b7a54b2ebe260e78436 References: <1488948852-5380-1-git-send-email-hoegeun.kwon@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170307_205528_489042_788950DF X-CRM114-Status: GOOD ( 13.95 ) 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, a.hajda@samsung.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, javier@osg.samsung.com, andi.shyti@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 the case fimd + dsi + panel. Parse the Pll burst and esc clock frequency properties in dsi_parse_dt() and create a bridge_node only if there is an OF graph associated with dsi. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti --- 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,