diff options
| author | Jaehyun Chung <[email protected]> | 2019-09-23 14:00:57 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-10-11 00:34:20 +0000 |
| commit | 8396745da8f059048f6b01222c933e8ca4ea0597 (patch) | |
| tree | 0d3cec87b707e193b27a20c7a603730e8027e3fc /drivers/gpu/drm/amd/display/modules/freesync/freesync.c | |
| parent | drm/amd/display: 3.2.54 (diff) | |
| download | kernel-8396745da8f059048f6b01222c933e8ca4ea0597.tar.gz kernel-8396745da8f059048f6b01222c933e8ca4ea0597.zip | |
drm/amd/display: Add capability check for static ramp calc
[Why]
Static ramp to max refresh rate does not have capability check on
calculated v_total. Programming a lower v_total_min and max than the
total causes continuous spurious HPDs.
[How]
Add a capability check after v_total calculation similar to calculate
v_total helper functions.
Signed-off-by: Jaehyun Chung <[email protected]>
Reviewed-by: Anthony Koo <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/freesync/freesync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index ee89bd2f7fe4..16e69bbc69aa 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -234,6 +234,10 @@ static void update_v_total_for_static_ramp( current_duration_in_us) * (stream->timing.pix_clk_100hz / 10)), stream->timing.h_total), 1000); + /* v_total cannot be less than nominal */ + if (v_total < stream->timing.v_total) + v_total = stream->timing.v_total; + in_out_vrr->adjust.v_total_min = v_total; in_out_vrr->adjust.v_total_max = v_total; } |
