Skip to contentSkip to conversation

drm/vc4: call ->post_disable() functions in vc4_dsi_encoder_disable()

PATCH In review Dan Carpenter 2 participants 2 messages Jun 26, 2020

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

PATCH 1/1 drm/vc4: call ->post_disable() functions in vc4_dsi_encoder_disable()

The problem is that the iterator is already at the list head so the list_for_each_entry_from() loop is a no-op and we don't call the the iter->funcs->post_disable() functions. This should be list_for_each_entry() instead.

Fixes 033bfe7538a1 ("drm/vc4: dsi: Fix bridge chain handling")
---
 drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_dsi.c +1 -1
index eaf276978ee7..f92d0e92fa72 100644
@@ -754,7 +754,7 @@ static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
 
 	vc4_dsi_ulps(dsi, true);
 
-	list_for_each_entry_from(iter, &dsi->bridge_chain, chain_node) {
+	list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
 		if (iter->funcs->post_disable)
 			iter->funcs->post_disable(iter);
 	}
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Fri, 26 Jun 2020 13:34:01 +0300 Dan Carpenter <[email protected]>…

The problem is that the iterator is already at the list head so the list_for_each_entry_from() loop is a no-op and we don't call the the iter->funcs->post_disable() functions. This should be list_for_each_entry() instead.

Fixes 033bfe7538a1 ("drm/vc4: dsi: Fix bridge chain handling")
Quoted 17 lines
---
 drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_dsi.c +1 -1
index eaf276978ee7..f92d0e92fa72 100644
@@ -754,7 +754,7 @@ static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
 
 	vc4_dsi_ulps(dsi, true);
 
-	list_for_each_entry_from(iter, &dsi->bridge_chain, chain_node) {
+	list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
 		if (iter->funcs->post_disable)
 			iter->funcs->post_disable(iter);
 	}