summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/fb.c')
-rw-r--r--drivers/video/tegra/fb.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 2f51c47a67ab..01b3d756b930 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -209,6 +209,14 @@ static int tegra_fb_set_par(struct fb_info *info)
info->mode->lower_margin;
}
+ mode.flags = 0;
+
+ if (!(info->mode->sync & FB_SYNC_HOR_HIGH_ACT))
+ mode.flags |= TEGRA_DC_MODE_FLAG_NEG_H_SYNC;
+
+ if (!(info->mode->sync & FB_SYNC_VERT_HIGH_ACT))
+ mode.flags |= TEGRA_DC_MODE_FLAG_NEG_V_SYNC;
+
tegra_dc_set_mode(tegra_fb->win->dc, &mode);
tegra_fb->win->w = info->mode->xres;
@@ -776,9 +784,8 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
info->var.yres_virtual = fb_data->yres * 2;
info->var.bits_per_pixel = fb_data->bits_per_pixel;
info->var.activate = FB_ACTIVATE_VBL;
- /* TODO: fill in the following by querying the DC */
- info->var.height = -1;
- info->var.width = -1;
+ info->var.height = tegra_dc_get_out_height(dc);
+ info->var.width = tegra_dc_get_out_width(dc);
info->var.pixclock = 0;
info->var.left_margin = 0;
info->var.right_margin = 0;