[PATCH for 4.15] omapdrm/dss/hdmi4_cec: fix interrupt handling
tomi.valkeinen at ti.com
Tue Dec 19 10:40:19 UTC 2017
On 04/12/17 15:32, Hans Verkuil wrote:
> 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
> 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 at cisco.com>
> Reported-by: Henrik Austad <haustad at cisco.com>
> Tested-by: Henrik Austad <haustad at cisco.com>
> Tested-by: Hans Verkuil <hans.verkuil at cisco.com>
> drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 46 +++++++--------------------------
> 1 file changed, 9 insertions(+), 37 deletions(-)
Thanks, I have picked up this patch.
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
More information about the dri-devel