summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i
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/drm/sun4i
parente64b6afa98f3629d0c0c46233bbdbe8acdb56f06 (diff)
downloadop-kernel-dev-f3e5feeb92a163c935659b7222a32965276c1c23.zip
op-kernel-dev-f3e5feeb92a163c935659b7222a32965276c1c23.tar.gz
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/drm/sun4i')
-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 b396011..ade197b 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,
OpenPOWER on IntegriCloud