summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@nietzche.virtuousgeek.org>2008-05-12 10:58:24 -0700
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-05-14 15:04:08 +0800
commitf419f56ec8715e980aeb673bf4afd7649580d53c (patch)
treee14e06aa347adc9552761703c843aa6b39e07d10
parent9bb3ac06ed3d1a3456217d478d556b0abf05b585 (diff)
Panel fitting: fix letterbox modes
In full_aspect mode, we try to preserve the aspect ratio by adding either top & bottom or left & right borders. In the letterbox case (top & bottom borders) we were miscalculating the top border which led to programming a bad mode. Fix the calculation and bug #15559. (cherry picked from commit 5103e5a39a4869a714b8a59da8bf51ecc8c65e4f)
-rw-r--r--src/i830_lvds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 48402dfa..899c6cbf 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -671,7 +671,7 @@ i830_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
/* Letterbox will have top/bottom borders */
top_border = (dev_priv->panel_fixed_mode->VDisplay -
- mode->VDisplay) / 2;
+ scaled_height) / 2;
bottom_border = top_border;
if (mode->VDisplay & 1)
bottom_border++;