diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2020-02-17 11:16:53 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-17 17:39:13 +0000 |
commit | f07980d4ed60fbb35857b655c94b111f4ddf2abf (patch) | |
tree | e347800766e82f56eff798f1e6951ba27d2bcea4 /MAINTAINERS | |
parent | 2f0b42034bd75a938cdf144149d6db4fa4d51208 (diff) | |
download | linux-f07980d4ed60fbb35857b655c94b111f4ddf2abf.tar.bz2 |
drm/mediatek: fix race condition for HDMI jack status reporting
hdmi_conn_detect and mtk_hdmi_audio_hook_plugged_cb would be called
by different threads.
Imaging the following calling sequence:
Thread A Thread B
--------------------------------------------------------------------
mtk_hdmi_audio_hook_plugged_cb()
mtk_cec_hpd_high() -> disconnected
hdmi_conn_detect()
mtk_cec_hpd_high() -> connected
plugged_cb(connected)
plugged_cb(disconnected)
The latest disconnected is false reported. Makes mtk_cec_hpd_high
and plugged_cb atomic to fix.
Also uses the same lock to protect read/write of plugged_cb and codec_dev.
Fixes: 5d3c64477392 ("drm/mediatek: support HDMI jack status reporting")
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Acked-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/20200217105513.2.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions