Skip to content

Commit 3d2ef4c

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu: make sure vertical front porch is at least 1
commit 0126d4b9a516256f2432ca0dc78ab293a8255378 upstream. hw doesn't like a 0 value. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c04e6e9 commit 3d2ef4c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/atombios_encoders.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ bool amdgpu_atombios_encoder_mode_fixup(struct drm_encoder *encoder,
298298
&& (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
299299
adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
300300

301+
/* vertical FP must be at least 1 */
302+
if (mode->crtc_vsync_start == mode->crtc_vdisplay)
303+
adjusted_mode->crtc_vsync_start++;
304+
301305
/* get the native mode for scaling */
302306
if (amdgpu_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT))
303307
amdgpu_panel_mode_fixup(encoder, adjusted_mode);

0 commit comments

Comments
 (0)