]> asedeno.scripts.mit.edu Git - linux.git/commit
media: cec: add new tx/rx status bits to detect aborts/timeouts
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 4 Oct 2018 07:28:21 +0000 (03:28 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 5 Oct 2018 15:22:39 +0000 (11:22 -0400)
commit7ec2b3b941a666a942859684281b5f6460a0c234
tree7b0f7908bcf07674b3aec8390e03a22e77ea2edc
parent81e33279d154599db64d608b2a1db619f3b56ce1
media: cec: add new tx/rx status bits to detect aborts/timeouts

If the HDMI cable is disconnected or the CEC adapter is manually
unconfigured, then all pending transmits and wait-for-replies are
aborted. Signal this with new status bits (CEC_RX/TX_STATUS_ABORTED).

If due to (usually) a driver bug a transmit never ends (i.e. the
transmit_done was never called by the driver), then when this times
out the message is marked with CEC_TX_STATUS_TIMEOUT.

This should not happen and is an indication of a driver bug.

Without a separate status bit for this it was impossible to detect
this from userspace.

The 'transmit timed out' kernel message is now a warning, so this
should be more prominent in the kernel log as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Documentation/media/uapi/cec/cec-ioc-receive.rst
drivers/media/cec/cec-adap.c
include/uapi/linux/cec.h