All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/7] cec: various fixes and enhancements
@ 2022-03-17 12:53 Hans Verkuil
  2022-03-17 12:53 ` [PATCHv3 1/7] cec: call enable_adap on s_log_addrs Hans Verkuil
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-03-17 12:53 UTC (permalink / raw)
  To: linux-media

The first two patches fix issues relating to a CEC adapter
being disabled while a transmit is still in progress at the
hardware level. Unless the hardware is really disabled (i.e.
loses power) the transmit should just continue in order to
keep the hardware and framework state in sync, and to avoid
half-written messages on the bus.

The third patch fixes a mismatch between the API documentation
and the actual code w.r.t. reporting the results of a non-blocking
transmit.

The fourth patch adds helpers to make it easier for both drivers
and userspace to detect if the received message contains the
result of a non-blocking transmit.

The fifth patch makes the framework more robust, preventing ops
from being called when the device is already unregistered.

The last two patches add new features that are needed for an
out-of-tree CEC driver:

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=extron

This is still work in progress, so these patches will probably
be included in the submission of that driver.

Regards,

	Hans

Changes since v2:

- added "cec: use call_op and check for !unregistered"

Changes since v1:

- replace bool by int in the public cec.h header for the new
  helper functions
- rework "cec: call enable_adap on s_log_addrs": it did not take
  monitoring into account (while monitoring the CEC adapter has
  to be enabled, even when unconfigured) and the needs_hpd case
  wasn't handled quite right either.

Hans Verkuil (7):
  cec: call enable_adap on s_log_addrs
  cec: abort if the current transmit was canceled
  cec: correctly pass on reply results
  cec.h: add cec_msg_recv_is_rx/tx_result helpers
  cec: use call_op and check for !unregistered
  cec: add xfer_timeout_ms field
  cec: add optional adap_configured callback

 Documentation/driver-api/media/cec-core.rst |  13 +-
 drivers/media/cec/core/cec-adap.c           | 279 +++++++++++++-------
 drivers/media/cec/core/cec-api.c            |  24 +-
 drivers/media/cec/core/cec-core.c           |  18 +-
 drivers/media/cec/core/cec-pin-priv.h       |  11 +
 drivers/media/cec/core/cec-pin.c            |  23 +-
 drivers/media/cec/core/cec-priv.h           |  10 +
 include/media/cec.h                         |  12 +
 include/uapi/linux/cec.h                    |  20 ++
 9 files changed, 275 insertions(+), 135 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-17 12:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 12:53 [PATCHv3 0/7] cec: various fixes and enhancements Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 1/7] cec: call enable_adap on s_log_addrs Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 2/7] cec: abort if the current transmit was canceled Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 3/7] cec: correctly pass on reply results Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 4/7] cec.h: add cec_msg_recv_is_rx/tx_result helpers Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 5/7] cec: use call_op and check for !unregistered Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 6/7] cec: add xfer_timeout_ms field Hans Verkuil
2022-03-17 12:53 ` [PATCHv3 7/7] cec: add optional adap_configured callback Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.