Received: by 10.223.185.116 with SMTP id b49csp1286879wrg; Fri, 23 Feb 2018 15:32:36 -0800 (PST) X-Google-Smtp-Source: AH8x224BaTDpsT34WOtA8Ekf9CZapENHXkwwIH4djMz6cVjvXeGQ0XUwbj6ZR+wroUgFU1Hxj0MZ X-Received: by 2002:a17:902:c1:: with SMTP id a59-v6mr3130047pla.284.1519428756812; Fri, 23 Feb 2018 15:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519428756; cv=none; d=google.com; s=arc-20160816; b=pTgqJ+8waqlEE81dqKoFBFPgdsRQ/Isz3NWbYjl5+ihclEmksvKyozEh1wFA4pMWLs p8I5DdvM43Od8Oco+8k2+FAKCRVueUkqPx1mHYOifyvPuAmnzAnZDWux6TsJAbqMAutR fSvgfxe5w4KxESD2iCBc3LrE27KLSBow04etybSFDYQtY8dxUuVc4tdaizz4BiJInXiE 5w3m9BdrTRNKkxSrVb/gfLPuifabs960S0rdLYeYpBZC+6d56GfkB1gMKv/vNIKS9ztE 5FTGFK2j50i4bKNsFCV/a3kgWjilUgXJLErlZPToyYiiJwOP5co4Y0naS7HDTpXhLlfR B6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=FxBjb+Z99xX/KvwROZvr/XHCX/YcbOGdKPNIuUe+a+8=; b=b+ae4EjnMvSwP+tzf2BwG0Ag3WEho1nGD0jj010bq1xS189n/I2e+OZkQv6k+GcS0j c0lQV6bhZMC7HC/y+gZWu2dYn7984Rj3gO/4+zTCq1DEzsXzmHjme8P9UpNlAd1Zzmr9 a82yrj6HcR+grM+55Z8BwMZeOOoWDxtU+rbktcH14YpKa0xbYe2MMXyi+pamMWTT0qI6 J1dxKn3RqTHDaCInrMA+V1UK9jy6JDnyxwoWW5VcMGHo9PSP5ciFWYCCIwQ4tEWUx8tG iB3NXW28ydxDrNlMsF3hZMOUZqc8MEQZJ299RVOdWQdT/UzxLLmIRCz1fLDZA9ItIJAy adaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=dNdQ0+79; 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 m15-v6si2578186pln.718.2018.02.23.15.32.22; Fri, 23 Feb 2018 15:32:36 -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; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=dNdQ0+79; 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 S1752157AbeBWXbm (ORCPT + 99 others); Fri, 23 Feb 2018 18:31:42 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:42336 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbeBWXbk (ORCPT ); Fri, 23 Feb 2018 18:31:40 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 9C9F6B00759 for ; Sat, 24 Feb 2018 00:31:39 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1519428699; x=1520292700; bh=qDhpRThLMtFCPsWDLE7LQsaH0CQGuqRjTHX BGvEYgBY=; b=dNdQ0+79p6F93YtYiUZtxSr5hiw3tLMHQrZZ+4MHrRNCNtIDyB6 8XNLhpC+fBQW+v/XO9GhCg1KS7wEsO5gVtAHdDoVT0v9yOPR6tqChYKwPjrTsZw+ GL/pCbjAGgTkTX3Rz9NFQaFryITFjqphcl5bSTxLUMd9fi0EDdtcdETQ= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LORHbBCzM4rY for ; Sat, 24 Feb 2018 00:31:39 +0100 (CET) Received: from [192.168.2.132] (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 58598B00289; Sat, 24 Feb 2018 00:31:37 +0100 (CET) Subject: Re: [v2,03/10] drm/sun4i: Protect the TCON pixel clocks To: Maxime Ripard , Mark Brown , Thierry Reding , Chen-Yu Tsai , Mark Rutland , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Petazzoni , Daniel Vetter , Maxime Ripard , linux-arm-kernel@lists.infradead.org References: From: Giulio Benetti Message-ID: <7ed0fad9-6b3d-aafc-08a6-fb18761897aa@micronovasrl.com> Date: Sat, 24 Feb 2018 00:31:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 21/02/2018 10:20, Maxime Ripard ha scritto: > From: Maxime Ripard > > Both TCON clocks are very sensitive to clock changes, since any change > might lead to improper timings. > > Make sure our rate is never changed. > > Signed-off-by: Maxime Ripard Tested-by: Giulio Benetti Tested on A20-LiNova1-4_3i-ctp with Mali r6p2 installed. Before Mali changed dotclock, now it doesn't anymore. > --- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > index b73acab74867..cbe87cee13d1 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > @@ -261,7 +261,7 @@ static void sun4i_tcon0_mode_set_common(struct sun4i_tcon *tcon, > const struct drm_display_mode *mode) > { > /* Configure the dot clock */ > - clk_set_rate(tcon->dclk, mode->crtc_clock * 1000); > + clk_set_rate_exclusive(tcon->dclk, mode->crtc_clock * 1000); > > /* Set the resolution */ > regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG, > @@ -419,7 +419,7 @@ static void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, > WARN_ON(!tcon->quirks->has_channel_1); > > /* Configure the dot clock */ > - clk_set_rate(tcon->sclk1, mode->crtc_clock * 1000); > + clk_set_rate_exclusive(tcon->sclk1, mode->crtc_clock * 1000); > > /* Adjust clock delay */ > clk_delay = sun4i_tcon_get_clk_delay(mode, 1); >