Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp296469ybv; Thu, 13 Feb 2020 00:25:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzt2PLaJ2H+9HHg7mOlgmir0G5XWcOuXI5111s2/tt+J420xVW1Q4v0CcPxmtxS/Pwnx/m3 X-Received: by 2002:a05:6830:1d8d:: with SMTP id y13mr11966258oti.344.1581582333604; Thu, 13 Feb 2020 00:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581582333; cv=none; d=google.com; s=arc-20160816; b=WFf5K6m1GaSwx22i3BKvm17BXVYCRqroj7uRu89GXNTdO91CfRW143RrXQgAEgCKn4 wlgoCoCT5+QyFQKN9Ta/ZTb9S9ml0FD0WIGsBH3/g83uQBQxS4k9CgFrV7q8R/QJ9BF1 xmA2wcoxrUh/6XKHX/bnbiqAtysiTen2wCA7AYDSyRedvG70nln1Gy8lqpCHADJWOpwA FcaP7XiU72NDpf5o9QkNFRGCMXHpfy0tKzUPhzR1XJ9Fpm5ehN62UmmzCRbhu9jE8F+Y xGcVYYADF3VRIgsd2wVExenCdKONCvIitRIPU6B5NhYkksrNPwfMxpQgwr1iIfAGArkr 7Dfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OK0wietKvUZvwARAxmAdcE7mqGpP2688mkrFendJI3c=; b=pLtyQiIQHNsOvJKQRlumXK1/wmlj6ue3FXWw43Fp6ehXCcSpJY5XZOf6xXx6totFgG 58n8T8iJQSJ5nc036Re3p+cRJofoPWB0joMkHEk2MgIDqdTGOX3NqjBqqHLQdW8Bfa7/ 47imsTRwxkLWiMXdKV2E/h9y+aNHdz+IafWcSHYs6wQUojJG3FUpmaejqdx38fnvHYBV QhStOmy5kpNbZvQjrMtDENYijDN+9rM6H4HOBVsW3DytwRw9Z2VMHHaKHlg0Ysrtj7ed cHiLcczRMhZLMgPjjcVKYltdOvsS/2ovx8YsuvHe5Bjgn9kdl5rjlA7cfbD71Ld+wTmV 9mug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mpc0JeM0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si808894oti.303.2020.02.13.00.25.20; Thu, 13 Feb 2020 00:25:33 -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=pass header.i=@chromium.org header.s=google header.b=mpc0JeM0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729485AbgBMIZL (ORCPT + 99 others); Thu, 13 Feb 2020 03:25:11 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44872 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgBMIZL (ORCPT ); Thu, 13 Feb 2020 03:25:11 -0500 Received: by mail-qk1-f196.google.com with SMTP id v195so4838483qkb.11 for ; Thu, 13 Feb 2020 00:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OK0wietKvUZvwARAxmAdcE7mqGpP2688mkrFendJI3c=; b=mpc0JeM0+dOlAf+F/vCTYHoR+PUYA7VQeKJNhPzJStLAgkkRV03DFL99y9egz3e68P lPCoDzkpJvdoyiVMw6PB/Dlh0Xa4d+vZUYPZE19Q2YMPwFx6GqbOhqUZsM2yIvmMYB4C 9GRN7zW46xO+BvOUOoI84rF0S+e8+9ZGjjrVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OK0wietKvUZvwARAxmAdcE7mqGpP2688mkrFendJI3c=; b=UA+JPYMqzVng85qfkWzVJmVcmbPmtqCSS7JbbyhJkk7Dmq1N9BenGBUDlz1zzk/IxS zuAHEBTkKYojYF7cQ3SS1+pvYRPYmYFpCXxJjFrhBhQk61aT4YKPmdq9DFh+J/sky6Eh q0Y3SIwOSyufSNIaIefTk2R9khu4vUyhQuZ7RzmWlOPD+8pA3AK+PqwGIMDfm2nBup0H az1SIOV9F8Fy/11w624bmjnwqOJO6FNX073IdFfimH7CQlXvvV9wcutNBsup8Gg9YQbO O/L8oWc54HXTo1vYUL6rDZ6b11RO5sYFMI+S+Getd4Eg9JveyVyzGlkwgGHCs4Buxfzx jVPA== X-Gm-Message-State: APjAAAXgm8HtiNWjo3nb1z2ZsvMR4nMT3rPqPYOaIVcfP0QLdHV1BFK1 AgCJ9KkLOlToKIMs99F55QBW1HlbgM6jBy041nTILQ== X-Received: by 2002:a37:6595:: with SMTP id z143mr11724807qkb.457.1581582310226; Thu, 13 Feb 2020 00:25:10 -0800 (PST) MIME-Version: 1.0 References: <20200207052627.130118-1-drinkcat@chromium.org> <20200207052627.130118-8-drinkcat@chromium.org> In-Reply-To: From: Nicolas Boichat Date: Thu, 13 Feb 2020 16:24:59 +0800 Message-ID: Subject: Re: [PATCH v4 7/7] RFC: drm/panfrost: devfreq: Add support for 2 regulators To: Rob Herring Cc: David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , Mark Brown , dri-devel , Devicetree List , lkml , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Hsin-Yi Wang , Ulf Hansson , Viresh Kumar , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 3:57 PM Nicolas Boichat wrote: > > > [snip] > > > But then there's a slight problem: panfrost_devfreq uses a bunch of > > > clk_get_rate calls, and the clock PLLs (at least on MTK platform) are > > > never fully precise, so we get back 299999955 for 300 Mhz and > > > 799999878 for 800 Mhz. That means that the kernel is unable to keep > > > devfreq stats as neither of these values are in the table: > > > [ 4802.470952] devfreq devfreq1: Couldn't update frequency transition > > > information. > > > The kbase driver fixes this by remembering the last set frequency, and > > > reporting that to devfreq. Should we do that as well or is there a > > > better fix? This one is my bad, I was missing this patch in my forklift to 4.19: 22bd4df9dadf46f drm/panfrost: devfreq: Round frequencies to OPPs (should really try to boot that board on linux-next, but that's for another time)