]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: Add comments to v_total calculation and drop legacy TODO
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Wed, 14 Feb 2024 20:32:32 +0000 (13:32 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Mar 2024 17:37:38 +0000 (13:37 -0400)
[WHY & HOW]
This commit just adds some simple comments to help understand the
calculation of V total duration for Freesync. Also, remove a legacy TODO
comment from link service type.

Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/include/link_service_types.h
drivers/gpu/drm/amd/display/modules/freesync/freesync.c

index 92dbff22a7c60b9feb2e960d5bd683ddb9b1907d..1867aac57cf2c4c79d650c90b751b733e3c4c179 100644 (file)
@@ -73,7 +73,6 @@ struct link_training_settings {
        enum dc_pre_emphasis *pre_emphasis;
        enum dc_post_cursor2 *post_cursor2;
        bool should_set_fec_ready;
-       /* TODO - factor lane_settings out because it changes during LT */
        union dc_dp_ffe_preset *ffe_preset;
 
        uint16_t cr_pattern_time;
index fbaa6effd0e3d766e3c65966cc8dd69a8105743c..b19ef58d1555a192c87c70f8dcdb67d0180f976c 100644 (file)
@@ -158,13 +158,13 @@ static unsigned int calc_v_total_from_duration(
        if (duration_in_us > vrr->max_duration_in_us)
                duration_in_us = vrr->max_duration_in_us;
 
-       if (dc_is_hdmi_signal(stream->signal)) {
+       if (dc_is_hdmi_signal(stream->signal)) { // change for HDMI to comply with spec
                uint32_t h_total_up_scaled;
 
                h_total_up_scaled = stream->timing.h_total * 10000;
                v_total = div_u64((unsigned long long)duration_in_us
                                        * stream->timing.pix_clk_100hz + (h_total_up_scaled - 1),
-                                       h_total_up_scaled);
+                                       h_total_up_scaled); //ceiling for MMax and MMin for MVRR
        } else {
                v_total = div64_u64(div64_u64(((unsigned long long)(
                                        duration_in_us) * (stream->timing.pix_clk_100hz / 10)),