diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-11-13 12:05:24 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-04-24 08:41:06 +0200 |
commit | dad272bd03d541dc7c0ff8331756eccf659f6f02 (patch) | |
tree | 55002517ee58b428922c25108f1e09b07e00b67d /include/media | |
parent | media: cec: use call_op and check for !unregistered (diff) | |
download | linux-dad272bd03d541dc7c0ff8331756eccf659f6f02.tar.xz linux-dad272bd03d541dc7c0ff8331756eccf659f6f02.zip |
media: cec: add xfer_timeout_ms field
Allow drivers to change the transmit timeout value, i.e. after how
long should a transmit be considered 'lost', i.e. the corresponding
cec_transmit_done_ts was never called.
Some CEC devices have their own timeout, and so this timeout value must be
longer than that hardware timeout value. If it is shorter then the
framework would consider the transmit lost, even though it is effectively
still in progress at the hardware level.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/cec.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h index 31d704f36707..80340c9eb0f2 100644 --- a/include/media/cec.h +++ b/include/media/cec.h @@ -168,6 +168,8 @@ struct cec_adap_ops { * invalidated while the transmit is ongoing. In that * case the transmit will finish, but will not retransmit * and be marked as ABORTED. + * @xfer_timeout_ms: the transfer timeout in ms. + * If 0, then timeout after 2.1 ms. * @kthread_config: kthread used to configure a CEC adapter * @config_completion: used to signal completion of the config kthread * @kthread: main CEC processing thread @@ -224,6 +226,7 @@ struct cec_adapter { struct cec_data *transmitting; bool transmit_in_progress; bool transmit_in_progress_aborted; + unsigned int xfer_timeout_ms; struct task_struct *kthread_config; struct completion config_completion; |