Commit 36f41157 authored by Hans Verkuil's avatar Hans Verkuil Committed by sanglipeng
Browse files

media: cec: core: don't set last_initiator if tx in progress

stable inclusion
from stable-v5.10.186
commit dc357c0787e8dcea2b6763e3a873814ca488e9f0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8J4KH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dc357c0787e8dcea2b6763e3a873814ca488e9f0



--------------------------------

[ Upstream commit 73af6c75 ]

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f16ab411
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1085,6 +1085,7 @@ void cec_received_msg_ts(struct cec_adapter *adap,
	mutex_lock(&adap->lock);
	dprintk(2, "%s: %*ph\n", __func__, msg->len, msg->msg);

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

	/* Check if this message was for us (directed or broadcast). */