diff options
| author | Tzung-Bi Shih <[email protected]> | 2020-02-17 11:16:53 +0800 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-02-17 17:39:13 +0000 |
| commit | f07980d4ed60fbb35857b655c94b111f4ddf2abf (patch) | |
| tree | e347800766e82f56eff798f1e6951ba27d2bcea4 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 2f0b42034bd75a938cdf144149d6db4fa4d51208 (diff) | |
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 <[email protected]>
Acked-by: CK Hu <[email protected]>
Link: https://lore.kernel.org/r/20200217105513.2.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions