diff options
author | AngeloGioacchino Del Regno <[email protected]> | 2023-07-25 09:32:30 +0200 |
---|---|---|
committer | Chun-Kuang Hu <[email protected]> | 2023-08-09 23:20:30 +0000 |
commit | 848bc59f7713ef76d5f812bd1e95d21e9b422cc2 (patch) | |
tree | 41738300ccf37bde633787c17145bcc3f36d119f /tools/perf | |
parent | 779b8d20ca6fe62fe45da726c86ed1a1368cf313 (diff) |
drm/mediatek: dp: Avoid mutex locks if audio is not supported/enabled
If a controller (usually, eDP!) does not support audio, or audio is not
enabled because the endpoint has no audio support, it's useless to lock
a mutex only to unlock it right after because there's no .plugged_cb().
Check if the audio is supported and enabled before locking the mutex in
mtk_dp_update_plugged_status(): if not, we simply return immediately.
While at it, since the update_plugged_status_lock mutex would not be
used if the controller doesn't support audio at all, initialize it
only if `audio_supported` is true.
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Chen-Yu Tsai <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Reviewed-by: CK Hu <[email protected]>
Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Signed-off-by: Chun-Kuang Hu <[email protected]>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions