This reverts commit e1bd5e0bb4ca0d633ad698abd3658f8265009b81.

The commit causes a regression in Steam Deck (DCN 3.01), reintroducing a
functional issue reported in [1] that was fixed by calling the
clear_update_flags() from commit 7671f62c10f2a.

On Steam Deck, we use multiple hw plane color caps and up to two overlay
planes with dynamic pipe split policy. I.e. with 1 primary + 1 overlay,
the driver split planes into two (with 4 pipes), but with 1 primary + 2
overlays, we don't have enough pipe for splitting. Glitches appear in
this pipe-split transition of 1-2 overlay planes, if the driver doesn't
clear update flags.

Besides that, the issue the commit e1bd5e0bb4ca tries to address [2]
isn't functional.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3441 [1]
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4129 [2]
Signed-off-by: Melissa Wen <m...@igalia.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index c31f7f8e409f..7c48f72e5917 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -5443,7 +5443,8 @@ bool dc_update_planes_and_stream(struct dc *dc,
        else
                ret = update_planes_and_stream_v2(dc, srf_updates,
                        surface_count, stream, stream_update);
-       if (ret && dc->ctx->dce_version >= DCN_VERSION_3_2)
+
+       if (ret)
                clear_update_flags(srf_updates, surface_count, stream);
 
        return ret;
@@ -5474,7 +5475,7 @@ void dc_commit_updates_for_stream(struct dc *dc,
                ret = update_planes_and_stream_v1(dc, srf_updates, 
surface_count, stream,
                                stream_update, state);
 
-       if (ret && dc->ctx->dce_version >= DCN_VERSION_3_2)
+       if (ret)
                clear_update_flags(srf_updates, surface_count, stream);
 }
 
-- 
2.47.2

Reply via email to