From: Dillon Varone <[email protected]>

[WHY&HOW]
DCN5+ supports multi-dwb per stream.

Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
---
 .../dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c  | 4 ++--
 .../dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c  | 5 -----
 .../dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c  | 4 ----
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
index bd2494c976ac..ab778fac34b2 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
@@ -4225,9 +4225,9 @@ static double dcn5_calculate_writeback_latency_hiding_us(
                unsigned int dwb_index)
 {
        double byte_per_pixel_luma_in_buffer = 1.0;
-       double buffer_for_luma_bytes = (double)writeback_buffer_size_bytes * 
1024.0;
+       double buffer_for_luma_bytes = (double)writeback_buffer_size_bytes;
        double line_time_us = 
(double)display_cfg->stream_descriptors[stream_index].timing.h_total /
-                       
(double)display_cfg->stream_descriptors[stream_index].timing.pixel_clock_khz / 
1000.0;
+                       
((double)display_cfg->stream_descriptors[stream_index].timing.pixel_clock_khz / 
1000.0);
 
        if 
(display_cfg->stream_descriptors[stream_index].writeback.writeback_stream[dwb_index].pixel_format
 == dml2_444_64) {
                byte_per_pixel_luma_in_buffer = 8.0;
diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c
index 2e86a134e074..fde2e0ad2529 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c
@@ -992,11 +992,6 @@ static bool dcn5_ms_check_writeback_count_support(
        for (stream_idx = 0; stream_idx < display_cfg->num_streams; 
stream_idx++) {
                totalNumberOfActiveWriteback +=
                                
display_cfg->stream_descriptors[stream_idx].writeback.active_writebacks_per_stream;
-
-               /* >1 writeback per stream is currently not supported */
-               if 
(display_cfg->stream_descriptors[stream_idx].writeback.active_writebacks_per_stream
 > 1) {
-                       writeback_per_stream_supported = false;
-               }
        }
 
        return writeback_per_stream_supported &&
diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
index ca3b8b82ec04..5de84d6c73c0 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
@@ -1292,10 +1292,6 @@ static bool dcn6_ms_check_writeback_count_support(
 
                totalNumberOfActiveWriteback +=
                                
display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].writeback.active_writebacks_per_stream;
-
-               /* >1 writeback per stream is currently not supported */
-               if 
(display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].writeback.active_writebacks_per_stream
 > 1)
-                       writeback_per_stream_supported = false;
        }
        outputs->support.EnoughWritebackUnits = writeback_per_stream_supported 
&&
                        totalNumberOfActiveWriteback <= ip->max_num_wb;
-- 
2.43.0

Reply via email to