drm/bridge: dw-hdmi: Restore audio when setting a mode
authorDaniel Kurtz <djkurtz@chromium.org>
Tue, 8 Oct 2019 10:21:45 +0000 (18:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:44:05 +0000 (16:44 +0100)
commit48a5bcb24993295b198ee1dcbb3787585aee4a0d
tree0dbc05c49ce5bc4399aa43238c88dfb4ae2d53e1
parent541833aa22eb2b80b2e6fdfb98bdf94b5b70b002
drm/bridge: dw-hdmi: Restore audio when setting a mode

[ Upstream commit fadfee3f9d8f114435a8a3e9f83a227600d89de7 ]

When setting a new display mode, dw_hdmi_setup() calls
dw_hdmi_enable_video_path(), which disables all hdmi clocks, including
the audio clock.

We should only (re-)enable the audio clock if audio was already enabled
when setting the new mode.

Without this patch, on RK3288, there will be HDMI audio on some monitors
if i2s was played to headphone when the monitor was plugged.
ACER H277HU and ASUS PB278 are two of the monitors showing this issue.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191008102145.55134-1-cychiang@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c