]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00169872-1 rework hdmi initialization and hotplug sequence
authorAlan Tull <alan.tull@freescale.com>
Thu, 8 Dec 2011 19:43:42 +0000 (13:43 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:39 +0000 (08:33 +0200)
commitb4cfd99a9bad3d55dcaf8a12094b561807a0cf37
tree3341d955b71ecb133fc392622f31e7a35431fa14
parentded552af5fb8bc8ad3408ca610052b83a1deb2bb
ENGR00169872-1 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>
arch/arm/plat-mxc/include/mach/mxc_edid.h
arch/arm/plat-mxc/include/mach/mxc_hdmi.h