summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-05-02 18:53:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-11 11:21:38 +0200
commit45225b7e84ee53ffdaeb84970640e9e174bcce0b (patch)
tree9a71df0e04652ba8490c02e6f8b0e2f273f40577
parent47b0084c2eedd73c85f378f8bd11c6eb65b8999f (diff)
downloadlwn-45225b7e84ee53ffdaeb84970640e9e174bcce0b.tar.gz
lwn-45225b7e84ee53ffdaeb84970640e9e174bcce0b.zip
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>
-rw-r--r--drivers/gpu/drm/radeon/atombios_encoders.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 6104d7d7449e..9de6503b10d8 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -310,6 +310,10 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
&& (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
+ /* vertical FP must be at least 1 */
+ if (mode->crtc_vsync_start == mode->crtc_vdisplay)
+ adjusted_mode->crtc_vsync_start++;
+
/* get the native mode for scaling */
if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) {
radeon_panel_mode_fixup(encoder, adjusted_mode);