drm/amd/display: Force vsync flip when reconfiguring MPCC
authorAnthony Wang <anthony1.wang@amd.com>
Wed, 31 Mar 2021 15:03:35 +0000 (11:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Apr 2021 20:31:37 +0000 (16:31 -0400)
[Why]
Underflow observed when disabling PIP overlay in-game when
vsync is disabled, due to OTC master lock not working with
game pipe which is immediate flip.

[How]
When performing a full update, override flip_immediate value
to false for all planes, so that flip occurs on vsync.

Signed-off-by: Anthony Wang <anthony1.wang@amd.com>
Acked-by: Bindu Ramamurthy <bindur12@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index e74027a9354ea90c2c746a3f422fcaa106e4bcea..497e44ca98c198de64fafec30a2cb6cca08d3981 100644 (file)
@@ -2683,6 +2683,10 @@ static void commit_planes_for_stream(struct dc *dc,
                                                plane_state->triplebuffer_flips = true;
                                }
                        }
+                       if (update_type == UPDATE_TYPE_FULL) {
+                               /* force vsync flip when reconfiguring pipes to prevent underflow */
+                               plane_state->flip_immediate = false;
+                       }
                }
        }