summaryrefslogtreecommitdiffstats
path: root/net/phonet
diff options
context:
space:
mode:
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>2023-07-25 09:32:30 +0200
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2023-08-09 23:20:30 +0000
commit848bc59f7713ef76d5f812bd1e95d21e9b422cc2 (patch)
tree41738300ccf37bde633787c17145bcc3f36d119f /net/phonet
parent779b8d20ca6fe62fe45da726c86ed1a1368cf313 (diff)
downloadlinux-stable-848bc59f7713ef76d5f812bd1e95d21e9b422cc2.tar.gz
linux-stable-848bc59f7713ef76d5f812bd1e95d21e9b422cc2.tar.bz2
linux-stable-848bc59f7713ef76d5f812bd1e95d21e9b422cc2.zip
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 <angelogioacchino.delregno@collabora.com> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20230725073234.55892-8-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'net/phonet')
0 files changed, 0 insertions, 0 deletions