diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-04-24 16:07:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-28 11:12:35 +0200 |
commit | a05df0643120adb7c4ee3cc01e40836fa31b1a9f (patch) | |
tree | 4346ab5adeae9ca0e98cd3e8adbb2d776c5ad9e4 | |
parent | f37956a140d10efc07a303b5b043b422b93cc47e (diff) | |
download | linux-a05df0643120adb7c4ee3cc01e40836fa31b1a9f.tar.gz |
media: cec: core: don't set last_initiator if tx in progress
[ Upstream commit 73af6c7511038249cad3d5f3b44bf8d78ac0f499 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/media/cec/core/cec-adap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index ac18707fddcd..b1512f9c5895 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1090,7 +1090,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)) |