From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Henrik Austad <haustad@cisco.com>
Subject: Re: [PATCH for 4.15] omapdrm/dss/hdmi4_cec: fix interrupt handling
Date: Tue, 19 Dec 2017 12:40:19 +0200 [thread overview]
Message-ID: <361663c8-1232-d407-79f6-add81d478641@ti.com> (raw)
In-Reply-To: <c8031caa-390c-7c13-aec3-59c56b10101b@xs4all.nl>
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
> 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>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 46 +++++++--------------------------
> 1 file changed, 9 insertions(+), 37 deletions(-)
Thanks, I have picked up this patch.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-12-19 10:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 13:32 [PATCH for 4.15] omapdrm/dss/hdmi4_cec: fix interrupt handling Hans Verkuil
2017-12-19 10:40 ` Tomi Valkeinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=361663c8-1232-d407-79f6-add81d478641@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=haustad@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox