summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/mxc/mxc_hdmi.c
AgeCommit message (Collapse)Author
2020-02-09mxc_hdmi.c: fix boot hangMax Krummenacher
Without this the kernel hangs during boot when HDMI is attached. It looks like we get an overflow IRQ storm. overflow is related to HDMI audio. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit ab9e816efb07dcaec23d3c55d3db1773b745ae47) (cherry picked from commit d2e0de0ea4c48d0cbbadc28ac4785bd0ed202ea4)
2020-02-09mxc_hdmi: fix detect disconnect caseMax Krummenacher
The keepalive module variable allows to not go into a disconnected state. Fix the case when keepalive is set to go to disconnect. Add a precompiler directive which allows to only evaluate the HPD signal for HDMI monitor detection. Default is to react on the status bits for HPD and the TMDS signal line detection to detect an attached monitor. While at it cleanup parameter documentation and whitespace. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit b15fed911e022b383295cb5443872d427e756677) (cherry picked from commit 6bf9ef90b27fea00ae27f719473a5b7fca30a72e) (cherry picked from commit 2d67c557073a6e728cfe5888323b9aed79392b90)
2020-02-09mxc_hdmi: skip unnecessary mxc_hdmi_setup callsDaniel Kochmanski
Signed-off-by: Daniel Kochmanski <dkochmanski@antmicro.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 98b68aee3695ae898ef19aa547267fcdb69cf7eb) (cherry picked from commit f6620779981e6aebe40e7a400568e454d6a7408f)
2020-02-09mxc_hdmi: Add only_cea parameter to mxc_hdmi moduleEric Nelson
When this boolean parameter is true, only add CEA modes to modelist. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Eric Nelson <eric.nelson@boundarydevices.com> (cherry picked from commit a78fe11904ebd4d3f72438f8b14dfa4eaab7d638) (cherry picked from commit d69533a9575de0aaeeaca19b4f5ed8ef794257a6) [rebased to 4.9, use bool as data type] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-02-09mxc_hdmi: enable overflow interrupt after initialization completeTroy Kisky
If enabled too early, a flood of interrupts can happen, and as console_lock is held, you cannot see any messages being printed. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 38c65caf872e5f9534b7812395224670dd56c297) (cherry picked from commit 04abce77f44b3e61b0fe5db1b33109e68e6600bc)
2020-02-09mxc_hdmi: default to keep-alive (don't detect disconnect)Eric Nelson
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit db1100f05d89ef2d90c856dfe742e9748d25df10) (cherry picked from commit de5231fc1c395c1b63f5aa81b818fc5fd5377568)
2020-02-09Add support for DVI monitorsRobert Winkler
Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 6877ada3d15adf762cae8b7edce979a77ebc0313) (cherry picked from commit 51394b5f2b7ecfcc87c43c41e630c3e49fce3003)
2019-09-23MLK-22084: fbdev: hdmi: Fix HDCP function failed work with Sony TVSandor Yu
HDCP function could work in other TVs but it failed with Sony TV when run hdcp enable/disable stress test. The TMDS clock is not detected by Sony TV. The TV seems time sensitive for HDMI TMDS. Add 20ms delay before TMDS enable make it work. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com> (cherry picked from commit cb8a41d3cce444ba9e7044637ab4499caf65799e)
2019-03-23MLK-20209 hdmi: fixed unsigned compare against less than zeroOliver Brown
Fixed CID 17375, Unsigned compared against 0. Removed code with no effect. Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2019-02-12MLK-18895: hdmi: Reset HDMI PHY when enable/disable HDCP functionSandor Yu
Some HDMI Sink may failed to work when running HDCP enable/disable stress test. HDMI sink may not support change HDCP state on the fly. So reset HDMI PHY and controller to resolve the issue. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2019-02-12MLK-16565: hdmi: Remove CEC clock setting in HDMI driverSandor Yu
HDMI CEC clock have management in HDMI CEC driver, so bypass CEC clock in HDMI driver. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2019-02-12MLK-14857: mxc_hdmi: Set default mode a CEA modeRobert Chiras
When using fb_find_mode from fbdev/core with a specified user more, it will return a screeninfo structure with the pixclock corresponding to a different refresh rate than the requested one. For example, for 1920x1080@60 it will return pixclock=5780. When we get the videmode for this screeninfo, it will have a refresh of 59Hz, instead of 60Hz. If we use this mode as default mode when EDID cannot be read, on a monitor with fixed refresh rate of 60Hz, it won't work. Therefore, we should save the default mode, the nearest mode from CEA modes defined by our own driver (which will have the correct refresh rate and pixclock for the requested resolution). Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-14648: mxc: fix default modelistRobert Chiras
When EDID read fails, the mxc_hdmi driver creates a default modelist using a hard-coded list with CEA modes. Every time the HDMI cable is plugged-in, it will destroy the current modelist and recreate the list. The problem comes from fbcon, which holds reference to current mode used for each framebuffer console. When we destroy the modelist and send the new one, if the memory for the old mode is overwritten it will try to find another mode, close to the old one. Since the mode could be overwritten by something else there is a high chance that the new selected mode to be different from the old one. If the HDMI sink does not support the selected mode, IPU will fail to deliver frames. Since it's wrong to advertise as supported modes the modes from a hard-coded list, just use one mode, which comes from cmdline. Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-14473: hdmi: Fix ioctl implementationRobert Chiras
The function mxc_hdmi_ioctl is passing kernel memory to user-space. The case for HDMI_IOC_GET_CPU_TYPE is passing the memory directly, which is not permitted. Fixed this, by using put_user(). Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-12364-1: HDMI: Add hdmi power supply managementSandor Yu
Add HDMI power supply management in hdmi driver. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2019-02-12MLK-11992: MX6 HDMI: Active HDCP keepout window when HDCP enableSandor Yu
When HDCP running in repeater mode, HDCP software workaround "HW_WA_HDCP_DC0" is working in HDCP keepout window stop state. It will cause HDCP compliance test 1B-01A failed. So active HDCP keepout widows and 1B-01A is passed. Signed-off-by: Sandor Yu <R01008@freescale.com>
2019-02-12MLK-11431-1: IPU: forward IPU display drivers to 4.1.y kernelSandor Yu
Forward imx_3.14.y IPU and display drivers to 4.1 kernel. This includes IPU core driver, display driver, LDB and HDMI driver. Signed-off-by: Sandor Yu <R01008@freescale.com>