diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-09-03 09:20:20 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-09-14 10:23:12 +0200 |
commit | 89712699d7bc9cc93602407e0e9bc2490b771400 (patch) | |
tree | 3b886177e517429bfc95566ebea10b7f5baaa76e /drivers/video/sh_mobile_hdmi.c | |
parent | fbdev: sh_mobile_hdmi: add initial support for modes, other than 720p (diff) | |
download | linux-89712699d7bc9cc93602407e0e9bc2490b771400.tar.xz linux-89712699d7bc9cc93602407e0e9bc2490b771400.zip |
fbdev: sh_mobile_hdmi: enable "external" mode
The SH-Mobile HDMI controller supports two configuration modes: using
pre-programmed VICs and the "external" mode - specifying video parameters
explicitly. The driver already contains code, necessary to configure HDMI
manually, this patch actually enables it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_hdmi.c')
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 27d76bcf8e07..a8cf9a510f30 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -205,6 +205,7 @@ enum hotplug_state { struct sh_hdmi { void __iomem *base; enum hotplug_state hp_state; + bool preprogrammed_mode; /* use a pre-programmed VIC or the external mode */ struct clk *hdmi_clk; struct device *dev; struct fb_info *info; @@ -282,7 +283,10 @@ static void hdmi_external_video_param(struct sh_hdmi *hdmi) hdmi_write(hdmi, var->vsync_len, HDMI_EXTERNAL_V_DURATION); - /* Set bit 0 of HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS here for manual mode */ + /* Set bit 0 of HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS here for external mode */ + if (!hdmi->preprogrammed_mode) + hdmi_write(hdmi, sync | 1 | (voffset << 4), + HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS); } /** @@ -633,6 +637,13 @@ static void sh_hdmi_read_edid(struct sh_hdmi *hdmi) var->upper_margin, var->yres, var->lower_margin, var->vsync_len, PICOS2KHZ(var->pixclock)); + if ((hdmi->var.xres == 720 && hdmi->var.yres == 480) || + (hdmi->var.xres == 1280 && hdmi->var.yres == 720) || + (hdmi->var.xres == 1920 && hdmi->var.yres == 1080)) + hdmi->preprogrammed_mode = true; + else + hdmi->preprogrammed_mode = false; + hdmi_external_video_param(hdmi); } |