summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Helaakoski <tekkuli@gmail.com>2013-01-01 20:38:57 +0400
committerAlejandro Mery <amery@geeks.cl>2013-01-03 23:58:04 +0400
commitfdc266ff7224c9d284cea0da60afcaa46ce7d57c (patch)
treee11bf2c0a4fe9e40b8aa7aff167155c870f6e988
parent456171139a796ed904b5cd2bce808eabe48cfee7 (diff)
downloadlinux-sunxi-fdc266ff7224c9d284cea0da60afcaa46ce7d57c.tar.xz
video:sunxi:disp:Pass correct pixel_clk to kernel
Signed-off-by: Jari Helaakoski <tekkuli@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--drivers/video/sunxi/disp/disp_lcd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/video/sunxi/disp/disp_lcd.c b/drivers/video/sunxi/disp/disp_lcd.c
index 64db317b5b94..7fa6e5254cf0 100644
--- a/drivers/video/sunxi/disp/disp_lcd.c
+++ b/drivers/video/sunxi/disp/disp_lcd.c
@@ -1823,14 +1823,20 @@ __s32 BSP_disp_get_timing(__u32 sel, __disp_tcon_timing_t *tt)
if (gdisp.screen[sel].status & LCD_ON) {
LCDC_get_timing(sel, 0, tt);
tt->pixel_clk = gpanel_info[sel].lcd_dclk_freq * 1000;
- } else if ((gdisp.screen[sel].status & TV_ON) ||
- (gdisp.screen[sel].status & HDMI_ON)) {
+ } else if ((gdisp.screen[sel].status & TV_ON)) {
__disp_tv_mode_t mode = gdisp.screen[sel].tv_mode;
-
LCDC_get_timing(sel, 1, tt);
tt->pixel_clk =
(clk_tab.tv_clk_tab[mode].tve_clk /
clk_tab.tv_clk_tab[mode].pre_scale) / 1000;
+ } else if (gdisp.screen[sel].status & HDMI_ON) {
+ struct __disp_video_timing video_timing;
+ __disp_tv_mode_t hdmi_mode = gdisp.screen[sel].hdmi_mode;
+
+ LCDC_get_timing(sel, 1, tt);
+ if (gdisp.init_para.hdmi_get_video_timing(
+ hdmi_mode, &video_timing) == 0)
+ tt->pixel_clk = video_timing.PCLK / 1000;
} else if (gdisp.screen[sel].status & VGA_ON) {
__disp_vga_mode_t mode = gdisp.screen[sel].vga_mode;