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 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev 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
[not found] ` <CGME20170306044233epcas1p20b5e6c764a7752290e5ed25cc13a69af@epcas1p2.samsung.com>
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
[not found] ` <CGME20170306044234epcas1p22e9481182e11330cea0d169ce0ad2666@epcas1p2.samsung.com>
2017-03-06 4:42 ` [PATCH v4 2/5] arm: dts: " Hoegeun Kwon
2017-03-06 4:49 ` Andi Shyti
[not found] ` <1488775343-6236-3-git-send-email-hoegeun.kwon-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-03-06 8:38 ` Lothar Waßmann
[not found] ` <CGME20170306044236epcas5p326440b0139bee5a33fd6545d0400bb57@epcas5p3.samsung.com>
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
[not found] ` <CGME20170306044237epcas5p35d955ba5e849a8ebcf13007ab1b377dc@epcas5p3.samsung.com>
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
[not found] ` <CGME20170306044239epcas1p2cf8ad82b218e72119af0a35af249148f@epcas1p2.samsung.com>
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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).