drm/of: Consider the state in which the ep is disabled
Subsystems (2)
PATCH 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 | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_of.c +5 -0
@@ -66,6 +66,11 @@ 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)) { +of_node_put (ep); +continue ; + } + remote_port =of_graph_get_remote_port (ep);if (!remote_port) {of_node_put (ep);
Signature · 1 line
2.17.1
Hi Sandy,
Am Montag, 6. Juli 2020, 09:59:44 CEST schrieb Sandy Huang:
Quoted 12 lines
don't mask
possible_crtcsif remote-point is disabled.Signed-off-by Sandy Huang <[email protected]>--- drivers/gpu/drm/drm_of.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/drm_of.c +0
-0
drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 70
Quoted 5 lines
drivers/gpu/drm/drm_of.c +2
-0@@ -66,6 +66,11 @@ 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)) { +of_node_put (ep);
You'd only need the of_node_put here, if you were exiting the loop.
With the "continue" below, the next iteration of for_each_endpoint_of_node will do the put on "ep"
Heiko
drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 76
Quoted 7 lines
drivers/gpu/drm/drm_of.c +3
-0+continue ; + } + remote_port =of_graph_get_remote_port (ep);if (!remote_port) {of_node_put (ep);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi heiko
Quoted 17 lines · Heiko Stübner
Hi Sandy,
Am Montag, 6. Juli 2020, 09:59:44 CEST schrieb Sandy Huang:
Quoted 14 lines
don't mask
possible_crtcsif remote-point is disabled.Signed-off-by Sandy Huang <[email protected]>--- drivers/gpu/drm/drm_of.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/drm_of.c +0
-0@@ -66,6 +66,11 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,uint32_t possible_crtcs =0 ;
Quoted 7 lines
drivers/gpu/drm/drm_of.c uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, · line 70
Quoted 3 lines
drivers/gpu/drm/drm_of.c +2
-0for_each_endpoint_of_node (port, ep) { +if (!of_device_is_available (ep)) { +of_node_put (ep);You'd only need the
of_node_puthere, if you were exiting the loop.With the "continue" below, the next iteration of
for_each_endpoint_of_nodewill do the put on "ep"
Just as we communicate on the google talk, the v2 patch will delete of_node_put(ep) and leave continue, thanks.
Quoted 15 lines
Heiko
Quoted 7 lines
drivers/gpu/drm/drm_of.c +3
-0+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]_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel