]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vc4: dsi: Add correct stop condition to vc4_dsi_encoder_disable iteration
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 13 Jun 2022 14:47:43 +0000 (16:47 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 28 Jun 2022 12:55:38 +0000 (14:55 +0200)
vc4_dsi_encoder_disable is partially an open coded version of
drm_bridge_chain_disable, but it missed a termination condition
in the loop for ->disable which meant that no post_disable
calls were made.

Add in the termination clause.

Fixes: f2eb28c2170d ("drm/vc4: dsi: Fix bridge chain handling")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20220613144800.326124-17-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_dsi.c

index 333ea96fcde4bbf66aa1f548307a295558b7ad84..b7b2c76770dc6fe5a4eb4fae84453ba891fd4050 100644 (file)
@@ -803,6 +803,9 @@ static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
        list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) {
                if (iter->funcs->disable)
                        iter->funcs->disable(iter);
+
+               if (iter == dsi->bridge)
+                       break;
        }
 
        vc4_dsi_ulps(dsi, true);