From e8118b168b78a11504bb8e52050f8168d7d31e53 Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Fri, 3 Sep 2010 15:30:40 -0700 Subject: [PATCH] video: tegra: set output size for hdmi Change-Id: I4737963d57e01be62c95076d22a26aaae45bfde1 Signed-off-by: Erik Gilling --- arch/arm/mach-tegra/include/mach/dc.h | 4 ++++ drivers/video/tegra/dc/hdmi.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h index 7e2e230aad13..1a73bae4d237 100644 --- a/arch/arm/mach-tegra/include/mach/dc.h +++ b/arch/arm/mach-tegra/include/mach/dc.h @@ -60,6 +60,10 @@ struct tegra_dc_out { int type; unsigned flags; + /* size in mm */ + unsigned h_size; + unsigned v_size; + int dcc_bus; int hotplug_gpio; diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index f10891d50892..d5816ba30d39 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -365,6 +365,12 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) return false; } + /* monitors like to lie about these but they are still useful for + * detecting aspect ratios + */ + dc->out->h_size = specs.max_x * 1000; + dc->out->v_size = specs.max_y * 1000; + tegra_fb_update_monspecs(dc->fb, &specs, tegra_dc_hdmi_mode_filter); dev_info(&dc->ndev->dev, "display detected\n"); return true; -- 2.34.1