OSDN Git Service

drm/amd/display: fix dml20 min_dst_y_next_start calculation
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 8 Nov 2019 21:20:36 +0000 (16:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Dec 2019 21:29:45 +0000 (16:29 -0500)
Bring this calculation in line with HW programming guide.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c

index 2c7455e..9df24ec 100644 (file)
@@ -929,8 +929,7 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
        min_dst_y_ttu_vblank = min_ttu_vblank * pclk_freq_in_mhz / (double) htotal;
        dlg_vblank_start = interlaced ? (vblank_start / 2) : vblank_start;
 
-       disp_dlg_regs->min_dst_y_next_start = (unsigned int) (((double) dlg_vblank_start
-                       + min_dst_y_ttu_vblank) * dml_pow(2, 2));
+       disp_dlg_regs->min_dst_y_next_start = (unsigned int) ((double) dlg_vblank_start * dml_pow(2, 2));
        ASSERT(disp_dlg_regs->min_dst_y_next_start < (unsigned int) dml_pow(2, 18));
 
        dml_print("DML_DLG: %s: min_dcfclk_mhz                         = %3.2f\n",