Skip to content

Commit

Permalink
media: cec: core: don't set last_initiator if tx in progress
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 26, 2023
1 parent fe4526d commit 73af6c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/cec/core/cec-adap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ void cec_received_msg_ts(struct cec_adapter *adap,
mutex_lock(&adap->lock);
dprintk(2, "%s: %*ph\n", __func__, msg->len, msg->msg);

adap->last_initiator = 0xff;
if (!adap->transmit_in_progress)
adap->last_initiator = 0xff;

/* Check if this message was for us (directed or broadcast). */
if (!cec_msg_is_broadcast(msg)) {
Expand Down

0 comments on commit 73af6c7

Please sign in to comment.