drm/amd/display: Early return when turn off a plane.
authorYongqiang Sun <yongqiang.sun@amd.com>
Fri, 22 Sep 2017 17:41:13 +0000 (13:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:43:07 +0000 (16:43 -0400)
In case of two monitor connected and turn off one of the monitors,
OTG0 is locked after graphic plane off due to redundant programming
front end regs.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 2cea8de9c9be03a1e5faebceb2636126f7a64caa..ffc36f5ac50c035a54aa0df8571ecd8dfef30c15 100644 (file)
@@ -1190,8 +1190,14 @@ static void commit_planes_for_stream(struct dc *dc,
                }
        }
 
-       if (surface_count == 0)
+       if (surface_count == 0) {
+               /*
+                * In case of turning off screen, no need to program front end a second time.
+                * just return after program front end.
+                */
                dc->hwss.apply_ctx_for_surface(dc, stream, surface_count, context);
+               return;
+       }
 
        /* Lock pipes for provided surfaces, or all active if full update*/
        for (i = 0; i < surface_count; i++) {