video: tegra: fix max yres in stereo hdmi case
Chong Zhang [Sat, 29 Jan 2011 01:15:34 +0000 (17:15 -0800)]
tegra_fb_set_windowattr() has logic to adjust
window y according to yres, however when in stereo
mode, the max y allowed should be v_active, which
could be larger than yres.

bug 784597

Original-Change-Id: I63342be8e2d87396502574f3a8dd0fb2769a47a8
Reviewed-on: http://git-master/r/17537
Reviewed-by: Chong Zhang <chzhang@nvidia.com>
Tested-by: Chong Zhang <chzhang@nvidia.com>
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R89099fab6efe7e2187645ef10e627f0d84be1f1b

drivers/video/tegra/fb.c

index 7258397..9b7d5f8 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "host/dev.h"
 #include "nvmap/nvmap.h"
+#include "dc/dc_priv.h"
 
 struct tegra_fb_info {
        struct tegra_dc_win     *win;
@@ -398,8 +399,8 @@ static int tegra_fb_set_windowattr(struct tegra_fb_info *tegra_fb,
                return 0;
        }
 
-       xres = tegra_fb->info->var.xres;
-       yres = tegra_fb->info->var.yres;
+       xres = tegra_fb->win->dc->mode.h_active;
+       yres = tegra_fb->win->dc->mode.v_active;
 
        win->flags = TEGRA_WIN_FLAG_ENABLED;
        if (flip_win->attr.blend == TEGRA_FB_WIN_BLEND_PREMULT)