From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751655AbdGRL1m (ORCPT ); Tue, 18 Jul 2017 07:27:42 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:55445 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbdGRL1k (ORCPT ); Tue, 18 Jul 2017 07:27:40 -0400 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: myungjoo.ham@samsung.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <9759c3fda16f60c03acc114ceea6a480> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <596DF09E.10405@rock-chips.com> Date: Tue, 18 Jul 2017 19:27:26 +0800 From: jeffy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: myungjoo.ham@samsung.com, "linux-kernel@vger.kernel.org" CC: "rui.zhang@intel.com" , "briannorris@chromium.org" , "javi.merino@kernel.org" , "dianders@chromium.org" , "lukasz.luba@arm.com" , Chanwoo Choi , Kyungmin Park , "linux-pm@vger.kernel.org" Subject: Re: [PATCH] devfreq: simple_ondemand: Update devfreq stats when governor started References: <1500372171-7194-1-git-send-email-jeffy.chen@rock-chips.com> <20170718103549epcms1p87cf1d138e35426be0f95afa61fcebc85@epcms1p8> In-Reply-To: <20170718103549epcms1p87cf1d138e35426be0f95afa61fcebc85@epcms1p8> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi Ham, Thanks for your reply. On 07/18/2017 06:35 PM, MyungJoo Ham wrote: >> If governor suspends soon after started, it may not have the chance to >> update devfreq stats, which leaves devfreq stats' current frequence be >> zero. >> >> So when the thermal core tries to throttle the power, it would failed >> to get the correct static power of current frequence and print these >> warnings: >> [ 2.024735] core: dev_pm_opp_get_voltage: Invalid parameters >> [ 2.024743] mali ff9a0000.gpu: Failed to get voltage for frequency 0: >> -34 >> ... >> [ 2.026320] core: dev_pm_opp_get_voltage: Invalid parameters >> [ 2.026327] mali ff9a0000.gpu: Failed to get voltage for frequency 0: >> -34 >> >> Update devfreq stats when governor started to avoid that. >> >> Signed-off-by: Jeffy Chen > > How are you calling suspend/resume routins in the mali drivers? > i was porting mali driver from here: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/gpu/arm/midgard/mali_kbase_core_linux.c#4079 > It appears that your mali device driver's suspend/resume routines are > accessing "struct devfreq_dev_status" directly. Is this correct? > no, but the suspend/resume would suspend/resume the governor. > > Plus, for MALI (if that assumption is correct), this issue might occur > with other governors. > > If so, would it be better to put the first initializing call of > devfreq_update_stats() at devfreq_add_device()? > right, that make sense. i put it here because the comment of this function said it should be called by governor, but you're right, it would be better this way, will send new version soon. > > Cheers, > MyungJoo > > ps. Where can I look at the mali-devfreq device driver? (I couldn't find it) sorry, i should mention that, please check above link :) > > > >