summaryrefslogtreecommitdiff
path: root/drivers/devfreq (unfollow)
Commit message (Collapse)Author
2020-10-01PM / devfreq: tegra30: Fix integer overflow on CPU's freq max outDmitry Osipenko
[ Upstream commit 53b4b2aeee26f42cde5ff2a16dd0d8590c51a55a ] There is another kHz-conversion bug in the code, resulting in integer overflow. Although, this time the resulting value is 4294966296 and it's close to ULONG_MAX, which is okay in this case. Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-12PM / devfreq: Don't fail devfreq_dev_release if not in listLeonard Crestez
[ Upstream commit 42a6b25e67df6ee6675e8d1eaf18065bd73328ba ] Right now devfreq_dev_release will print a warning and abort the rest of the cleanup if the devfreq instance is not part of the global devfreq_list. But this is a valid scenario, for example it can happen if the governor can't be found or on any other init error that happens after device_register. Initialize devfreq->node to an empty list head in devfreq_add_device so that list_del becomes a safe noop inside devfreq_dev_release and we can continue the rest of the cleanup. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-23devfreq: Don't force compilation of userspace governorSultanxda
Change-Id: I540ed4fe4bef8f059e577c59a839b27ddee78345 Signed-off-by: Sultanxda <sultanxda@gmail.com>
2019-12-23PM / devfreq: bw_hwmon: Add missing mutex unlockMichael Bestas
Fixes 28aab0311cfcd9b279f41f2f4da0085a660d5ed5 "PM/devfreq: bw_hwmon: add mutex lock in polling interval case" Change-Id: I84ccefedbc9d9c0d25806799451346b6a46bae90
2019-12-23PM / devfreq: memlat: Don't ignore extremely latency sensitive workloadsSaravana Kannan
The ratio value that's compared against ratio_ceil tunable can be 0 for workloads that are extremely latency sensitive. So, we can't ignore cores that have a ratio of 0 (which was done to ignore idle cores). So, stop ignoring cores with a ratio of 0 and instead check for instruction or frequency being 0 to identify idle cores. Change-Id: I8c6c14f374f016e6612c3b834589d065bad8f488 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2019-12-23PM / devfreq: bw_hwmon: use unsigned parameter for bytes_to_mbpsMaria Yu
In bytes_to_mbps function, the parameter is all unsigned, so change the decleration of the function to include unsigned long long to avoid compilation errors in 32 bit environment. Also changed the return value as unsigned long to avoid any data loss possible in 64 bit environment. Change-Id: Ib3906bb4bc16086ae343764c5a718f6f005428c5 Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2019-10-23adreno_tz: Correct acc_relative_busy calculationHarshitha Sai Neelati
Current acc_relative_busy calculation is causing integer overflow in 32 bit system. "stats->busy_time * stats->current_frequency" results in a value which is beyond the 32 bit range. Typecasting the value to u64 to avoid overflow. Change-Id: Id97da02bef608787ceb7c9751bbfc203af56deb1 Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
2019-09-22PM / devfreq: gpubw_mon: Add null check for governor private dataArchana Sriram
During SUSPEND event, check the pointer for governor private data is not NULL before updating bus parameters to zero. Change-Id: I1a37173e8ae7ad4bcd5f8497c5956302e647c862 Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2018-11-10PM / devfreq: tegra: fix error return code in tegra_devfreq_probe()Gustavo A. R. Silva
[ Upstream commit 9e578b37505018622dfafc40eed7cd78ff2af221 ] platform_get_irq() returns an error code, but the tegra-devfreq driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-06-19devfreq: suppress platform driver bind / unbind featureSantosh Mardi
For arm-memlat and bimc-hwmon platform driver does not support the manual bind / unbind feature through sysfs, when the governor is registered and started. Suppress the bind / unbind calls using driver attribute. Change-Id: I8287012e1e6931d80953382f3d625223315cec85 Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2018-02-22PM / devfreq: Propagate error from devfreq_add_device()Bjorn Andersson
commit d1bf2d30728f310f72296b54f0651ecdb09cbb12 upstream. Propagate the error of devfreq_add_device() in devm_devfreq_add_device() rather than statically returning ENOMEM. This makes it slightly faster to pinpoint the cause of a returned error. Fixes: 8cd84092d35e ("PM / devfreq: Add resource-managed function for devfreq device") Cc: stable@vger.kernel.org Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-25dev_freq: devfreq_spdm: add null terminator to prevent OOB accessDavid Dai
Add null terminator to end of buffered copied from user to prevent over reading. Change-Id: I80cfcb087ea2c335fd65d8fcdaf372c7d34a533d Signed-off-by: David Dai <daidavid1@codeaurora.org>
2017-05-26adreno_tz: Remove unnecessary devfreq NULL check in tz_handler()Hareesh Gundu
Caller of tz_handler() is having the NULL check for devfreq,So we don’t need unnecessary NULL pointer check. CRs-Fixed: 2046922 Change-Id: I42eb70ab19b4a5af193521d77bca86447a1ecdb8 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-05-12PM/devfreq: bw_hwmon: add mutex lock in polling interval caseSantosh Mardi
Protect polling interval update event in the governor with mutex lock. This will avoid parallel execution of update interval event on different cores, resulting in memory poison overwritten. CRs-Fixed: 2035633 Change-Id: Ib919d9774317bc01e3cf581c169c5d18555f484f Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2017-03-28devfreq_spdm: Handle spurious interrupts during bootupDilip Kota
Terminate the interrupts triggered before the intitalisation itself. Change-Id: I7c005134ecbdae38b58e4312f9e294f5b59c2510 Signed-off-by: Dilip Kota <dkota@codeaurora.org> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-03-22devfreq_spdm: Handle spurious interrupts during bootupDilip Kota
Terminate the interrupts triggered before the intitalisation itself. Change-Id: I7c005134ecbdae38b58e4312f9e294f5b59c2510 Signed-off-by: Dilip Kota <dkota@codeaurora.org> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-01-25adreno_tz: Correct tz_buf pointer type to correct pointer arithmeticDeepak Kumar
Current tz_buf pointer type is causing the end address calcultion of tz_buf to go wrong. "end_addr = tz_buf + PAGE_ALIGN(size)" is resulting in an end address way beyond the allocated range because tz_buf is of type unsigned int. This change changes the tz_buf pointer type to u8 to fix this issue. Change-Id: I16db09c565801b56c0c0ee8a8184f6e276512fa3 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2016-11-24adreno_tz: Fix divide by zero problem in gpu_load_show()Sudeep Yedalapure
If the acc_total value is zero then kernel would crash on div-by-zero. Add better input validation in gpu_load_show() to avoid divide by zero problem. CRs-Fixed: 1092584 Change-Id: I7affbd797bf4b0025f718c757043b36f392dae5b Signed-off-by: Sudeep Yedalapure <sudeepy@codeaurora.org>
2016-11-09PM / devfreq: Restart previous governor if new governor fails to startSaravana Kannan
If the new governor fails to start, switch back to old governor so that the devfreq state is not left in some weird limbo. Change-Id: I7cf1e6ceb63d27ce08b2d17b97a9844d257464ce Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-10-11PM / devfreq: memlat: add device attribute to show core to device bw mapDavid Keitel
This adds the freq_map device attribute to the mem_latency governor in order to display a given device's core frequency to device bandwidth. The output should be printed in the formatted in the same way as the example: Core freq (MHz) Device BW 300 1525 480 3143 900 4173 1017 7759 1296 9887 1555 11863 1804 13763 Change-Id: I6bef33a1239329f0687ee3983c2c02d84e984284 Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-10-11msm: kgsl: Remove use of uninitialized variableOleg Perelet
During certain code execution paths dev_ab can be assigned not initialized value. CRs-Fixed: 1074208 Change-Id: I330a50f6d171497e5b6d3e44e8ce2b09f2d644e3 Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-09-21PM / devfreq: bimc-bwmon: Fix rounding errorRohit Gupta
Fix rounding error that occurs when converting from byte to MB. Change-Id: Id507e0ae73c42ad5995af0153c3255ad69fde9df Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-09-14PM / devfreq: bimc-bwmon: Add support for version 4Rohit Gupta
The version 4 of the BIMC BWMON hardware now has provisions for counting bytes transferred at a high sampling rate. Modify the existing driver and governor algorithm to take advantage of that. Change-Id: I5080297aef7e310d5c1a19098c177ddecb729c25 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org> Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-09-01PM / devfreq: bw_hwmon: Add HW offload support to governorSaravana Kannan
Some HW monitors can do a better job of the sampling and the threshold checking than the SW implementation in the governor. Update the governor's API to add support for them. Change-Id: Id4b5593a5ed3290684ba43ebebe2466ba0b730b6 Signed-off-by: Saravana Kannan <skannan@codeaurora.org> Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-08-17PM / devfreq: memlat: Add a core to memory frequency mapping tableRohit Gupta
Add a core to memory frequency mapping table, which establishes a relationship between the core frequency and its corresponding bandwidth vote. The governor expects a "qcom,core-dev-table" table as part of a given memlat hardware monitor's device tree node. This table is read upon registration of the memlat governor. The table is then used to determine the memory bandwidth vote corresponding to the maximum of the core frequencies. CRs-Fixed: 1054146 Change-Id: I9df118da1433125b02c937bf1799a0944b110fac Signed-off-by: Rohit Gupta <rohgup@codeaurora.org> Signed-off-by: David Keitel <dkeitel@codeaurora.org> Suggested-by: Saravana Kannan <skannan@codeaurora.org>
2016-08-08PM / devfreq: memlat: Remove kfree() on probe failsRohit Gupta
Memory allocated with devm_kzalloc() is automatically freed if the probe function fails and returns an error code. So there is no need to free cpu_grp explicitly for the failure cases that might come up after it is allocated. Additionally calls to devm_kzalloc() must be accompanied by devm_kfree() if memory deallocation is necessary. For these reasons remove the kfree(cpu_grp) from the probe function. Change-Id: Ic4838fd58d40d283ac301facc64b06813eb3bd7d Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-06-29dev_freq: devfreq_spdm: make cci_clk optional indicatorDavid Dai
Enable dev_freq SPDM support in order to increase BIMC vote based on bus rejection rate. Make cci_clk an optional property as it's not always a relevant indicator of cpu performance. CRs-Fixed: 1025515 Change-Id: I713cc396c8d563735981547e0dc18a63f6f15180 Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-06-01PM / devfreq: memlat: Prevent deadlock with hotplug in start_hwmonRohit Gupta
When start_hwmon() runs with another thread trying to hotplug a CPU the two threads can enter a deadlock situation as follows: Thread A (start_hwmon()) Thread B (CPU down) get_online_cpus() | atomic_inc(&cpu_hotplug.refcount) CPU down | mutex_lock(&cpu_add_remove_lock) | cpu_hotplug_begin() waits on cpu_hotplug.refcount to reset register_cpu_notifier() | mutex_lock(&cpu_add_remove_lock) With this change the notifers are registered and unregistered per device rather than having a common notifier block for all the memlat devices and unregistration only happens on stop_hwmon. This makes it possible to move the registration outside the hotplug lock without any race between multiple memlat devices. Change-Id: I6ad561fe4967042e45190aea2c9b7fcfe05bafdd Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-05-20PM / devfreq: Change the 'MSM' in devfreq device names to 'QCOM'Rohit Gupta
Substitute 'MSM' in the devfreq device/config names to 'QCOM' to comply with the current standards. Change-Id: I156ba6e2b5f8e06a28540ca5def5b178c3604512 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-05-18msm: kgsl: Port GPU bus dcvs to kernel 4.4Oleg Perelet
Port GPU dcvs from kernel 3.18 to kernel 4.4. CRs-Fixed: 1013343 Change-Id: Ide662b12aa59effa541febcd758426e72b4a1b12 Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-04-07PM / devfreq: bw_hwmon: Fix race condition in polling interval updateSaravana Kannan
When the polling interval is updated, the delayed workqueue is cancelled and requeued with the new polling interval. However, the bw_hwmon IRQ can come at the same time and try to stop and restart the delayed work (in the IRQ thread). This can cause a race where the work might be queued twice or canceled twice and cause a crash. Fix this race condition by suspending and resuming the HW monitor when we are updating the polling interval. This entirely avoids the race because suspending the HW monitor also avoid the possibility of the IRQ coming during the polling interval update. CRs-Fixed: 954082 Change-Id: Ic7baf2a3da4ed8f8a9023617059e22fd81c3ba45 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-25adreno_tz: Use context aware dcvs calls, if availableDeepak Kumar
Add support to use context aware dcvs, if it is supported by TZ. Context aware dcvs helps in handling sudden workload scenarios. Change-Id: I5e6e6003a5c61eacb4f5af91910994919a5a7684 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org> Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
2016-03-23msm: kgsl: Add disable-busy-time-burst to disable ceiling thresholdDivya Ponnusamy
Add a devicetree property disable-busy-time-burst to disable ceiling threshold in the governor. The ceiling threshold cause busy time burst that switch power level for large frames based on busy time. Change-Id: I44f8a51e0aa49bb0b2210703f57874fd5f219c18 Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
2016-03-23drivers: iommu, leds, input, clk, devfreq: fix warningsRohit Vaswani
Fix some variable initializations which would otherwise cause forbidden warnings. Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org> Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-03-23PM / devfreq: Kconfig: Replace ARCH_MSM with ARCH_QCOMJunjie Wu
ARCH_MSM has been replaced by ARCH_QCOM. Fix Kconfig for various devfreq governors and devices. Change-Id: Ifa85494785cea7eb03be6c02d5664ee6bb2110c6 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23PM / devfreq: Fix the return value check in memlat governorRohit Gupta
The return value of kstrtouint is erroneously checked while setting the tunables for mem_latency governor due to which the tunables cannot be changed from their default values. This change rectifies that behavior. Change-Id: Ief7dda4638ede2c97b26229f1188a1559b238920 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23PM / devfreq: Fix perf event initialization to avoid memory leaksRohit Gupta
Currently stop_hwmon only releases the perf events for each CPU in the memlat device group. This leaves out the perf_event_attrs that are not needed anymore leading to memory leaks. This patch frees perf_event_attrs right after the perf events are created because they are copied into the perf_event structure when it is created for a particular event and hence do not need to exist beyond that point. Change-Id: If0871739ef477dfbcbbfc6ab2a631ce25deaf71c Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23PM / devfreq: Handle offline CPUs while creating eventsRohit Gupta
If any of the CPUs monitored by a memlat device is offline while trying to register for perf events, the registration fails returning an error code to the governor's start_monitor function which then fails the setting of governor and leaves the system in a bad state. To avoid this scenario, this patch allows for initialization errors while registering for perf events and remembers the failing offline CPUs. Perf event registration is tried for the failing CPUs when they come back online. Once all the CPUs have registered for perf events hotplug notifiers callbacks are unregistered. Change-Id: I36c33d9dc627f60ab9d7db41913661927938e850 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23devfreq: devfreq_simple_dev: call clk_round_rate in dev_targetHanumath Prasad
clk_set_rate is failing for some of the frequencies due to higher precision introduced in clock driver. Hence call the clk_round_rate again in dev_target to make sure we send the correct frequency to clk_set_rate. Change-Id: I3e40690bf794d99debbcecdcaf05aaac3363caa8 Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
2016-03-23PM / devfreq: governor_cpufreq: Fix incorrect refcounting of OF nodeSaravana Kannan
The of_node_put(of_child) call was put in to balance the of_node_get() that's done inside for_each_child_of_node(). But that's not the right thing to do because for_each_child_of_node() already takes care of doing of_node_put(). So, delete the unnecessary of_node_put(of_child) call. We still need the of_node_put(of_par) though. Change-Id: Iff7744839cfcf01d5a472449f74859e9030b7e16 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-23PM / devfreq: memlat: Get complete CPU list during the probeRohit Gupta
Currently arm-memlat-mon driver uses cpu_coregroup_mask to get the sibling CPUs for the first CPU specified during the probe. However if any of the CPUs in a cluster isn't hotplugged in even once before the probe runs then the call to cpu_coregroup_mask might not give the updated list of all the sibling CPUs for the specified CPU. With this change the initialization of the cpumask for the memlat device is obtained from the list of CPU phandles specified in the dtsi file. Change-Id: Ide97d60d9eecbbe1d33deda72a13951059822896 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org> [junjiew@codeaurora.org: dropped changes in dtsi files.] Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23PM / devfreq : Introduce a memory-latency governorRohit Gupta
Use performance counters to detect the memory latency sensitivity of CPU workloads and vote for higher DDR frequency if required. Change-Id: Ie77a3523bc5713fc0315bd0abc3913f485a96e0e Signed-off-by: Rohit Gupta <rohgup@codeaurora.org> Suggested-by: Saravana Kannan <skannan@codeaurora.org> [junjiew@codeaurora.org: dropped changes in arch/arm64/Kconfig] Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23PM / devfreq: bw_hwmon: Expose a throttle adjust tunableRohit Gupta
Newer versions of bimc-bwmon counters have the capability to fake higher byte count than what's actually transferred between a bus master and DDR if the bus master is being throttled by QoS hardware logic. Add support to set the throttle adjust field that comes with this newer version of bimc-bwmon. Change-Id: I33376c825fb11ab2e378f828b1d2ae46dd582836 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org> [junjiew@codeaurora.org: dropped changes in dtsi.] Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23PM / devfreq: bw_hwmon: Fix handling of max_mbpsSaravana Kannan
When doing over-voting due to an UP_WAKE event, the governor pre-initialized the max_mbps value for the next decision window. This was done to prevent a dropping the vote below the original measurement in case a DOWN_WAKE event comes before the decision window is complete. This has the undesirable side-effect of keeping the votes high for two decision windows following an UP_WAKE event. Also, DOWN_WAKE event is currently disabled for any decision windows that didn't do over-voting because doing so had significant performance impacts. However, with historic max tracking, pattern detection and hysteresis, and mbps zones awareness that were added later on, the above concerns aren't really valid anymore. So, simply delete the pre-initialization of the max_mbps so that one decision window isn't unnecessarily voting higher than necessary. As part of the change, also fix down_cnt logic to allow it to work for all decision windows if enabled. Change-Id: I600e3783da617ed4efef5b05156016d88c301cea Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-23PM / devfreq: bw_hwmon: Allow up_scale to be set to zeroRohit Gupta
Currently the lower limit for setting up_scale is 100. Change it to 0 so that over-voting for spikes in measured bandwidth can be disabled by setting up_scale to 0. Change-Id: I1e5e3d51c625163b38074fb1eda26763455ea6c5 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23PM / devfreq: bw_hwmon: Remove debug logs from high frequency code pathSaravana Kannan
Using debug logs for the short samples would result in excessive logging and also have an impact on CPU power and performance. The tracepoint that's already there is a much better alternative. So, delete the debug logs. Change-Id: Idd1d634f510381d14637f3b84588a118572f3f16 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-23PM / devfreq: bimc-bwmon: Fix IRQ registration in resume pathSaravana Kannan
The IRQ registration on the resume path was not updated properly when the high sampling rate algorithm was implemented. Update it so that the IRQ registration is done correctly. Change-Id: I17a016dd9c0b50c7b415beda21368cb4586d203c Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-23PM / devfreq: governor_cache_hwmon: Add mrps and freq vote tracesJunjie Wu
Replace measured mrps and frequency vote debug prints with trace events. Change-Id: I78370b068e3819a57635cbabaf5cdd053ebabce4 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23PM / devfreq: bimc-bwmon: Update irq handling in suspend/resumeHanumath Prasad
Change the sequence of registering and freeing the interrupt handler in suspend/resume. Freeirq needs a guarantee that the IRQ can't come anymore before we call it. So, we disable the IRQ before calling freeirq.And register the handler before enabling the irq to avoid the interrupt getting unhandled. Change-Id: I3945202d049e16f64a16e456f914f7602b763c89 Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
2016-03-23PM / devfreq: bw_hwmon: Take at least one sample per decision windowSaravana Kannan
Due to the way the short samples are triggered, when the traffic is very low, we could have a decision window where no sample is taken. Fix this by forcing a sample at the end of every decision window as long as that is the first sample for that decision window or the sample window won't be smaller than the sample_ms tunable. Change-Id: Ia33b59fbff9ff4058c06e24208d1e037d6e9eda9 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>