All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hoegeun Kwon <hoegeun.kwon@samsung.com>
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 <hoegeun.kwon@samsung.com>
Subject: [PATCH v3 5/7] drm/exynos: dsi: Fix the parse_dt function
Date: Thu, 02 Mar 2017 19:20:17 +0900	[thread overview]
Message-ID: <1488450019-6482-6-git-send-email-hoegeun.kwon@samsung.com> (raw)
In-Reply-To: <1488450019-6482-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

WARNING: multiple messages have this Message-ID (diff)
From: Hoegeun Kwon <hoegeun.kwon@samsung.com>
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: 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 <hoegeun.kwon@samsung.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 5/7] drm/exynos: dsi: Fix the parse_dt function
Date: Thu, 02 Mar 2017 19:20:17 +0900	[thread overview]
Message-ID: <1488450019-6482-6-git-send-email-hoegeun.kwon@samsung.com> (raw)
In-Reply-To: <1488450019-6482-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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: hoegeun.kwon@samsung.com (Hoegeun Kwon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 5/7] drm/exynos: dsi: Fix the parse_dt function
Date: Thu, 02 Mar 2017 19:20:17 +0900	[thread overview]
Message-ID: <1488450019-6482-6-git-send-email-hoegeun.kwon@samsung.com> (raw)
In-Reply-To: <1488450019-6482-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-02 11:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170302102112epcas5p476b30508bbaffbf1fe9781b941cd418f@epcas5p4.samsung.com>
2017-03-02 10:20 ` [PATCH v3 0/7] Fix the parse_dt of exynos dsi and remove the OF graph Hoegeun Kwon
2017-03-02 10:20   ` Hoegeun Kwon
2017-03-02 10:20   ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas5p4992ba2da58333ee0e3fe988334aad9a9@epcas5p4.samsung.com>
2017-03-02 10:20     ` [PATCH v3 1/7] arm64: dts: exynos: Add the burst and esc clock frequency properties for exynos5433 dts Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas1p343e9da20f05be0a2359bf32834626c4a@epcas1p3.samsung.com>
2017-03-02 10:20     ` [PATCH v3 2/7] arm: dts: Add the burst and esc clock frequency properties for exynos3250 dts Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-03  0:26       ` Andi Shyti
2017-03-03  0:26         ` Andi Shyti
2017-03-03  0:26         ` Andi Shyti
     [not found]   ` <CGME20170302102113epcas5p4c93024f46ed53ac962b332b559553cd5@epcas5p4.samsung.com>
2017-03-02 10:20     ` [PATCH v3 3/7] arm: dts: Add the burst and esc clock frequency properties for exynos4412 dts Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas5p491d4220b8ae7a037d1cd7ece49bb2d3e@epcas5p4.samsung.com>
2017-03-02 10:20     ` [PATCH v3 4/7] arm: dts: Add the burst and esc clock frequency properties for exynos4210 dts Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas1p306e85959e4bbfe1ecb0e5af8fcd18b7d@epcas1p3.samsung.com>
2017-03-02 10:20     ` Hoegeun Kwon [this message]
2017-03-02 10:20       ` [PATCH v3 5/7] drm/exynos: dsi: Fix the parse_dt function Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas5p466a64e5f55c008ceec957b1432a30173@epcas5p4.samsung.com>
2017-03-02 10:20     ` [PATCH v3 6/7] arm64: dts: exynos: Remove the OF graph from DSI node Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
     [not found]   ` <CGME20170302102113epcas1p30d42204d23a4e0def2a406086fea9cef@epcas1p3.samsung.com>
2017-03-02 10:20     ` [PATCH v3 7/7] arm: dts: " Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-02 10:20       ` Hoegeun Kwon
2017-03-03  0:22   ` [PATCH v3 0/7] Fix the parse_dt of exynos dsi and remove the OF graph Andi Shyti
2017-03-03  0:22     ` Andi Shyti
2017-03-03  0:22     ` Andi Shyti
2017-03-04  8:23     ` Krzysztof Kozlowski
2017-03-04  8:23       ` Krzysztof Kozlowski
2017-03-04  8:23       ` Krzysztof Kozlowski

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=1488450019-6482-6-git-send-email-hoegeun.kwon@samsung.com \
    --to=hoegeun.kwon@samsung.com \
    --cc=airlied@linux.ie \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.