aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd/mxc-hdmi-core.h
diff options
context:
space:
mode:
authorJason Chen <jason.chen@linaro.org>2011-12-27 16:16:10 +0800
committerEric Miao <eric.miao@linaro.org>2012-01-11 21:39:34 +0800
commit7420896deb69b8801f2acf48f4b3605ef55d21c4 (patch)
tree3e954576287f13ae59a67efc46481bfd5c6821c4 /include/linux/mfd/mxc-hdmi-core.h
parentfa0148176bacf218ccb26d3b69f5a5452f85d4b6 (diff)
ENGR00169872-2 rework hdmi initialization and hotplug sequence
This commit intends to implement the flowchart and details documented in the HDMI Transmitter Controller User Guide section entitled "Programming Model". Some input is also from the Synopsys API code. The HDMI specification requires HDMI to set itself to VGA DVI mode before reading the EDID. So follow this sequence when HDMI is hotplugged: 1. Hdmi connector is plugged in, HDMI video gets an interrupt. 2. Clear out video mode list. Add only VGA DVI mode to list. 3. Request VGA DVI mode (call fb_set_var()) 4. HDMI video driver will get FB_EVENT_MODE_CHANGE callback and call mxc_hdmi_setup() to set up HDMI. 5. Read the edid and add video modes from edid. Select the video mode that is similar to the command line default. 6. Request VGA DVI mode (call fb_set_var()) 7. HDMI video driver will get FB_EVENT_MODE_CHANGE callback and do mxc_hdmi_setup(). Also included is a workaround for an overflow condition in the HDMI. The frame composer has an arithmetic unit that gets updated every time we write to one of the FC registers. But sometimes, depending on the relation between the tmds and sfr clocks, it may happen that this unit doesn't get updated, even though the registers are holding correct values. The workaround for this is, after completing the controller configuration, to rewrite one of the FC registers (i.e. FC_INVIDCONF) three or four times with the same value, and then follow it up by a SW reset to the TMDS clock domain (MC_SWRSTZ). We clear the overflow condition as described above every time we change video mode. Also an overflow interupt handler will clear the overflow condition if it happens again. This overflow condition is expected (and not a problem) when we are in DVI (non-HDMI) mode, so we do not worry about it in that case. Signed-off-by: Alan Tull <alan.tull@freescale.com>
Diffstat (limited to 'include/linux/mfd/mxc-hdmi-core.h')
-rw-r--r--include/linux/mfd/mxc-hdmi-core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/mfd/mxc-hdmi-core.h b/include/linux/mfd/mxc-hdmi-core.h
index f449946a50f..8c6ce456dda 100644
--- a/include/linux/mfd/mxc-hdmi-core.h
+++ b/include/linux/mfd/mxc-hdmi-core.h
@@ -22,16 +22,21 @@
#define IRQ_DISABLE_SUCCEED 0
#define IRQ_DISABLE_FAIL 1
+bool hdmi_check_overflow(void);
+
u8 hdmi_readb(unsigned int reg);
void hdmi_writeb(u8 value, unsigned int reg);
void hdmi_mask_writeb(u8 data, unsigned int addr, u8 shift, u8 mask);
unsigned int hdmi_read4(unsigned int reg);
void hdmi_write4(unsigned int value, unsigned int reg);
+
void hdmi_irq_init(void);
void hdmi_irq_enable(int irq);
unsigned int hdmi_irq_disable(int irq);
+
void hdmi_set_sample_rate(unsigned int rate);
-void hdmi_set_clk_regenerator(void);
+void hdmi_init_clk_regenerator(void);
+void hdmi_clk_regenerator_update_pixel_clock(void);
extern int mxc_hdmi_ipu_id;
extern int mxc_hdmi_disp_id;