summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2018-03-01 22:34:32 +0100
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-03-02 08:44:17 +0100
commitf3e5feeb92a163c935659b7222a32965276c1c23 (patch)
tree1a7bdd349bfa8abc49b3fe62b8537b6c6aea9992 /drivers/gpu
parentdrm/sun4i: Fix dclk_set_phase (diff)
downloadlinux-f3e5feeb92a163c935659b7222a32965276c1c23.tar.xz
linux-f3e5feeb92a163c935659b7222a32965276c1c23.zip
drm/sun4i: Release exclusive clock lock when disabling TCON
Currently exclusive TCON clock lock is never released, which, for example, prevents changing resolution on HDMI. In order to fix that, release clock when disabling TCON. TCON is always disabled first before new mode is set. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180301213442.16677-7-jernej.skrabec@siol.net
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index b3960118deb9..ade197b1a9ac 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -101,10 +101,12 @@ static void sun4i_tcon_channel_set_status(struct sun4i_tcon *tcon, int channel,
return;
}
- if (enabled)
+ if (enabled) {
clk_prepare_enable(clk);
- else
+ } else {
+ clk_rate_exclusive_put(clk);
clk_disable_unprepare(clk);
+ }
}
static void sun4i_tcon_lvds_set_status(struct sun4i_tcon *tcon,