mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-03 12:24:45 +08:00
drm/exynos: dsi: Fix the parse_dt function
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 <hoegeun.kwon@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
4013ef4879
commit
f2921d8c48
@ -1633,7 +1633,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
|
|||||||
{
|
{
|
||||||
struct device *dev = dsi->dev;
|
struct device *dev = dsi->dev;
|
||||||
struct device_node *node = dev->of_node;
|
struct device_node *node = dev->of_node;
|
||||||
struct device_node *ep;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = exynos_dsi_of_read_u32(node, "samsung,pll-clock-frequency",
|
ret = exynos_dsi_of_read_u32(node, "samsung,pll-clock-frequency",
|
||||||
@ -1641,32 +1640,21 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0);
|
ret = exynos_dsi_of_read_u32(node, "samsung,burst-clock-frequency",
|
||||||
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",
|
|
||||||
&dsi->burst_clk_rate);
|
&dsi->burst_clk_rate);
|
||||||
if (ret < 0)
|
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);
|
&dsi->esc_clk_rate);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto end;
|
return ret;
|
||||||
|
|
||||||
of_node_put(ep);
|
|
||||||
|
|
||||||
dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0);
|
dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0);
|
||||||
if (!dsi->bridge_node)
|
if (!dsi->bridge_node)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
end:
|
return 0;
|
||||||
of_node_put(ep);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int exynos_dsi_bind(struct device *dev, struct device *master,
|
static int exynos_dsi_bind(struct device *dev, struct device *master,
|
||||||
|
Loading…
Reference in New Issue
Block a user