linux/drivers/gpu/drm/omapdrm
Hans Verkuil df29c9db8a omapdrm/dss/hdmi4_cec: fix interrupt handling
The omap4 CEC hardware cannot tell a Nack from a Low Drive from an
Arbitration Lost error, so just report a Nack, which is almost
certainly the reason for the error anyway.

This also simplifies the implementation. The only three interrupts
that need to be enabled are:

Transmit Buffer Full/Empty Change event: triggered when the
transmit finished successfully and cleared the buffer.

Receiver FIFO Not Empty event: triggered when a message was received.

Frame Retransmit Count Exceeded event: triggered when a transmit
failed repeatedly, usually due to the message being Nacked. Other
reasons are possible (Low Drive, Arbitration Lost) but there is no
way to know. If this happens the TX buffer needs to be cleared
manually.

While testing various error conditions I noticed that the hardware
can receive messages up to 18 bytes in total, which exceeds the legal
maximum of 16. This could cause a buffer overflow, so we check for
this and constrain the size to 16 bytes.

The old incorrect interrupt handler could cause the CEC framework to
enter into a bad state because it mis-detected the "Start Bit Irregularity
event" as an ARB_LOST transmit error when it actually is a receive error
which should be ignored.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Henrik Austad <haustad@cisco.com>
Tested-by: Henrik Austad <haustad@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-01-02 14:20:10 +02:00
..
displays drm/omap: displays: panel-dpi: add backlight dependency 2017-11-30 12:25:37 +02:00
dss omapdrm/dss/hdmi4_cec: fix interrupt handling 2018-01-02 14:20:10 +02:00
Kconfig drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option 2017-04-03 12:36:40 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap_connector.c drm/omap: Support for HDMI hot plug detection 2017-08-15 15:18:25 +03:00
omap_crtc.c drm/omap: Potential NULL deref in omap_crtc_duplicate_state() 2017-08-16 16:21:18 +03:00
omap_debugfs.c drm/omap: Remove omap_debugfs_cleanup() 2017-01-27 15:25:53 +01:00
omap_dmm_priv.h
omap_dmm_tiler.c drm/omap: Fix error handling path in 'omap_dmm_probe()' 2017-11-30 12:25:37 +02:00
omap_dmm_tiler.h
omap_drv.c drm/omap: work-around for omap3 display enable 2017-08-23 12:22:12 +03:00
omap_drv.h drm/omap: remove omap_drm_win 2017-06-02 11:04:17 +03:00
omap_encoder.c drm: handle HDMI 2.0 VICs in AVI info-frames 2017-07-14 21:23:54 +03:00
omap_fb.c drm/omap: fix memory leak when FB init fails 2017-08-15 15:18:25 +03:00
omap_fbdev.c drm/<drivers>: Drop fbdev info flags 2017-07-26 13:22:40 +02:00
omap_gem_dmabuf.c drm/omap: dma-buf: Constify dma_buf_ops structures. 2017-08-15 15:18:25 +03:00
omap_gem.c drm/omap: fix tiled buffer stride calculations 2017-06-02 11:09:34 +03:00
omap_irq.c drm/omap: ratelimit OCP error 2017-06-02 10:57:21 +03:00
omap_plane.c drm: Nuke drm_atomic_helper_plane_set_property 2017-08-08 14:45:16 +02:00
tcm-sita.c
tcm-sita.h
tcm.h
TODO