Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp982121ybl; Fri, 6 Dec 2019 09:17:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyhxk36urTDEYoAMN0s2uNZ2eqP5MoNcYYzqOLxPy/MyysJwZcA5jgn8e88QQbQ8VUShE5G X-Received: by 2002:aca:570f:: with SMTP id l15mr13604303oib.120.1575652667650; Fri, 06 Dec 2019 09:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575652667; cv=none; d=google.com; s=arc-20160816; b=DTMkT74w/CBke/9g20pSazsl2ThVDgiycJaz/UVacxfjcB2vdoc2alLqtqz4Q0qhcu FISf6yepP7NmKmSwUJCyh+ju2WfB89iBPLb5u6MdpdB3COUFrrdS4f03lxEnEdViiFbh gVRD0wPtGh0NQrd9MfxKTopuY490dpDp+u4PrRuAaRuCSLcY3Hx4RURGE1dC/DaslZrs x8qn5f0ENFtgPLW8GUV3guqlwJK+9sJBbcHExG0bdyciH8CE0vatW0FVVtTV33yXtp4S Cygnz2SkgqYBOwQ0PS7jwv+7PEMUTBat5kNPXSorCuq0xy7fUkRk/9ogCxQvhQRBb+QK DGFQ== 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=ug5efLPQxmR29AtCbF7Ni77VR8C32a2cRB6BLR6RXjc=; b=bGuIwvpzcALG+kbNzPehFbatSAv0ZTKriiOtBLRvJyfuIJxi2ot1KUlLXftTUFVEnE VL7AYBE9V8R5ZLCuyiFpaUtmE0m3s1KR+Un/KBAEwiMPvKDHamBIAJZghwcoeyCbBDXq bOpAsXWvdbLXtnQnJp4RsyCc/4Wh1RA7iJGjq5kqaHXjP9lbwAd6ma5AMexZN8vhc7iu 3f9CIsU7bGEBTnKx0qtkU6hc9btlNI3vCto8btHuWWxbhE0AvNotspu1uMsyunKr8RXV fah2C1v0UGGWXaFBUMLzHEQv1j6I9HA0FxqZ1hCei0ED9prxWMaV/0KV+ipicqYSgTcH t41w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JS1ov9al; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si7250610oig.241.2019.12.06.09.17.33; Fri, 06 Dec 2019 09:17:47 -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=@kernel.org header.s=default header.b=JS1ov9al; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbfLFRRB (ORCPT + 99 others); Fri, 6 Dec 2019 12:17:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:57308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726284AbfLFRRB (ORCPT ); Fri, 6 Dec 2019 12:17:01 -0500 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C94B92467A for ; Fri, 6 Dec 2019 17:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575652620; bh=DatOl7pENgsZgL0vR4s62JyPzJa3DWGO0o2jk6RhY+0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JS1ov9al4yWI6/QL523l9ach20dToYwDP+KU3yVcpX3vBvzAc3PCMzTcOJA4kljpz AQPhphRcCVklKttzte21SP1RlBNCU6Xi2isBU5TdWulpSidmWPgyggWkd878rk/q0G RPNpADADRAbBT7mSYDx80hfgfD3ByiKEvut5d7ss= Received: by mail-qv1-f46.google.com with SMTP id b18so174390qvy.3 for ; Fri, 06 Dec 2019 09:17:00 -0800 (PST) X-Gm-Message-State: APjAAAXTK3WgiP3HwFTUTBWc4E5pZcQNfYJI2gKsMUcZbzqgD1x4muNy WOU4JtawIjZn/qeR0RxMCvUCOvwHs+5Gx7nv5w== X-Received: by 2002:a05:6214:11ac:: with SMTP id u12mr13749702qvv.85.1575652619951; Fri, 06 Dec 2019 09:16:59 -0800 (PST) MIME-Version: 1.0 References: <20191118173002.32015-1-steven.price@arm.com> In-Reply-To: <20191118173002.32015-1-steven.price@arm.com> From: Rob Herring Date: Fri, 6 Dec 2019 11:16:48 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/panfrost: devfreq: Round frequencies to OPPs To: Steven Price Cc: Daniel Vetter , David Airlie , Tomeu Vizoso , Alyssa Rosenzweig , dri-devel , "linux-kernel@vger.kernel.org" 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 Mon, Nov 18, 2019 at 11:30 AM Steven Price wrote: > > Currently when setting a frequency in panfrost_devfreq_target the > returned frequency is the actual frequency that the clock driver reports > (the return of clk_get_rate()). However, where the provided OPPs don't > precisely match the frequencies that the clock actually achieves devfreq > will then complain (repeatedly): > > devfreq devfreq0: Couldn't update frequency transition information. > > To avoid this change panfrost_devfreq_target() to fetch the opp using > devfreq_recommened_opp() and not actually query the clock for the > frequency. > > A similar problem exists with panfrost_devfreq_get_cur_freq(), but in > this case because the function is optional we can just remove it and > devfreq will fall back to using the previously set frequency. > > Fixes: 221bc77914cb ("drm/panfrost: Use generic code for devfreq") > Signed-off-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_devfreq.c | 19 ++++++------------- > 1 file changed, 6 insertions(+), 13 deletions(-) Applied. Rob