Skip to content

Commit f510dd5

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: Fix underflow when setting underscan on DCN401
[WHY & HOW] When underscan is set through xrandr, it causes the stream destination rect to change in a way it becomes complicated to handle the calculations for subvp. Since this is a corner case, disable subvp when underscan is set. Fix the existing check that is supposed to catch this corner case by adding a check based on the parameters in the stream Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Dillon Varone <dillon.varone@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b649984 commit f510dd5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,9 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
858858

859859
plane->immediate_flip = plane_state->flip_immediate;
860860

861-
plane->composition.rect_out_height_spans_vactive = plane_state->dst_rect.height >= stream->timing.v_addressable;
861+
plane->composition.rect_out_height_spans_vactive =
862+
plane_state->dst_rect.height >= stream->timing.v_addressable &&
863+
stream->dst.height >= stream->timing.v_addressable;
862864
}
863865

864866
//TODO : Could be possibly moved to a common helper layer.

0 commit comments

Comments
 (0)