linux/drivers/media/cec/core
Hans Verkuil 3813c932ed media: cec: call enable_adap on s_log_addrs
Don't enable/disable the adapter if the first fh is opened or the
last fh is closed, instead do this when the adapter is configured
or unconfigured, and also when we enter Monitor All or Monitor Pin
mode for the first time or we exit the Monitor All/Pin mode for the
last time.

However, if needs_hpd is true, then do this when the physical
address is set or cleared: in that case the adapter typically is
powered by the HPD, so it really is disabled when the HPD is low.
This case (needs_hpd is true) was already handled in this way, so
this wasn't changed.

The problem with the old behavior was that if the HPD goes low when
no fh is open, and a transmit was in progress, then the adapter would
be disabled, typically stopping the transmit immediately which
leaves a partial message on the bus, which isn't nice and can confuse
some adapters.

It makes much more sense to disable it only when the adapter is
unconfigured and we're not monitoring the bus, since then you really
won't be using it anymore.

To keep track of this store a CEC activation count and call adap_enable
only when it goes from 0 to 1 or back to 0.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-24 07:37:58 +01:00
..
cec-adap.c media: cec: call enable_adap on s_log_addrs 2022-04-24 07:37:58 +01:00
cec-api.c media: cec: call enable_adap on s_log_addrs 2022-04-24 07:37:58 +01:00
cec-core.c bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
cec-notifier.c media: cec/core/cec-notifier: use IS_REACHABLE(CONFIG_I2C) 2021-03-22 10:24:44 +01:00
cec-pin-error-inj.c media: cec/core: clarify rx-arb-lost usage message 2021-04-06 16:08:38 +02:00
cec-pin-priv.h media: cec-pin: drop unused 'enabled' field from struct cec_pin 2021-12-07 11:29:56 +01:00
cec-pin.c media: cec-pin: fix interrupt en/disable handling 2021-12-07 11:29:56 +01:00
cec-priv.h
Makefile