From 5103e5a39a4869a714b8a59da8bf51ecc8c65e4f Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 12 May 2008 10:58:24 -0700 Subject: [PATCH] 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. --- src/i830_lvds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++;