drm/sun4i: hdmi: Fix usage of TMDS clock
authorPriit Laes <priit.laes@paf.com>
Tue, 22 Jan 2019 07:32:32 +0000 (09:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2019 16:58:50 +0000 (17:58 +0100)
commitf73577353256735fbcb05593d9bdcc699f1125ca
tree772cbf9ad1807f600ada803d79cfaa06c766d049
parent89d9a53346b20cceccb7c86253e186721ae50359
drm/sun4i: hdmi: Fix usage of TMDS clock

[ Upstream commit 5e1bc251cebc84b41b8eb5d2434e54d939a85430 ]

Although TMDS clock is required for HDMI to properly function,
nobody called clk_prepare_enable(). This fixes reference counting
issues and makes sure clock is running when it needs to be running.

Due to TDMS clock being parent clock for DDC clock, TDMS clock
was turned on/off for each EDID probe, causing spurious failures
for certain HDMI/DVI screens.

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Priit Laes <priit.laes@paf.com>
[Maxime: Moved the TMDS clock enable earlier]
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190122073232.7240-1-plaes@plaes.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c