public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: hoegeun.kwon@samsung.com (Hoegeun Kwon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 3/5] drm/exynos: dsi: Fix the parse_dt function
Date: Mon, 06 Mar 2017 13:42:21 +0900	[thread overview]
Message-ID: <1488775343-6236-4-git-send-email-hoegeun.kwon@samsung.com> (raw)
In-Reply-To: <1488775343-6236-1-git-send-email-hoegeun.kwon@samsung.com>

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 <hoegeun.kwon@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
---
 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

  parent reply	other threads:[~2017-03-06  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170306044231epcas5p3ecbd44359ebb1eb35f8cf0b1a614afcb@epcas5p3.samsung.com>
2017-03-06  4:42 ` [PATCH v4 0/5] Fix the parse_dt of exynos dsi and remove the OF graph Hoegeun Kwon
2017-03-06  4:42   ` [PATCH v4 1/5] arm64: dts: exynos: Add the burst and esc clock frequency properties to DSI node Hoegeun Kwon
2017-03-06  4:49     ` Andi Shyti
2017-03-06  4:55       ` Hoegeun Kwon
2017-03-06  4:42   ` [PATCH v4 2/5] arm: dts: " Hoegeun Kwon
2017-03-06  4:49     ` Andi Shyti
2017-03-06  8:38     ` Lothar Waßmann
2017-03-06  4:42   ` Hoegeun Kwon [this message]
2017-03-06  4:49     ` [PATCH v4 3/5] drm/exynos: dsi: Fix the parse_dt function Andi Shyti
2017-03-06  4:42   ` [PATCH v4 4/5] arm64: dts: exynos: Remove the OF graph from DSI node Hoegeun Kwon
2017-03-06  4:50     ` Andi Shyti
2017-03-06  4:42   ` [PATCH v4 5/5] arm: dts: " Hoegeun Kwon
2017-03-06  4:50     ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488775343-6236-4-git-send-email-hoegeun.kwon@samsung.com \
    --to=hoegeun.kwon@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox