drm/amd/display: set correct v_total_min and v_total_max for dce.
authorYongqiang Sun <yongqiang.sun@amd.com>
Tue, 18 Apr 2017 19:35:27 +0000 (15:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:06:32 +0000 (18:06 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c
drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c

index 7070aaf9e433f8f4ec8589776fa96131667fdb4f..69ae3a83d2fe907c2b8be9c9f3aa19d221e6f690 100644 (file)
@@ -393,12 +393,12 @@ void dce110_timing_generator_set_drr(
                params->vertical_total_min > 0) {
 
                set_reg_field_value(v_total_max,
-                               params->vertical_total_max - 1,
+                               params->vertical_total_max,
                                CRTC_V_TOTAL_MAX,
                                CRTC_V_TOTAL_MAX);
 
                set_reg_field_value(v_total_min,
-                               params->vertical_total_min - 1,
+                               params->vertical_total_min,
                                CRTC_V_TOTAL_MIN,
                                CRTC_V_TOTAL_MIN);
 
index 1318df7ed47e9e8190723b0b7363c90d5214f343..6e3e7b6bc58c72964557dfccda95dec935c52e1b 100644 (file)
@@ -540,10 +540,10 @@ void dce120_timing_generator_set_drr(
 
                CRTC_REG_UPDATE(
                                CRTC0_CRTC_V_TOTAL_MIN,
-                               CRTC_V_TOTAL_MIN, params->vertical_total_min - 1);
+                               CRTC_V_TOTAL_MIN, params->vertical_total_min);
                CRTC_REG_UPDATE(
                                CRTC0_CRTC_V_TOTAL_MAX,
-                               CRTC_V_TOTAL_MAX, params->vertical_total_max - 1);
+                               CRTC_V_TOTAL_MAX, params->vertical_total_max);
                CRTC_REG_SET_N(CRTC0_CRTC_V_TOTAL_CONTROL, 6,
                                FD(CRTC0_CRTC_V_TOTAL_CONTROL__CRTC_V_TOTAL_MIN_SEL), 1,
                                FD(CRTC0_CRTC_V_TOTAL_CONTROL__CRTC_V_TOTAL_MAX_SEL), 1,