Skip to contentSkip to conversation

drm/of: Consider the state in which the ep is disabled

PATCH In review Sandy Huang 4 participants 9 messages Jul 7, 2020 – Oct 20, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/of: Consider the state in which the ep is disabled

don't mask possible_crtcs if remote-point is disabled.

---
 drivers/gpu/drm/drm_of.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +3 -0
index fdb05fbf72a0..565f05f5f11b 100644
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
 	uint32_t possible_crtcs = 0;
 
 	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
 		remote_port = of_graph_get_remote_port(ep);
 		if (!remote_port) {
 			of_node_put(ep);
Signature · 1 line
2.17.1
maintainer Reviewed-by on v2 1/1
#1 lore raw

Am Dienstag, 7. Juli 2020, 13:25:26 CEST schrieb Sandy Huang:

Quoted 3 lines

don't mask possible_crtcs if remote-point is disabled.

I guess this could've benefitted from a "changelog":

changes in v2:
- drop additional of_node_put, as ep will be put with the next iteration of for_each_endpoint_of_node()

Quoted 19 lines
---
 drivers/gpu/drm/drm_of.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +3 -0
index fdb05fbf72a0..565f05f5f11b 100644
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
 	uint32_t possible_crtcs = 0;
 
 	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
 		remote_port = of_graph_get_remote_port(ep);
 		if (!remote_port) {
 			of_node_put(ep);
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Sandy Huang

Am Dienstag, 7. Juli 2020, 13:25:26 CEST schrieb Sandy Huang:

Quoted 3 lines

don't mask possible_crtcs if remote-point is disabled.

changes in v2:
- drop additional of_node_put, as ep will be put with the next iteration of for_each_endpoint_of_node()

As this touches a pretty central function is there something to keep in mind in regards to other DRM drivers? [question for the broader audience ;-) ]

Heiko

Quoted 19 lines
---
 drivers/gpu/drm/drm_of.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +3 -0
index fdb05fbf72a0..565f05f5f11b 100644
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
 	uint32_t possible_crtcs = 0;
 
 	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
 		remote_port = of_graph_get_remote_port(ep);
 		if (!remote_port) {
 			of_node_put(ep);
#3 lore raw

ping...

Quoted 41 lines · Heiko Stübner

Am Dienstag, 7. Juli 2020, 13:25:26 CEST schrieb Sandy Huang:

Quoted 3 lines

don't mask possible_crtcs if remote-point is disabled.

changes in v2:
- drop additional of_node_put, as ep will be put with the next iteration of for_each_endpoint_of_node()

As this touches a pretty central function is there something to keep in mind in regards to other DRM drivers? [question for the broader audience ;-) ]

Heiko

Quoted 19 lines
---
  drivers/gpu/drm/drm_of.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +3 -0
index fdb05fbf72a0..565f05f5f11b 100644
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
  	uint32_t possible_crtcs = 0;
 
  	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
  		remote_port = of_graph_get_remote_port(ep);
  		if (!remote_port) {
  			of_node_put(ep);
Signature · 8 lines
Best Regard

黄家钗
Sandy Huang
Addr: 福州市鼓楼区铜盘路软件大道89号福州软件园A区21号楼(350003)
      No. 21 Building, A District, No.89,software Boulevard Fuzhou,Fujian,PRC
Tel:+86 0591-87884919  8690
E-mail:[email protected]
#4 lore raw

Hi David Airlie,

    Please help to confirm whether this modification is reasonable when you are free, thanks.

Quoted 44 lines · Huang Jiachai

ping...

Quoted 41 lines · Heiko Stübner

Am Dienstag, 7. Juli 2020, 13:25:26 CEST schrieb Sandy Huang:

Quoted 3 lines

don't mask possible_crtcs if remote-point is disabled.

changes in v2:
- drop additional of_node_put, as ep will be put with the next iteration of for_each_endpoint_of_node()

As this touches a pretty central function is there something to keep in mind in regards to other DRM drivers? [question for the broader audience ;-) ]

Heiko

Quoted 19 lines

---
  drivers/gpu/drm/drm_of.c | 3 +++

  1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +3 -0
index fdb05fbf72a0..565f05f5f11b 100644
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct 
 drm_device *dev,
       uint32_t possible_crtcs = 0;
         for_each_endpoint_of_node(port, ep) {
+        if (!of_device_is_available(ep))
+            continue;
+
           remote_port = of_graph_get_remote_port(ep);
           if (!remote_port) {
               of_node_put(ep);
Signature · 16 lines
Best Regard

黄家钗
Sandy Huang
Addr: 福州市鼓楼区铜盘路软件大道89号福州软件园A区21号楼(350003)
      No. 21 Building, A District, No.89,software Boulevard Fuzhou,Fujian,PRC
Tel:+86 0591-87884919  8690
E-mail:[email protected]




_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Reviewed-by on v2 1/1
#5 lore raw
In reply to Sandy Huang

Hi Maintainers,

    Does this patch ready to merge?

Quoted 12 lines · Sandy Huang

don't mask possible_crtcs if remote-point is disabled.

---
  drivers/gpu/drm/drm_of.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +0 -0
index fdb05fbf72a0..565f05f5f11b 100644

drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 74

Quoted 9 lines
drivers/gpu/drm/drm_of.c +3 -0
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
  	uint32_t possible_crtcs = 0;
 
  	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
  		remote_port = of_graph_get_remote_port(ep);
  		if (!remote_port) {
  			of_node_put(ep);

Looks good to me.

Thanks,
- Kever

#6 lore raw
Quoted 3 lines · Kever Yang

Hi Maintainers,

    Does this patch ready to merge?

Would maybe be good to get some acks from other drivers using this, then Sandy can push to drm-misc-next.
-Daniel

Quoted 27 lines · Sandy Huang
Quoted 12 lines

don't mask possible_crtcs if remote-point is disabled.

---
  drivers/gpu/drm/drm_of.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +0 -0
index fdb05fbf72a0..565f05f5f11b 100644

drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 73

Quoted 8 lines
drivers/gpu/drm/drm_of.c +3 -0
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
  	uint32_t possible_crtcs = 0;
  	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
  		remote_port = of_graph_get_remote_port(ep);
  		if (!remote_port) {
  			of_node_put(ep);

Looks good to me.

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#7 lore raw

Hi Daniel,

Quoted 6 lines · Daniel Vetter
Quoted 3 lines · Kever Yang

Hi Maintainers,

    Does this patch ready to merge?

Would maybe be good to get some acks from other drivers using this, then Sandy can push to drm-misc-next.

Thanks for your reply, I can understand more 'acks' will be better, but there is no comments object to this patch

or any 'NAK' common for more then 3 months, maintainers should move to next step.

Thanks,

- Kever

Quoted 26 lines

-Daniel

Quoted 25 lines · Sandy Huang
Quoted 12 lines

don't mask possible_crtcs if remote-point is disabled.

---
   drivers/gpu/drm/drm_of.c | 3 +++
   1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +0 -0
index fdb05fbf72a0..565f05f5f11b 100644

drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 73

Quoted 8 lines
drivers/gpu/drm/drm_of.c +3 -0
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
   	uint32_t possible_crtcs = 0;
   	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
   		remote_port = of_graph_get_remote_port(ep);
   		if (!remote_port) {
   			of_node_put(ep);

Looks good to me.

#8 lore raw
Quoted 7 lines · Kever Yang

Hi Daniel,

Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Kever Yang

Hi Maintainers,

    Does this patch ready to merge?

Quoted 8 lines
Quoted 2 lines

Would maybe be good to get some acks from other drivers using this, then Sandy can push to drm-misc-next.

Thanks for your reply, I can understand more 'acks' will be better, but there is no comments object to this patch

or any 'NAK' common for more then 3 months, maintainers should move to next step.

I expect you to poke relevant driver maintainers directly for these acks. That was the purpose of my mail. All communication going through maintainers, being exclusively orchestrated by maintainers, just doesn't scale. So not an option for a big subsystem like drivers/gpu.

Hope that makes it clear.

For merging Sandy has commit rights to drm-misc, so that's not the problem.

Cheers, Daniel

Quoted 38 lines

Thanks,

- Kever

Quoted 26 lines

-Daniel

Quoted 25 lines · Sandy Huang
Quoted 12 lines

don't mask possible_crtcs if remote-point is disabled.

---
   drivers/gpu/drm/drm_of.c | 3 +++
   1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_of.c +0 -0
index fdb05fbf72a0..565f05f5f11b 100644

drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 73

Quoted 8 lines
drivers/gpu/drm/drm_of.c +3 -0
@@ -66,6 +66,9 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
   	uint32_t possible_crtcs = 0;
   	for_each_endpoint_of_node(port, ep) {
+		if (!of_device_is_available(ep))
+			continue;
+
   		remote_port = of_graph_get_remote_port(ep);
   		if (!remote_port) {
   			of_node_put(ep);

Looks good to me.

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

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel