Received: by 10.223.185.116 with SMTP id b49csp7924731wrg; Thu, 1 Mar 2018 13:40:57 -0800 (PST) X-Google-Smtp-Source: AG47ELt+3nIl10fZDGomRh39IuAuA18gn20Dt+JtlJzsyp2NMyTqfB8eC3M7JazTiynXKSqwNYjx X-Received: by 10.98.155.93 with SMTP id r90mr3390021pfd.132.1519940457854; Thu, 01 Mar 2018 13:40:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519940457; cv=none; d=google.com; s=arc-20160816; b=Kq/yHhDk2GGiHkUnIsdTDUwGcMigo+mROZfjkmleXbMxOL2TzCnDMi0XP9OA0bG2m7 dTPkKxIkQhXkoiewE/NlWU6ERHm0E2R5o99ADp/tNQ4nPw2GdpdEa/mfU+LMT/+i7dMS 17YNpEifQAhLLOAP6VJh0itigF4Ishkvq21XJw3TetoGIo/0dZmNP0uovolqwmaH0EFk LAl0AgvhBHb00MQLcSHAl4tqP9bz0JcZL5HZQR4yNiGGYpypHEMzytKv+UGSlE5vplCQ SzWvW5HnSlzB5zlcNVK/foJ7wlNN9gxdL5WSiUkjMdZ8EkjzC+Uue7jc5XMrq9Wrld7E rZsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7qzRD4YJpbrL7yTd4zpb1yton6lD7h8DIaySGC9Ev44=; b=niG3ElOUz+8P+d8AnxS9noF9GXL+bZAPnMEJeF32ybwa+8jgxljxtDmQHk8BU++qVr EL7BYVjEH+4m4vbzW2dkwmcX1U3xhWudamctmqKlLJGnQGDea38oFkqdIkdfU0ihw8+M J3tBWIp3xxwxgb1nhNumpCTbS2LZBe9afL81xkRBc8inYK+66VHVdC0p1LoKcOi9NhH5 oiwfLykSNiJ5xk/1d4Y/ohfUXCjr3GyuXC9AWHh1+n2pG2XM+4SLm6voO0fROGWukyLO 9ne8aA7ABopui72v3y5RR7sUHeEYgOMX3fP/3/TuGOJYs/s8+NScoIBbNZEdIGStXkCk /bQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si2949561pgq.413.2018.03.01.13.40.42; Thu, 01 Mar 2018 13:40:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162155AbeCAVfQ (ORCPT + 99 others); Thu, 1 Mar 2018 16:35:16 -0500 Received: from mailoutvs4.siol.net ([213.250.19.137]:33171 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161792AbeCAVfJ (ORCPT ); Thu, 1 Mar 2018 16:35:09 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 7B5AA522EB9; Thu, 1 Mar 2018 22:35:07 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PCKvh24N6ixJ; Thu, 1 Mar 2018 22:35:07 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 17E2E522F82; Thu, 1 Mar 2018 22:35:07 +0100 (CET) Received: from localhost.localdomain (cpe-86-58-68-135.ftth.triera.net [86.58.68.135]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id B499F522F90; Thu, 1 Mar 2018 22:35:04 +0100 (CET) From: Jernej Skrabec To: maxime.ripard@free-electrons.com, wens@csie.org, airlied@linux.ie, robh+dt@kernel.org, mark.rutland@arm.com, mturquette@baylibre.com, sboyd@kernel.org Cc: jernej.skrabec@siol.net, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v3 06/16] drm/sun4i: Release exclusive clock lock when disabling TCON Date: Thu, 1 Mar 2018 22:34:32 +0100 Message-Id: <20180301213442.16677-7-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180301213442.16677-1-jernej.skrabec@siol.net> References: <20180301213442.16677-1-jernej.skrabec@siol.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 1d714c06ec9d..7f6c4125c89f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -102,10 +102,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, -- 2.16.2