Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Add comments to v_total calculation and drop legacy TODO

[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>

authored by

Rodrigo Siqueira and committed by
Alex Deucher
f1b8479d 2c8c7a2c

+2 -3
+2 -2
drivers/gpu/drm/amd/display/modules/freesync/freesync.c
··· 158 158 if (duration_in_us > vrr->max_duration_in_us) 159 159 duration_in_us = vrr->max_duration_in_us; 160 160 161 - if (dc_is_hdmi_signal(stream->signal)) { 161 + if (dc_is_hdmi_signal(stream->signal)) { // change for HDMI to comply with spec 162 162 uint32_t h_total_up_scaled; 163 163 164 164 h_total_up_scaled = stream->timing.h_total * 10000; 165 165 v_total = div_u64((unsigned long long)duration_in_us 166 166 * stream->timing.pix_clk_100hz + (h_total_up_scaled - 1), 167 - h_total_up_scaled); 167 + h_total_up_scaled); //ceiling for MMax and MMin for MVRR 168 168 } else { 169 169 v_total = div64_u64(div64_u64(((unsigned long long)( 170 170 duration_in_us) * (stream->timing.pix_clk_100hz / 10)),