]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:33 +0000 (10:29 +0200)
[ Upstream commit 56d63782af9bbd1271bff1422a6a013123eade4d ]

[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc.c

index ccac86347315d5c718bf6dcb44b1fb8ee0e3cadd..2d4f8780922e8c148827f3777b8bf1b2c25ef887 100644 (file)
@@ -2528,6 +2528,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;
+                       }
                }
        }