Skip to contentSkip to conversation

drm/exynos: dp: consider port node outbound for panel

PATCH Superseded Inki Dae 4 participants 13 messages Dec 3, 2015 – Dec 4, 2015

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Inki Dae

author maintainer
#0 lore raw

cover drm/exynos: dp: consider port node outbound for panel

This patch series considers a port node outbound for panel device node, including dt binding for it. And also it fixes a wrong error type.

P.s.,
I already posted relevant patch series[1] before but missed dt binding. So please, ignore the patch series - I couldn't search the patch series on google.com so couldn't link it.

Thanks,
Inki Dae

[1] [PATCH 0/2] drm/exynos: dp: add of_graph dt binding for panel device

Inki Dae (3):
drm/exynos: dp: add of_graph dt binding support for panel drm/exynos: dp: fix wrong return type
dt-bindings: exynos-dp: update ports node binding for panel

 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 drivers/gpu/drm/exynos/exynos_dp_core.c            | 27 ++++++++++++++++++---
 2 files changed, 48 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
author maintainer
#1 lore raw

PATCH v3 1/3 drm/exynos: dp: add of_graph dt binding support for panel

This patch adds of_graph dt binding support for panel device and also keeps the backward compatibility.

i.e.,
The dts file for Exynos5800 based peach pi board
has a panel property so we need to keep the backward compatibility.

Changelog v3:
- bind only one of two nodes outbound - panel or bridge.

Changelog v2:
- return -EINVAL if getting a port node failed.

---
 drivers/gpu/drm/exynos/exynos_dp_core.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +20 -1
index 94f02a0..60260a0 100644
@@ -1392,7 +1392,7 @@ static const struct component_ops exynos_dp_ops = {
 static int exynos_dp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *panel_node, *bridge_node, *endpoint;
+	struct device_node *panel_node = NULL, *bridge_node, *endpoint = NULL;
 	struct exynos_dp_device *dp;
 	int ret;
 
@@ -1403,14 +1403,32 @@ static int exynos_dp_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dp);
 
+	/* This is for the backward compatibility. */
 	panel_node = of_parse_phandle(dev->of_node, "panel", 0);
 	if (panel_node) {
 		dp->panel = of_drm_find_panel(panel_node);
 		of_node_put(panel_node);
 		if (!dp->panel)
 			return -EPROBE_DEFER;
+	} else {
+		endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
+		if (endpoint) {
+			panel_node = of_graph_get_remote_port_parent(endpoint);
+			if (panel_node) {
+				dp->panel = of_drm_find_panel(panel_node);
+				of_node_put(panel_node);
+				if (!dp->panel)
+					return -EPROBE_DEFER;
+			} else {
+				DRM_ERROR("no port node for panel device.\n");
+				return -EINVAL;
+			}
+		}
 	}
 
+	if (endpoint)
+		goto out;
+
 	endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
 	if (endpoint) {
 		bridge_node = of_graph_get_remote_port_parent(endpoint);
@@ -1423,6 +1441,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
 			return -EPROBE_DEFER;
 	}
 
+out:
 	pm_runtime_enable(dev);
 
 	ret = component_add(&pdev->dev, &exynos_dp_ops);
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by Tested-by on v3 1/3
#2 lore raw

Re: [PATCH v3 1/3] drm/exynos: dp: add of_graph dt binding support for panel

Hello Inki,

I found that v2 of this patch is alredy in your exynos-drm for-next branch so so I had to revert it in linux-next to apply this one to test. You shouldn't push patches that were still not reviewed (specially the ones that weren't tested like this one) to your branch that gets pulled by -next. The idea of -next is to have some test coverage but it should be as stable as possible.

Quoted 10 lines · Inki Dae

This patch adds of_graph dt binding support for panel device and also keeps the backward compatibility.

i.e.,
The dts file for Exynos5800 based peach pi board
has a panel property so we need to keep the backward compatibility.

Changelog v3:
- bind only one of two nodes outbound - panel or bridge.

This patch fixes one of the comments I had for v2 but I've another comment below.

Quoted 26 lines

Changelog v2:
- return -EINVAL if getting a port node failed.

---
 drivers/gpu/drm/exynos/exynos_dp_core.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +2 -1
index 94f02a0..60260a0 100644
@@ -1392,7 +1392,7 @@ static const struct component_ops exynos_dp_ops = {
 static int exynos_dp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *panel_node, *bridge_node, *endpoint;
+	struct device_node *panel_node = NULL, *bridge_node, *endpoint = NULL;
 	struct exynos_dp_device *dp;
 	int ret;
 
@@ -1403,14 +1403,32 @@ static int exynos_dp_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dp);
 
+	/* This is for the backward compatibility. */

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1416

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +4 -0
 	panel_node = of_parse_phandle(dev->of_node, "panel", 0);
 	if (panel_node) {
 		dp->panel = of_drm_find_panel(panel_node);
 		of_node_put(panel_node);
 		if (!dp->panel)
 			return -EPROBE_DEFER;
+	} else {
+		endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
+		if (endpoint) {
+			panel_node = of_graph_get_remote_port_parent(endpoint);

Here is asssumed that the endpoint will be a panel but it could be that there is no "panel" phandle but the port is for a bridge chip (i.e: Peach Pit) so this assumption seems fragile to me.

That's what I meant when I said "Assuming you can make a distinction if the endpoint is a panel or a bridge" in the other thread.

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +5 -0
+			if (panel_node) {
+				dp->panel = of_drm_find_panel(panel_node);
+				of_node_put(panel_node);
+				if (!dp->panel)
+					return -EPROBE_DEFER;

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1431

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +8 -0
+			} else {
+				DRM_ERROR("no port node for panel device.\n");
+				return -EINVAL;
+			}
+		}
 	}
 
+	if (endpoint)
+		goto out;
+

Ok, so IIUC what's done here is to test if the panel lookup failed, then the endpoint is looked up again but this time a call to of_drm_find_bridge() is made instead of a call to of_drm_find_panel(). I wonder if there is a better way to do this...

In any case then I think you should test if (panel_node) instead of endpoint.

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1447

Quoted 12 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +1 -0
 	endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
 	if (endpoint) {
 		bridge_node = of_graph_get_remote_port_parent(endpoint);
@@ -1423,6 +1441,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
 			return -EPROBE_DEFER;
 	}
 
+out:
 	pm_runtime_enable(dev);
 
 	ret = component_add(&pdev->dev, &exynos_dp_ops);

I can't think of a better way to lookup either a panel or a bridge though and I'm not that familiar with DRM so with the correct check, the patch looks good to me.

Also on an Exynos5800 Peach Pi with the DTS patch I shared, the display is working correctly and also I tested without the DTS patch to make sure that it does not cause a regression for older DTBs.

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
author maintainer
#3 lore raw

Re: [PATCH v3 1/3] drm/exynos: dp: add of_graph dt binding support for panel

Hi Javier,

2015년 12월 03일 22:55에 Javier Martinez Canillas 이(가) 쓴 글:

Quoted 7 lines

Hello Inki,

I found that v2 of this patch is alredy in your exynos-drm for-next branch so so I had to revert it in linux-next to apply this one to test. You shouldn't push patches that were still not reviewed (specially the ones that weren't tested like this one) to your branch that gets pulled by -next. The idea of -next is to have some test coverage but it should be as stable as possible.

exynos-drm/for-next branch is not really for-next branch. This branch is used only for integration test. As you know, there are many exynos maintainers and they have their own repository. So we would need to test the integration. For this, exynos-drm/for-next is merged to linux-next not Dave's tree. Only exynos-drm-next branch will be merged to Dave's tree so only reviewed and tested patches will be merged to exynos-drm-next.

Quoted 100 lines · Inki Dae
Quoted 10 lines

This patch adds of_graph dt binding support for panel device and also keeps the backward compatibility.

i.e.,
The dts file for Exynos5800 based peach pi board
has a panel property so we need to keep the backward compatibility.

Changelog v3:
- bind only one of two nodes outbound - panel or bridge.

This patch fixes one of the comments I had for v2 but I've another comment below.

Quoted 26 lines

Changelog v2:
- return -EINVAL if getting a port node failed.

---
 drivers/gpu/drm/exynos/exynos_dp_core.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +2 -1
index 94f02a0..60260a0 100644
@@ -1392,7 +1392,7 @@ static const struct component_ops exynos_dp_ops = {
 static int exynos_dp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *panel_node, *bridge_node, *endpoint;
+	struct device_node *panel_node = NULL, *bridge_node, *endpoint = NULL;
 	struct exynos_dp_device *dp;
 	int ret;
 
@@ -1403,14 +1403,32 @@ static int exynos_dp_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dp);
 
+	/* This is for the backward compatibility. */

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1416

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +4 -0
 	panel_node = of_parse_phandle(dev->of_node, "panel", 0);
 	if (panel_node) {
 		dp->panel = of_drm_find_panel(panel_node);
 		of_node_put(panel_node);
 		if (!dp->panel)
 			return -EPROBE_DEFER;
+	} else {
+		endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
+		if (endpoint) {
+			panel_node = of_graph_get_remote_port_parent(endpoint);

Here is asssumed that the endpoint will be a panel but it could be that there is no "panel" phandle but the port is for a bridge chip (i.e: Peach Pit) so this assumption seems fragile to me.

That's what I meant when I said "Assuming you can make a distinction if the endpoint is a panel or a bridge" in the other thread.

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +5 -0
+			if (panel_node) {
+				dp->panel = of_drm_find_panel(panel_node);
+				of_node_put(panel_node);
+				if (!dp->panel)
+					return -EPROBE_DEFER;

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1431

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +8 -0
+			} else {
+				DRM_ERROR("no port node for panel device.\n");
+				return -EINVAL;
+			}
+		}
 	}
 
+	if (endpoint)
+		goto out;
+

Ok, so IIUC what's done here is to test if the panel lookup failed, then the endpoint is looked up again but this time a call to of_drm_find_bridge() is made instead of a call to of_drm_find_panel(). I wonder if there is a better way to do this...

In any case then I think you should test if (panel_node) instead of endpoint.

drivers/gpu/drm/exynos/exynos_dp_core.c static int exynos_dp_probe(struct platform_device *pdev) · line 1447

Quoted 12 lines
drivers/gpu/drm/exynos/exynos_dp_core.c +1 -0
 	endpoint = of_graph_get_next_endpoint(dev->of_node, NULL);
 	if (endpoint) {
 		bridge_node = of_graph_get_remote_port_parent(endpoint);
@@ -1423,6 +1441,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
 			return -EPROBE_DEFER;
 	}
 
+out:
 	pm_runtime_enable(dev);
 
 	ret = component_add(&pdev->dev, &exynos_dp_ops);

I can't think of a better way to lookup either a panel or a bridge though and I'm not that familiar with DRM so with the correct check, the patch looks good to me.

Quoted 7 lines

Also on an Exynos5800 Peach Pi with the DTS patch I shared, the display is working correctly and also I tested without the DTS patch to make sure that it does not cause a regression for older DTBs.

Thanks,
Inki Dae

Quoted 3 lines

Best regards,

#4 lore raw

Re: [PATCH v3 1/3] drm/exynos: dp: add of_graph dt binding support for panel

Hello Inki,

Quoted 5 lines · Inki Dae

Hi Javier,

2015년 12월 03일 22:55에 Javier Martinez Canillas 이(가) 쓴 글:

Quoted 2 lines

Hello Inki,

Quoted 7 lines
Quoted 5 lines

I found that v2 of this patch is alredy in your exynos-drm for-next branch so so I had to revert it in linux-next to apply this one to test. You shouldn't push patches that were still not reviewed (specially the ones that weren't tested like this one) to your branch that gets pulled by -next. The idea of -next is to have some test coverage but it should be as stable as possible.

exynos-drm/for-next branch is not really for-next branch. This branch is used

Well, it is a for-next branch because is pulled by -next. It is listed in:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Next/Trees

drm-exynos git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git#exynos-drm/for-next

Quoted 2 lines

only for integration test. As you know, there are many exynos maintainers and they have their own repository. So we would need to test the integration.

Integration testing is of course very needed and linux-next is for that but what should be tested are the patches that are targeted to mainline.

Quoted 4 lines

For this, exynos-drm/for-next is merged to linux-next not Dave's tree. Only exynos-drm-next branch will be merged to Dave's tree so only reviewed and tested patches will be merged to exynos-drm-next.

In that case, exynos-drm-next is what should be pulled by linux-next, no the for-next branch. Linux-next is a simulation of what Torvalds would do next so problems are found earlier, ideally before the patches land into mainline.

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
#5 lore raw

Re: [PATCH v3 1/3] drm/exynos: dp: add of_graph dt binding support for panel

Hi Javier,

2015-12-04 21:38 GMT+09:00 Javier Martinez Canillas <[email protected]>:

Quoted 27 lines

Hello Inki,

Quoted 5 lines · Inki Dae

Hi Javier,

2015년 12월 03일 22:55에 Javier Martinez Canillas 이(가) 쓴 글:

Quoted 2 lines

Hello Inki,

Quoted 7 lines
Quoted 5 lines

I found that v2 of this patch is alredy in your exynos-drm for-next branch so so I had to revert it in linux-next to apply this one to test. You shouldn't push patches that were still not reviewed (specially the ones that weren't tested like this one) to your branch that gets pulled by -next. The idea of -next is to have some test coverage but it should be as stable as possible.

exynos-drm/for-next branch is not really for-next branch. This branch is used

Well, it is a for-next branch because is pulled by -next. It is listed in:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Next/Trees

drm-exynos git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git#exynos-drm/for-next

Quoted 2 lines

only for integration test. As you know, there are many exynos maintainers and they have their own repository. So we would need to test the integration.

Integration testing is of course very needed and linux-next is for that but what should be tested are the patches that are targeted to mainline.

Quoted 8 lines
Quoted 4 lines

For this, exynos-drm/for-next is merged to linux-next not Dave's tree. Only exynos-drm-next branch will be merged to Dave's tree so only reviewed and tested patches will be merged to exynos-drm-next.

In that case, exynos-drm-next is what should be pulled by linux-next, no the for-next branch. Linux-next is a simulation of what Torvalds would do next so problems are found earlier, ideally before the patches land into mainline.

Seems I didn't comment enough. exynos-drm/for-next branch includes all patches of exynos-drm-next
and actually, they keep same patches for most time but sometimes, I merge additional patches only to
exynos-drm/for-next, which should be more tested with other trees before going to Dave's tree.

One more thing, there is other difference between exynos-drm-next and exynos-drm/for-next.
That is all patches of exynos-drm-next are merged on top of based on Dave's drm-next branch.
On the other hand, all of exynos-drm/for-next are merged on top of mainline. So if exynos-drm-next
is merged to linux-next then all patches will be conflicted with Dave's tree because his branch
is also merged to linux-next.

I'm not sure that other maintainers always keep only the for-next branch in their repository but
in my case, I use exynos-drm/for-next branch for the test before going to drm-next.
Anyway, exynos-drm-next will go to Dave's tree and then Dave's tree will also be pulled by
linux-next, which would allow exynos-drm-next to be tested altogether again before going to mainline.

Thanks,
Inki Dae

Quoted 10 lines

Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Re: [PATCH v3 1/3] drm/exynos: dp: add of_graph dt binding support for panel

Hello Inki,

Quoted 39 lines · Inki Dae

Hi Javier,

2015-12-04 21:38 GMT+09:00 Javier Martinez Canillas <[email protected]>:

Quoted 27 lines

Hello Inki,

Quoted 5 lines · Inki Dae

Hi Javier,

2015년 12월 03일 22:55에 Javier Martinez Canillas 이(가) 쓴 글:

Quoted 2 lines

Hello Inki,

Quoted 7 lines
Quoted 5 lines

I found that v2 of this patch is alredy in your exynos-drm for-next branch so so I had to revert it in linux-next to apply this one to test. You shouldn't push patches that were still not reviewed (specially the ones that weren't tested like this one) to your branch that gets pulled by -next. The idea of -next is to have some test coverage but it should be as stable as possible.

exynos-drm/for-next branch is not really for-next branch. This branch is used

Well, it is a for-next branch because is pulled by -next. It is listed in:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Next/Trees

drm-exynos git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git#exynos-drm/for-next

Quoted 2 lines

only for integration test. As you know, there are many exynos maintainers and they have their own repository. So we would need to test the integration.

Integration testing is of course very needed and linux-next is for that but what should be tested are the patches that are targeted to mainline.

Quoted 8 lines
Quoted 4 lines

For this, exynos-drm/for-next is merged to linux-next not Dave's tree. Only exynos-drm-next branch will be merged to Dave's tree so only reviewed and tested patches will be merged to exynos-drm-next.

In that case, exynos-drm-next is what should be pulled by linux-next, no the for-next branch. Linux-next is a simulation of what Torvalds would do next so problems are found earlier, ideally before the patches land into mainline.

Quoted 7 lines

Seems I didn't comment enough. exynos-drm/for-next branch includes all patches of exynos-drm-next
and actually, they keep same patches for most time but sometimes, I merge additional patches only to
exynos-drm/for-next, which should be more tested with other trees before going to Dave's tree.

Ok, but unreviewed and more importantly untested patches should not go to to exynos-drm/for-next because those will be made available in linux-next and can cause issues.

Only patches that are known to be good and have been reviewed/acked should go there.

Quoted 6 lines

One more thing, there is other difference between exynos-drm-next and exynos-drm/for-next.
That is all patches of exynos-drm-next are merged on top of based on Dave's drm-next branch.
On the other hand, all of exynos-drm/for-next are merged on top of mainline. So if exynos-drm-next

It's OK if you keep a different branch because you need a different base before sending your pull request but IMHO the patches in both branches should always be the same.

Quoted 4 lines

is merged to linux-next then all patches will be conflicted with Dave's tree because his branch
is also merged to linux-next.

Quoted 9 lines

I'm not sure that other maintainers always keep only the for-next branch in their repository but
in my case, I use exynos-drm/for-next branch for the test before going to drm-next.
Anyway, exynos-drm-next will go to Dave's tree and then Dave's tree will also be pulled by
linux-next, which would allow exynos-drm-next to be tested altogether again before going to mainline.

This should be a common problem for subsystems with different levels of maintainership. I'm not a subsystem maintainer so I don't know how this should be solved but I thought that git merge would take care of this when both trees are pulled by linux-next.

Maybe Krzysztof can comment on this since he has to do the same for the Exynos SoC support? He maintains a for-next branch and has to send pull request to Kukjin (and sometimes may need to rebase on top of Kukjin's tree) but both trees are pulled by linux-next to test.

Quoted 3 lines

Thanks,
Inki Dae

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
author maintainer
#7 lore raw

PATCH v2 2/3 drm/exynos: dp: fix wrong return type

In reply to Inki Dae

This patch fixes wrong return type when dt binding of bridge device failed.

If a board has a bridge device then of_graph_get_remote_port_parent function shouldn't be NULL. So this patch will return a proper error type so that the deferred probe isn't triggered.

Changelog v2:
- return -EINVAL if getting a port node failed.

---
 drivers/gpu/drm/exynos/exynos_dp_core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +4 -2
index 60260a0..aeee60a 100644
@@ -1437,8 +1437,10 @@ static int exynos_dp_probe(struct platform_device *pdev)
 			of_node_put(bridge_node);
 			if (!dp->ptn_bridge)
 				return -EPROBE_DEFER;
-		} else
-			return -EPROBE_DEFER;
+		} else {
+			DRM_ERROR("no port node for bridge device.\n");
+			return -EINVAL;
+		}
 	}
 
 out:
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#8 lore raw

PATCH 3/3 dt-bindings: exynos-dp: update ports node binding for panel

In reply to Inki Dae

This patch updates a ports node binding for panel.

With this, dp node can have a ports node which describes a remote endpoint node that can be connected to panel or bridge node.

---
 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +24 -4
index 64693f2..15b52cb 100644
@@ -66,8 +66,15 @@ Optional properties for dp-controller:
 		Hotplug detect GPIO.
 			Indicates which GPIO should be used for hotplug
 			detection
-	-video interfaces: Device node can contain video interface port
-			    nodes according to [1].
+Video interfaces:
+  Device node can contain video interface port nodes according to [1].
+  The following are properties specific to those nodes:
+
+  endpoint node connected to bridge or panel node:
+   - remote-endpoint: specifies the endpoint in panel or bridge node.
+		      This node is required in all kinds of exynos dp
+		      to represent the connection between dp and bridge
+		      ,or dp and panel.
 
 [1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 
@@ -111,9 +118,22 @@ Board Specific portion:
 		};
 
 		ports {
-			port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port {
 				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
+					remote-endpoint = <&dp_in>;
+				};
+			};
+		};
+
+		panel@0 {
+			reg = <0>;
+			...
+			port {
+				dp_in: endpoint {
+					remote-endpoint = <&dp_out>;
 				};
 			};
 		};
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 3/3
#9 lore raw

Re: [PATCH 3/3] dt-bindings: exynos-dp: update ports node binding for panel

Hello Inki,

Quoted 21 lines · Inki Dae

This patch updates a ports node binding for panel.

With this, dp node can have a ports node which describes a remote endpoint node that can be connected to panel or bridge node.

---
 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +0 -2
index 64693f2..15b52cb 100644
@@ -66,8 +66,15 @@ Optional properties for dp-controller:
 		Hotplug detect GPIO.
 			Indicates which GPIO should be used for hotplug
 			detection
-	-video interfaces: Device node can contain video interface port
-			    nodes according to [1].

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Optional properties for dp-controller: · line 78

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +9 -0
+Video interfaces:
+  Device node can contain video interface port nodes according to [1].
+  The following are properties specific to those nodes:
+
+  endpoint node connected to bridge or panel node:
+   - remote-endpoint: specifies the endpoint in panel or bridge node.
+		      This node is required in all kinds of exynos dp
+		      to represent the connection between dp and bridge
+		      ,or dp and panel.
 

This is nice but I think the DT binding should also document that it uses a phandle to define the connection with the panel (but explain that is deprecated). If only so people looking at a DTS and then going to the DT binding can understand why there is two ways to define the same.

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 123

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +3 -1
 [1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 
@@ -111,9 +118,22 @@ Board Specific portion:
 		};
 
 		ports {
-			port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+

These two properties are only needed when there is more than 2 ports and a reg property is used to number the port nodes but I don't think that's the case for Exynos DP and certainly is not the case in this example so I think you should just remove them.

Quoted 8 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +5 -1
+			port {
 				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
+					remote-endpoint = <&dp_in>;
+				};
+			};
+		};

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 139

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +7 -0
+
+		panel@0 {
+			reg = <0>;
+			...
+			port {
+				dp_in: endpoint {
+					remote-endpoint = <&dp_out>;
 				};
 			};
 		};

The rest looks good to me so with the two changes feel free to add:

Best regards,

Signature · 7 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#10 lore raw

Re: [PATCH 3/3] dt-bindings: exynos-dp: update ports node binding for panel

Hi Javier,

2015년 12월 03일 22:29에 Javier Martinez Canillas 이(가) 쓴 글:

Quoted 45 lines

Hello Inki,

Quoted 21 lines · Inki Dae

This patch updates a ports node binding for panel.

With this, dp node can have a ports node which describes a remote endpoint node that can be connected to panel or bridge node.

---
 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +0 -2
index 64693f2..15b52cb 100644
@@ -66,8 +66,15 @@ Optional properties for dp-controller:
 		Hotplug detect GPIO.
 			Indicates which GPIO should be used for hotplug
 			detection
-	-video interfaces: Device node can contain video interface port
-			    nodes according to [1].

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Optional properties for dp-controller: · line 78

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +9 -0
+Video interfaces:
+  Device node can contain video interface port nodes according to [1].
+  The following are properties specific to those nodes:
+
+  endpoint node connected to bridge or panel node:
+   - remote-endpoint: specifies the endpoint in panel or bridge node.
+		      This node is required in all kinds of exynos dp
+		      to represent the connection between dp and bridge
+		      ,or dp and panel.
 

This is nice but I think the DT binding should also document that it uses a phandle to define the connection with the panel (but explain that is deprecated). If only so people looking at a DTS and then going to the DT binding can understand why there is two ways to define the same.

Quoted 5 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +0 -0
 [1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 
@@ -111,9 +118,22 @@ Board Specific portion:
 		};
 
Quoted 10 lines

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 123

Quoted 5 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +3 -1
 		ports {
-			port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+

These two properties are only needed when there is more than 2 ports and a reg property is used to number the port nodes but I don't think that's the case for Exynos DP and certainly is not the case in this example so I think you should just remove them.

Right. I found out that the dp can have only one port outbound. Will remove them.

Quoted 22 lines
Quoted 9 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +5 -1
+			port {
 				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
+					remote-endpoint = <&dp_in>;
+				};
+			};
+		};

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 139

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +7 -0
+
+		panel@0 {
+			reg = <0>;
+			...
+			port {
+				dp_in: endpoint {
+					remote-endpoint = <&dp_out>;
 				};
 			};
 		};

The rest looks good to me so with the two changes feel free to add:

Quoted 1 line

Thanks,
Inki Dae

Quoted 3 lines

Best regards,

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer
#11 lore raw

Re: [PATCH 3/3] dt-bindings: exynos-dp: update ports node binding for panel

In reply to Inki Dae
Quoted 20 lines · Inki Dae

This patch updates a ports node binding for panel.

With this, dp node can have a ports node which describes a remote endpoint node that can be connected to panel or bridge node.

---
 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +0 -1
index 64693f2..15b52cb 100644
@@ -66,8 +66,15 @@ Optional properties for dp-controller:
 		Hotplug detect GPIO.
 			Indicates which GPIO should be used for hotplug
 			detection
-	-video interfaces: Device node can contain video interface port

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Optional properties for dp-controller: · line 77

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +9 -1
-			    nodes according to [1].
+Video interfaces:
+  Device node can contain video interface port nodes according to [1].
+  The following are properties specific to those nodes:
+
+  endpoint node connected to bridge or panel node:
+   - remote-endpoint: specifies the endpoint in panel or bridge node.
+		      This node is required in all kinds of exynos dp
+		      to represent the connection between dp and bridge
+		      ,or dp and panel.

Fix your punctuation.

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 122

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +2 -1
 [1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 
@@ -111,9 +118,22 @@ Board Specific portion:
 		};
 
 		ports {
-			port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;

You don't need these.

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 132

Quoted 11 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +9 -1
+
+			port {
 				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
+					remote-endpoint = <&dp_in>;
+				};
+			};
+		};
+
+		panel@0 {
+			reg = <0>;

Drop the @0 and reg as you only have 1.

Quoted 10 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +4 -0
+			...
+			port {
+				dp_in: endpoint {
+					remote-endpoint = <&dp_out>;
 				};
 			};
 		};
Signature · 1 line
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#12 lore raw

Re: [PATCH 3/3] dt-bindings: exynos-dp: update ports node binding for panel

Hi Rob,

2015년 12월 04일 08:38에 Rob Herring 이(가) 쓴 글:

Quoted 25 lines · Inki Dae
Quoted 24 lines

This patch updates a ports node binding for panel.

With this, dp node can have a ports node which describes a remote endpoint node that can be connected to panel or bridge node.

---
 .../bindings/display/exynos/exynos_dp.txt          | 28 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +3 -2
index 64693f2..15b52cb 100644
@@ -66,8 +66,15 @@ Optional properties for dp-controller:
 		Hotplug detect GPIO.
 			Indicates which GPIO should be used for hotplug
 			detection
-	-video interfaces: Device node can contain video interface port
-			    nodes according to [1].
+Video interfaces:
+  Device node can contain video interface port nodes according to [1].
+  The following are properties specific to those nodes:
Quoted 8 lines

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Optional properties for dp-controller: · line 77

Quoted 6 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +6 -0
+
+  endpoint node connected to bridge or panel node:
+   - remote-endpoint: specifies the endpoint in panel or bridge node.
+		      This node is required in all kinds of exynos dp
+		      to represent the connection between dp and bridge
+		      ,or dp and panel.

Fix your punctuation.

Right.

Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +0 -0
 [1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 
@@ -111,9 +118,22 @@ Board Specific portion:
 		};
 
Quoted 6 lines

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 122

Quoted 4 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +2 -1
 		ports {
-			port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;

You don't need these.

Ditto.

Quoted 14 lines

Documentation/devicetree/bindings/display/exynos/exynos_dp.txt Board Specific portion: · line 132

Quoted 12 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +9 -1
+
+			port {
 				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
+					remote-endpoint = <&dp_in>;
+				};
+			};
+		};
+
+		panel@0 {
+			reg = <0>;

Drop the @0 and reg as you only have 1.

Ditto.

Thanks,
Inki Dae

Quoted 17 lines
Quoted 11 lines
Documentation/devicetree/bindings/display/exynos/exynos_dp.txt +4 -0
+			...
+			port {
+				dp_in: endpoint {
+					remote-endpoint = <&dp_out>;
 				};
 			};
 		};
Signature · 1 line
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel