Possible divide by zero can occur in wait_active_percent
calculation as reported by UBSAN. Fix this possible
division by zero.
Change-Id: I9068fbcc9347eade8a51c7fc3526491511188f03
Signed-off-by: Pranav Patel <quic_pranavp@quicinc.com>
Add support to configure bus dcvs sampling interval through the
sysfs entry. Also expose cur_ab vote value to sysfs.
$ echo 25000 > /sys/class/devfreq/soc:qcom,kgsl-busmon/sampling_interval
$ cat /sys/class/devfreq/soc:qcom,kgsl-busmon/cur_ab .
Change-Id: I77df55de2766d3fd818c27f717cfc4ae598bb0bd
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
These governors should fail if being set for any device
other than the gpu device. Do this by checking that the
devfreq device for which this governor is being set for
has the gpu device as it's parent device.
The vbif_bw governor immutable attribute is used
to restrict it being set for only gpu devfreq devices.
Because we don't intend to change the governor for
the devfreq devices which have this governor set as
default.
Change-Id: I391557c0d52a1f4ffba70e010401a0769587dea0
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
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>
If the tuning parameter is present in the devicetree, do not use a
floating water-mark approach for bus dcvs. This fixes an issue where
we upvote due to stalled cycles but never down vote even when stalled
cycles have receded below the threshold.
Change-Id: Ia799b33a31de1c5e4ff4ad5b3f30d4585ec85e3c
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This is the recommended way of using the devfreq api from
within governors. The devfreq_update_stats() will utilize the
devfreq.last_status to get the target device status so we no
longer need to declare a local variable to get the target
status.
Change-Id: I5d80e39468e3eb90e55dcb0a813cb846a65ee8a5
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Update GPU Bus DCVS to weight high stall cycles (as a percentage
of total bus usage) heavier in order to vote up the bus when the
GPU is stalling a lot waiting for data.
Change-Id: I8a331a48a1ab737c51f1001ea1991f09af9ef900
Signed-off-by: Kyle Piefer <kpiefer@codeaurora.org>
Remove using the waiting bandwidth cycles for deciding
when to change bandwidth levels.
Change-Id: I65341c5c115684f19b5a3b2522d362e80315f2c9
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Kyle Piefer <kpiefer@codeaurora.org>
Adding a snapshot of the devfreq files on 4.14 as of
commit 9ac69cf (clk: qcom: gcc: Support code for clock
controller for sdxprairie).
Change-Id: Ib9491280c14f0ec0ff1c3b34aba5ce1e4f510b54
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>