OMAPDSS: DISPC: fix debugfs reg dump

[ Upstream commit 21d9ca906370e5b3cbd7f507fd7116bbe8edb877 ]

DISPC reg dump prints a few registers twice. Remove the extra prints.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: DISPC: reject interlace for lcd out

[ Upstream commit beb8384d4a67179e8c207f00e9035ab121ed5940 ]

OMAP2/3 does not support interlace for LCD out. OMAP4+ does, but is not
supported by the driver at the moment.

The driver still accepts interlaced mode for LCD out, causing broken
display output.

This patch makes dispc reject interlace for LCD out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: DISPC: clean up dispc_mgr_timings_ok

[ Upstream commit eadd33bb95e0ab5e3f443bcd9ca45af4010110c8 ]

dispc_mgr_timings_ok() is a bit confusing how it handles the return
value.

Change the function to just return immediately when a timing is deemed
not valid, making the code much easier to follow.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI: fix name conflict

[ Upstream commit d27d20c88da7d78b389e5e824aff0cdfc9ce203f ]

OMAP HDMI driver has an 'enum hdmi_audio_sample_size', which conflicts
with the common include/linux/hdmi.h.

Change the name of the OMAP specific enum with '_omap" postfix.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: Kconfig: select HDMI

[ Upstream commit 89a2d6183bbd87431fccf9f57a7fec7ae38843e1 ]

Select HDMI support to be able to use HDMI infoframe helpers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI4: use common AVI infoframe support

[ Upstream commit db85ca7ca51ca886e8cd127368e09a7955bb041c ]

Instead of using OMAP specific AVI infoframe structs, use the common one
from include/linux/hdmi.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI5: use common AVI infoframe support

[ Upstream commit d0678c303fb70415da429ebcafebc1655c793055 ]

Instead of using OMAP specific AVI infoframe structs, use the common one
from include/linux/hdmi.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI: remove custom avi infoframe

[ Upstream commit bbcc14ebf913be0f11c08b346d070067f3fea332 ]

We now use the common AVI infoframe support, so the OMAP specific AVI
infoframe code can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: add hdmi ops to hdmi_ops and omap_dss_driver

[ Upstream commit 8c071caa7e9c584a97ca3cd33015b1d97d4f2250 ]

Add two new ops for HDMI: set_infoframe() and set_hdmi_mode(). The first
one can be used to specify the infoframe that should be sent to the HDMI
monitor, and the second one is used to enable HDMI mode (versus DVI
mode).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: add hdmi ops to hdmi-connector and tpd12s015

[ Upstream commit 9fb1737dffa542d61b2e708eee109d3783849dc3 ]

Add pass-through functions for set_infoframe and set_hdmi_mode to
hdmi-connector and tpd12s015 drivers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: add hdmi ops to dra7-evm-encoder-tpd12s015

A version of this patch was done upstream for tpd12s015 driver, in
ti-linux-3.14 there is an extra driver called
dra7-evm-encoder-tpd12s015.c that handles some of the "idiosyncrasies"
of the dra7-evm hdmi design and it also needed the same set of changes.

Add pass-through functions for set_infoframe and set_hdmi_mode to
dra7-evm-encoder-tpd12s015 drivers.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI: add infoframe and hdmi_dvi_mode fields

[ Upstream commit c9d2c799447c2f51866fb1e7e88eb5061d11ac43 ]

Add infoframe and hdmi_dvi_mode fields to 'struct hdmi_config' which
will be used in the following patches for OMAP4 and OMAP5 HDMI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI4: add support to set infoframe & HDMI mode

[ Upstream commit ab0aee9526988a5f254ce58b59dbcb6a2ae42fd6 ]

Instead of using hardcoded AVI infoframe, and a custom HDMI/DVI mode
selection based in internal videomode tables, add support to set the
infoframe and HDMI/DVI mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI5: add support to set infoframe & HDMI mode

[ Upstream commit 769dcb114e1ff71af08b9cb2f30656744df8437b ]

Instead of using hardcoded AVI infoframe, and a custom HDMI/DVI mode
selection based in internal videomode tables, add support to set the
infoframe and HDMI/DVI mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: HDMI: remove the unused code

[ Upstream commit 3ddd605e8d51dbee991c45c262c0ee8016fc84e6 ]

We no longer need the horrible driver internal videmode tables, which
were used to decide if a given videomode is a HDMI or DVI mode. So
remove all related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
drm/omap: Add infoframe & dvi/hdmi mode support

[ Upstream commit 4f930c0f273967b41f46ca84927ac0256bab4649 ]

Make the omapdrm driver use the new HDMI ops when possible.

omapdrm will call set_hdmi_mode (when available) to tell the encoder
driver whether the monitor is a DVI or HDMI monitor, and if it's an HDMI
monitor, omapdrm will call set_hdmi_infoframe to to set the AVI
infoframe.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: add SiI9022 encoder driver

Add an OMAPDSS encoder driver for Silicon Image SiI9022 HDMI encoder.

The driver supports only video at the moment, audio support will be
added separately.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
OMAPDSS: sii9022: Initialize dssdev->port_num = 1

The change is described in:
"OMAPDSS: DT: Get source endpoint by matching reg-id"-commit.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Doc/DT: Add SiI9022 binding documentation

Add DT binding documentation for Silicon Image SiI9022 HDMI encoder.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Darren Etheridge <detheridge@ti.com>
arm/dts: am43x EPOS HDMI support

AM43x EPOS board has both LCD and HDMI outputs. The active display is
selected with a GPIO, which affects video and audio signal routing, and
LCD backlight.

Managing the gpio dynamically has proven rather difficult, so the
approach taken here is just to have two separate .dts files for LCD/HDMI
use cases. The HDMI dts file includes the base file, which has LCD
support, and overrides and adds the necessary items.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>