From: Nicholas Carbones <[email protected]> [Why] By changing how we populate vblank_nom, constraining vblank size, the vblank_end calculation for the fams command packet gets affected. We add up v_active with a new vblank_nom value for stream pstate's nom_vtotal, which describes the vtotal and nominal refresh rate, and that causes underflow.
[How] Set nom_vtotal equal to the timing's v_total. Reviewed-by: Dillon Varone <[email protected]> Signed-off-by: Nicholas Carbones <[email protected]> Signed-off-by: Fangzhi Zuo <[email protected]> Tested-by: Dan Wheeler <[email protected]> --- .../display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c index d5f20c85006e..8f481ef9316f 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c @@ -1710,7 +1710,7 @@ static void build_pstate_meta_per_stream(struct dml2_pmo_instance *pmo, /* common */ stream_pstate_meta->valid = true; stream_pstate_meta->otg_vline_time_us = (double)timing->h_total / timing->pixel_clock_khz * 1000.0; - stream_pstate_meta->nom_vtotal = stream_descriptor->timing.vblank_nom + stream_descriptor->timing.v_active; + stream_pstate_meta->nom_vtotal = stream_descriptor->timing.v_total; stream_pstate_meta->nom_refresh_rate_hz = timing->pixel_clock_khz * 1000.0 / (stream_pstate_meta->nom_vtotal * timing->h_total); stream_pstate_meta->nom_frame_time_us = -- 2.53.0
