drm: Fix drm_cvt_mode() for interlaced modes.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Aug 2009 00:30:09 +0000 (02:30 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 13 Aug 2009 00:33:37 +0000 (10:33 +1000)
The calculated vdisplay was half the right value.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_modes.c

index 6b4d2dc3cdd9eb908df135e4c79c4a7e4f35e532..9e54925a76098bf64184ff9702bd87c5efdb107c 100644 (file)
@@ -146,7 +146,7 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay,
        if (margins)
                vmargin = vdisplay_rnd * CVT_MARGIN_PERCENTAGE / 1000;
 
-       drm_mode->vdisplay = vdisplay_rnd + 2 * vmargin;
+       drm_mode->vdisplay = vdisplay + 2 * vmargin;
 
        /* Interlaced */
        if (interlaced)