Skip to content

Commit 6b5f7a6

Browse files
alexdeuchergregkh
authored andcommitted
drm/radeon: make sure vertical front porch is at least 1
commit 3104b8128d4d646a574ed9d5b17c7d10752cd70b 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 0f5c3af commit 6b5f7a6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/gpu/drm/radeon/atombios_encoders.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
310310
&& (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
311311
adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
312312

313+
/* vertical FP must be at least 1 */
314+
if (mode->crtc_vsync_start == mode->crtc_vdisplay)
315+
adjusted_mode->crtc_vsync_start++;
316+
313317
/* get the native mode for scaling */
314318
if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) {
315319
radeon_panel_mode_fixup(encoder, adjusted_mode);

0 commit comments

Comments
 (0)