]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Revert "drm/amd/display: Fix writeback_info never got updated"
authorAlex Hung <alex.hung@amd.com>
Wed, 11 Oct 2023 19:18:44 +0000 (13:18 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Oct 2023 15:15:10 +0000 (11:15 -0400)
This reverts commit 8a307777c36e15f38c9f23778babcd368144c7d8.

[WHY & HOW]
The writeback series cause a regression in thunderbolt display.

Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c

index 0da82fcd4cc591cbcf2539f61f28dc330f0798f1..46f6f10790345a0375c818ca22089c58bc1deb15 100644 (file)
@@ -509,13 +509,18 @@ bool dc_stream_remove_writeback(struct dc *dc,
                return false;
        }
 
+//     stream->writeback_info[dwb_pipe_inst].wb_enabled = false;
+       for (i = 0; i < stream->num_wb_info; i++) {
+               /*dynamic update*/
+               if (stream->writeback_info[i].wb_enabled &&
+                       stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst) {
+                       stream->writeback_info[i].wb_enabled = false;
+               }
+       }
+
        /* remove writeback info for disabled writeback pipes from stream */
        for (i = 0, j = 0; i < stream->num_wb_info; i++) {
                if (stream->writeback_info[i].wb_enabled) {
-
-                       if (stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst)
-                               stream->writeback_info[i].wb_enabled = false;
-
                        if (j < i)
                                /* trim the array */
                                memcpy(&stream->writeback_info[j], &stream->writeback_info[i],