drm/amd/display: Check other planes for iflip only if GSL already enabled
authorAlvin Lee <alvin.lee2@amd.com>
Fri, 30 Oct 2020 17:49:46 +0000 (13:49 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Nov 2020 19:25:51 +0000 (14:25 -0500)
[Why]
We don't want GSL to be enabled when only updating
plane address

[How]
Only check other pipes for immediate flip if GSL is
already enabled

Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c

index e65ec2a..b9c20e3 100644 (file)
@@ -1163,11 +1163,13 @@ void dcn20_pipe_control_lock(
        if (pipe->plane_state != NULL)
                flip_immediate = pipe->plane_state->flip_immediate;
 
-       temp_pipe = pipe->bottom_pipe;
-       while (!flip_immediate && temp_pipe) {
-               if (temp_pipe->plane_state != NULL)
-                       flip_immediate = temp_pipe->plane_state->flip_immediate;
-               temp_pipe = temp_pipe->bottom_pipe;
+       if  (pipe->stream_res.gsl_group > 0) {
+           temp_pipe = pipe->bottom_pipe;
+           while (!flip_immediate && temp_pipe) {
+                   if (temp_pipe->plane_state != NULL)
+                           flip_immediate = temp_pipe->plane_state->flip_immediate;
+                   temp_pipe = temp_pipe->bottom_pipe;
+           }
        }
 
        if (flip_immediate && lock) {