31aaa7d9 | 08-Aug-2024 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: cec-adap.c: improve CEC_MSG_FL_REPLY_VENDOR_ID check
The new CEC_MSG_FL_REPLY_VENDOR_ID flag only makes sense in combination with CEC_MSG_VENDOR_COMMAND_WITH_ID. So rather than reporting
media: cec: cec-adap.c: improve CEC_MSG_FL_REPLY_VENDOR_ID check
The new CEC_MSG_FL_REPLY_VENDOR_ID flag only makes sense in combination with CEC_MSG_VENDOR_COMMAND_WITH_ID. So rather than reporting an error if that flag is set with another command, just clear the flag instead.
Only keep the message length check, since otherwise the flag would not make sense.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
cbe49997 | 30-Apr-2024 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: core: avoid confusing "transmit timed out" message
If, when waiting for a transmit to finish, the wait is interrupted, then you might get a "transmit timed out" message, even though the
media: cec: core: avoid confusing "transmit timed out" message
If, when waiting for a transmit to finish, the wait is interrupted, then you might get a "transmit timed out" message, even though the transmit was interrupted and did not actually time out.
Set transmit_in_progress_aborted to true if the wait_for_completion_killable() call was interrupted and ensure that the transmit is properly marked as ABORTED.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Yang, Chenyuan <cy54@illinois.edu> Closes: https://lore.kernel.org/linux-media/PH7PR11MB57688E64ADE4FE82E658D86DA09EA@PH7PR11MB5768.namprd11.prod.outlook.com/ Fixes: 590a8e564c6e ("media: cec: abort if the current transmit was canceled") Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
47c82aac | 22-Feb-2024 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: core: avoid recursive cec_claim_log_addrs
Keep track if cec_claim_log_addrs() is running, and return -EBUSY if it is when calling CEC_ADAP_S_LOG_ADDRS.
This prevents a case where cec_cl
media: cec: core: avoid recursive cec_claim_log_addrs
Keep track if cec_claim_log_addrs() is running, and return -EBUSY if it is when calling CEC_ADAP_S_LOG_ADDRS.
This prevents a case where cec_claim_log_addrs() could be called while it was still in progress.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Yang, Chenyuan <cy54@illinois.edu> Closes: https://lore.kernel.org/linux-media/PH7PR11MB57688E64ADE4FE82E658D86DA09EA@PH7PR11MB5768.namprd11.prod.outlook.com/ Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)") Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
42bcaaca | 23-Feb-2024 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: cec-api: add locking in cec_release()
When cec_release() uses fh->msgs it has to take fh->lock, otherwise the list can get corrupted.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.
media: cec: cec-api: add locking in cec_release()
When cec_release() uses fh->msgs it has to take fh->lock, otherwise the list can get corrupted.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Yang, Chenyuan <cy54@illinois.edu> Closes: https://lore.kernel.org/linux-media/PH7PR11MB57688E64ADE4FE82E658D86DA09EA@PH7PR11MB5768.namprd11.prod.outlook.com/ Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)") Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
2f4d3718 | 07-Jul-2023 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec-pin: only enable interrupts when monitoring the CEC pin
The CEC interrupt is only needed if userspace wants to monitor the CEC pin for an unconfigured CEC device. That gives it the most p
media: cec-pin: only enable interrupts when monitoring the CEC pin
The CEC interrupt is only needed if userspace wants to monitor the CEC pin for an unconfigured CEC device. That gives it the most precise CEC pin debugging results.
This avoids a corner case where the interrupt is enabled for a short period when the adapter is about to be configured.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
9b79d776 | 07-Jul-2023 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec-pin: improve interrupt handling
The CEC pin framework needs a bit more control over the interrupt handling: make sure that the disable_irq op is called even if the device node is unregist
media: cec-pin: improve interrupt handling
The CEC pin framework needs a bit more control over the interrupt handling: make sure that the disable_irq op is called even if the device node is unregistered, log the state of the interrupt in debugfs, and disable the interrupt when the kernel thread is stopped.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
948a77aa | 12-Jun-2023 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: core: add adap_unconfigured() callback
The adap_configured() callback was called with the adap->lock mutex held if the 'configured' argument was false, and without the adap->lock mutex h
media: cec: core: add adap_unconfigured() callback
The adap_configured() callback was called with the adap->lock mutex held if the 'configured' argument was false, and without the adap->lock mutex held if that argument was true.
That was very confusing, and so split this up in a adap_unconfigured() callback and a high-level configured() callback.
This also makes it easier to understand when the mutex is held: all low-level adap_* callbacks are called with the mutex held. All other callbacks are called without that mutex held.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: f1b57164305d ("media: cec: add optional adap_configured callback") Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
73af6c75 | 24-Apr-2023 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: cec: core: don't set last_initiator if tx in progress
When a message was received the last_initiator is set to 0xff. This will force the signal free time for the next transmit to that for a n
media: cec: core: don't set last_initiator if tx in progress
When a message was received the last_initiator is set to 0xff. This will force the signal free time for the next transmit to that for a new initiator. However, if a new transmit is already in progress, then don't set last_initiator, since that's the initiator of the current transmit. Overwriting this would cause the signal free time of a following transmit to be that of the new initiator instead of a next transmit.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|