Skip to content

Commit 2a9482e

Browse files
Daniel Miessalexdeucher
authored andcommitted
drm/amd/display: Prevent vtotal from being set to 0
[Why] In dcn314 DML the destination pipe vtotal was being set to the crtc adjustment vtotal_min value even in cases where that value is 0. [How] Only set vtotal to the crtc adjustment vtotal_min value in cases where the value is non-zero. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Alan Liu <[email protected]> Signed-off-by: Daniel Miess <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a460bee commit 2a9482e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,11 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c
295295
pipe = &res_ctx->pipe_ctx[i];
296296
timing = &pipe->stream->timing;
297297

298-
pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min;
298+
if (pipe->stream->adjust.v_total_min != 0)
299+
pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min;
300+
else
301+
pipes[pipe_cnt].pipe.dest.vtotal = timing->v_total;
302+
299303
pipes[pipe_cnt].pipe.dest.vblank_nom = timing->v_total - pipes[pipe_cnt].pipe.dest.vactive;
300304
pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, dcn3_14_ip.VBlankNomDefaultUS);
301305
pipes[pipe_cnt].pipe.dest.vblank_nom = max(pipes[pipe_cnt].pipe.dest.vblank_nom, timing->v_sync_width);

0 commit comments

Comments
 (0)