]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: set optimized required for comp buf changes
authorDillon Varone <Dillon.Varone@amd.com>
Sat, 26 Nov 2022 07:38:01 +0000 (02:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Dec 2022 15:17:01 +0000 (10:17 -0500)
[Description]
When compressed buffer allocation changes, optimized required flag should be
set to trigger an update in optimize bandwidth.

Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@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/dcn20/dcn20_hwseq.c

index bc4a303cd86472bf14a46443ab08dcb89a608d8d..6291a241158ad6df6b9639e68feaac6791564a11 100644 (file)
@@ -2011,10 +2011,13 @@ void dcn20_prepare_bandwidth(
 
        /* decrease compbuf size */
        if (hubbub->funcs->program_compbuf_size) {
-               if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes)
+               if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes) {
                        compbuf_size_kb = context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes;
-               else
+                       dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.dml.ip.min_comp_buffer_size_kbytes);
+               } else {
                        compbuf_size_kb = context->bw_ctx.bw.dcn.compbuf_size_kb;
+                       dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.bw.dcn.compbuf_size_kb);
+               }
 
                hubbub->funcs->program_compbuf_size(hubbub, compbuf_size_kb, false);
        }