drm/amd/display: Add total_num_dpps_required field to informative structure
authorOleh Kuzhylnyi <okuzhyln@amd.com>
Tue, 4 Feb 2025 18:33:00 +0000 (19:33 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Feb 2025 20:13:51 +0000 (15:13 -0500)
[Why]
The informative structure needs to be extended by the total number of DPPs
required per each active plane.
The new informative field is going to be used as a statistical indicator.

[How]
The dml2_core_calcs_get_informative() routine must count a total number of DPPs.

Reviewed-by: Austin Zheng <austin.zheng@amd.com>
Signed-off-by: Oleh Kuzhylnyi <okuzhyln@amd.com>
Signed-off-by: Roman Li <roman.li@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/dml2/dml21/inc/dml_top_types.h
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c

index 19bce4084382f0fed8f278c9f540f5907843e3c5..0dbf886d8926100a7f65e4efbb75915548848f81 100644 (file)
@@ -453,6 +453,10 @@ struct dml2_display_cfg_programming {
                        unsigned int meta_row_height_plane1;
                } plane_info[DML2_MAX_PLANES];
 
+               struct {
+                       unsigned int total_num_dpps_required;
+               } dpp;
+
                struct {
                        unsigned long long total_surface_size_in_mall_bytes;
                        unsigned int subviewport_lines_needed_in_mall[DML2_MAX_PLANES];
index 87e53f59cb9fc243ead0df51720afdc148318038..78c93a50251800843dd2b5518ba7fc78a1646b04 100644 (file)
@@ -13147,8 +13147,11 @@ void dml2_core_calcs_get_informative(const struct dml2_core_internal_display_mod
        out->informative.watermarks.temp_read_or_ppt_watermark_us = dml_get_wm_temp_read_or_ppt(mode_lib);
 
        out->informative.mall.total_surface_size_in_mall_bytes = 0;
-       for (k = 0; k < out->display_config.num_planes; ++k)
+       out->informative.dpp.total_num_dpps_required = 0;
+       for (k = 0; k < out->display_config.num_planes; ++k) {
                out->informative.mall.total_surface_size_in_mall_bytes += mode_lib->mp.SurfaceSizeInTheMALL[k];
+               out->informative.dpp.total_num_dpps_required += mode_lib->mp.NoOfDPP[k];
+       }
 
        out->informative.qos.min_return_latency_in_dcfclk = mode_lib->mp.min_return_latency_in_dcfclk;
        out->informative.qos.urgent_latency_us = dml_get_urgent_latency(mode_lib);