All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning()
@ 2024-03-16  2:06 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2024-03-16  2:06 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240314140421.3563571-4-lukasz.luba@arm.com>
References: <20240314140421.3563571-4-lukasz.luba@arm.com>
TO: Lukasz Luba <lukasz.luba@arm.com>
TO: linux-kernel@vger.kernel.org
TO: linux-pm@vger.kernel.org
CC: lukasz.luba@arm.com
CC: dietmar.eggemann@arm.com
CC: linux-arm-kernel@lists.infradead.org
CC: sboyd@kernel.org
CC: nm@ti.com
CC: linux-samsung-soc@vger.kernel.org
CC: daniel.lezcano@linaro.org
CC: rafael@kernel.org
CC: viresh.kumar@linaro.org
CC: krzysztof.kozlowski@linaro.org
CC: alim.akhtar@samsung.com
CC: m.szyprowski@samsung.com
CC: mhiramat@kernel.org

Hi Lukasz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linus/master next-20240315]
[cannot apply to krzk/for-next clk/clk-next soc/for-next rafael-pm/acpi-bus rafael-pm/devprop v6.8]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lukasz-Luba/OPP-OF-Export-dev_opp_pm_calc_power-for-usage-from-EM/20240314-220719
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20240314140421.3563571-4-lukasz.luba%40arm.com
patch subject: [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning()
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: powerpc64-randconfig-r071-20240315 (https://download.01.org/0day-ci/archive/20240316/202403160905.OfEMtk76-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202403160905.OfEMtk76-lkp@intel.com/

smatch warnings:
kernel/power/energy_model.c:824 em_dev_update_chip_binning() error: uninitialized symbol 'ret'.

vim +/ret +824 kernel/power/energy_model.c

3114fc30ea7e1fd Lukasz Luba 2024-03-14  800  
3114fc30ea7e1fd Lukasz Luba 2024-03-14  801  /**
3114fc30ea7e1fd Lukasz Luba 2024-03-14  802   * em_dev_update_chip_binning() - Update Energy Model with new values after
3114fc30ea7e1fd Lukasz Luba 2024-03-14  803   *			the new voltage information is present in the OPPs.
3114fc30ea7e1fd Lukasz Luba 2024-03-14  804   * @dev		: Device for which the Energy Model has to be updated.
3114fc30ea7e1fd Lukasz Luba 2024-03-14  805   *
3114fc30ea7e1fd Lukasz Luba 2024-03-14  806   * This function allows to update easily the EM with new values available in
3114fc30ea7e1fd Lukasz Luba 2024-03-14  807   * the OPP framework and DT. It can be used after the chip has been properly
3114fc30ea7e1fd Lukasz Luba 2024-03-14  808   * verified by device drivers and the voltages adjusted for the 'chip binning'.
3114fc30ea7e1fd Lukasz Luba 2024-03-14  809   * It uses the "dynamic-power-coefficient" DT property to calculate the power
3114fc30ea7e1fd Lukasz Luba 2024-03-14  810   * values for EM. For power calculation it uses the new adjusted voltage
3114fc30ea7e1fd Lukasz Luba 2024-03-14  811   * values known for OPPs, which might be changed after boot.
3114fc30ea7e1fd Lukasz Luba 2024-03-14  812   */
3114fc30ea7e1fd Lukasz Luba 2024-03-14  813  int em_dev_update_chip_binning(struct device *dev)
3114fc30ea7e1fd Lukasz Luba 2024-03-14  814  {
3114fc30ea7e1fd Lukasz Luba 2024-03-14  815  	struct em_perf_table __rcu *em_table;
3114fc30ea7e1fd Lukasz Luba 2024-03-14  816  	struct em_perf_domain *pd;
3114fc30ea7e1fd Lukasz Luba 2024-03-14  817  	int i, ret;
3114fc30ea7e1fd Lukasz Luba 2024-03-14  818  
3114fc30ea7e1fd Lukasz Luba 2024-03-14  819  	if (IS_ERR_OR_NULL(dev))
3114fc30ea7e1fd Lukasz Luba 2024-03-14  820  		return -EINVAL;
3114fc30ea7e1fd Lukasz Luba 2024-03-14  821  
3114fc30ea7e1fd Lukasz Luba 2024-03-14  822  	pd = em_pd_get(dev);
3114fc30ea7e1fd Lukasz Luba 2024-03-14  823  	if (!pd) {
3114fc30ea7e1fd Lukasz Luba 2024-03-14 @824  		dev_warn(dev, "Couldn't find Energy Model %d\n", ret);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/4] Update Energy Model after chip binning adjusted voltages
@ 2024-03-14 14:04 Lukasz Luba
  2024-03-14 14:04   ` Lukasz Luba
  0 siblings, 1 reply; 11+ messages in thread
From: Lukasz Luba @ 2024-03-14 14:04 UTC (permalink / raw)
  To: linux-kernel, linux-pm
  Cc: lukasz.luba, dietmar.eggemann, linux-arm-kernel, sboyd, nm,
	linux-samsung-soc, daniel.lezcano, rafael, viresh.kumar,
	krzysztof.kozlowski, alim.akhtar, m.szyprowski, mhiramat

Hi all,

This is a follow-up patch aiming to add EM modification due to chip binning.
The first RFC and the discussion can be found here [1].

It uses Exynos chip driver code as a 1st user. The EM framework has been
extended to handle this use case easily, when the voltage has been changed
after setup. On my Odroid-xu4 in some OPPs I can observe ~20% power difference.
According to that data in driver tables it could be up to ~29%.

This chip binning is applicable to a lot of SoCs, so the EM framework should
make it easy to update. It uses the existing OPP and DT information to
re-calculate the new power values.


Changes:
v2:
- exported the OPP calculation function from the OPP/OF so it can be
  used from EM fwk (Viresh)
- refactored EM updating function to re-use common code
- added new EM function which can be used by chip device drivers which
  modify the voltage in OPPs
v1 is at [1]

Regards,
Lukasz Luba

[1] https://lore.kernel.org/lkml/20231220110339.1065505-1-lukasz.luba@arm.com/

Lukasz Luba (4):
  OPP: OF: Export dev_opp_pm_calc_power() for usage from EM
  PM: EM: Change the em_adjust_new_capacity() to re-use code
  PM: EM: Add em_dev_update_chip_binning()
  soc: samsung: exynos-asv: Update Energy Model after adjusting voltage

 drivers/opp/of.c                 |  17 +++--
 drivers/soc/samsung/exynos-asv.c |  11 +++-
 include/linux/energy_model.h     |   5 ++
 include/linux/pm_opp.h           |   8 +++
 kernel/power/energy_model.c      | 109 +++++++++++++++++++++++++------
 5 files changed, 125 insertions(+), 25 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-22 10:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-16  2:06 [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning() kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-03-14 14:04 [PATCH 0/4] Update Energy Model after chip binning adjusted voltages Lukasz Luba
2024-03-14 14:04 ` [PATCH 3/4] PM: EM: Add em_dev_update_chip_binning() Lukasz Luba
2024-03-14 14:04   ` Lukasz Luba
2024-03-14 14:32   ` Christian Loehle
2024-03-14 14:32     ` Christian Loehle
2024-03-22 10:26     ` Lukasz Luba
2024-03-22 10:26       ` Lukasz Luba
2024-03-15 15:54   ` kernel test robot
2024-03-15 15:54     ` kernel test robot
2024-03-15 16:36   ` kernel test robot
2024-03-15 16:36     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.