Mukesh Ojha
aed5ed5959
PM / devfreq: Synchronize devfreq_monitor_[start/stop]
...
There is a chance if a frequent switch of the governor
done in a loop result in timer list corruption where
timer cancel being done from two place one from
cancel_delayed_work_sync() and followed by expire_timers()
can be seen from the traces[1].
while true
do
echo "simple_ondemand" > /sys/class/devfreq/1d84000.ufshc/governor
echo "performance" > /sys/class/devfreq/1d84000.ufshc/governor
done
It looks to be issue with devfreq driver where
device_monitor_[start/stop] need to synchronized so that
delayed work should get corrupted while it is either
being queued or running or being cancelled.
Let's use polling flag and devfreq lock to synchronize the
queueing the timer instance twice and work data being
corrupted.
[1]
...
..
<idle>-0 [003] 9436.209662: timer_cancel timer=0xffffff80444f0428
<idle>-0 [003] 9436.209664: timer_expire_entry timer=0xffffff80444f0428 now=0x10022da1c function=__typeid__ZTSFvP10timer_listE_global_addr baseclk=0x10022da1c
<idle>-0 [003] 9436.209718: timer_expire_exit timer=0xffffff80444f0428
kworker/u16:6-14217 [003] 9436.209863: timer_start timer=0xffffff80444f0428 function=__typeid__ZTSFvP10timer_listE_global_addr expires=0x10022da2b now=0x10022da1c flags=182452227
vendor.xxxyyy.ha-1593 [004] 9436.209888: timer_cancel timer=0xffffff80444f0428
vendor.xxxyyy.ha-1593 [004] 9436.216390: timer_init timer=0xffffff80444f0428
vendor.xxxyyy.ha-1593 [004] 9436.216392: timer_start timer=0xffffff80444f0428 function=__typeid__ZTSFvP10timer_listE_global_addr expires=0x10022da2c now=0x10022da1d flags=186646532
vendor.xxxyyy.ha-1593 [005] 9436.220992: timer_cancel timer=0xffffff80444f0428
xxxyyyTraceManag-7795 [004] 9436.261641: timer_cancel timer=0xffffff80444f0428
[2]
9436.261653][ C4] Unable to handle kernel paging request at virtual address dead00000000012a
[ 9436.261664][ C4] Mem abort info:
[ 9436.261666][ C4] ESR = 0x96000044
[ 9436.261669][ C4] EC = 0x25: DABT (current EL), IL = 32 bits
[ 9436.261671][ C4] SET = 0, FnV = 0
[ 9436.261673][ C4] EA = 0, S1PTW = 0
[ 9436.261675][ C4] Data abort info:
[ 9436.261677][ C4] ISV = 0, ISS = 0x00000044
[ 9436.261680][ C4] CM = 0, WnR = 1
[ 9436.261682][ C4] [dead00000000012a] address between user and kernel address ranges
[ 9436.261685][ C4] Internal error: Oops: 96000044 [#1 ] PREEMPT SMP
[ 9436.261701][ C4] Skip md ftrace buffer dump for: 0x3a982d0
...
[ 9436.262138][ C4] CPU: 4 PID: 7795 Comm: TraceManag Tainted: G S W O 5.10.149-android12-9-o-g17f915d29d0c #1
[ 9436.262141][ C4] Hardware name: Qualcomm Technologies, Inc. (DT)
[ 9436.262144][ C4] pstate: 22400085 (nzCv daIf +PAN -UAO +TCO BTYPE=--)
[ 9436.262161][ C4] pc : expire_timers+0x9c/0x438
[ 9436.262164][ C4] lr : expire_timers+0x2a4/0x438
[ 9436.262168][ C4] sp : ffffffc010023dd0
[ 9436.262171][ C4] x29: ffffffc010023df0 x28: ffffffd0636fdc18
[ 9436.262178][ C4] x27: ffffffd063569dd0 x26: ffffffd063536008
[ 9436.262182][ C4] x25: 0000000000000001 x24: ffffff88f7c69280
[ 9436.262185][ C4] x23: 00000000000000e0 x22: dead000000000122
[ 9436.262188][ C4] x21: 000000010022da29 x20: ffffff8af72b4e80
[ 9436.262191][ C4] x19: ffffffc010023e50 x18: ffffffc010025038
[ 9436.262195][ C4] x17: 0000000000000240 x16: 0000000000000201
[ 9436.262199][ C4] x15: ffffffffffffffff x14: ffffff889f3c3100
[ 9436.262203][ C4] x13: ffffff889f3c3100 x12: 00000000049f56b8
[ 9436.262207][ C4] x11: 00000000049f56b8 x10: 00000000ffffffff
[ 9436.262212][ C4] x9 : ffffffc010023e50 x8 : dead000000000122
[ 9436.262216][ C4] x7 : ffffffffffffffff x6 : ffffffc0100239d8
[ 9436.262220][ C4] x5 : 0000000000000000 x4 : 0000000000000101
[ 9436.262223][ C4] x3 : 0000000000000080 x2 : ffffff889edc155c
[ 9436.262227][ C4] x1 : ffffff8001005200 x0 : ffffff80444f0428
[ 9436.262232][ C4] Call trace:
[ 9436.262236][ C4] expire_timers+0x9c/0x438
[ 9436.262240][ C4] __run_timers+0x1f0/0x330
[ 9436.262245][ C4] run_timer_softirq+0x28/0x58
[ 9436.262255][ C4] efi_header_end+0x168/0x5ec
[ 9436.262265][ C4] __irq_exit_rcu+0x108/0x124
[ 9436.262274][ C4] __handle_domain_irq+0x118/0x1e4
[ 9436.262282][ C4] gic_handle_irq.30369+0x6c/0x2bc
[ 9436.262286][ C4] el0_irq_naked+0x60/0x6c
Link: https://lore.kernel.org/all/1700860318-4025-1-git-send-email-quic_mojha@quicinc.com/
Reported-by: Joyyoung Huang <huangzaiyang@oppo.com >
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com >
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-12-19 07:58:27 +09:00
Christian Marangi
4920ee6dcf
PM / devfreq: Convert to use sysfs_emit_at() API
...
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Link: https://lore.kernel.org/all/20231024183016.14648-3-ansuelsmth@gmail.com/
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-11-13 10:48:49 +09:00
Christian Marangi
08e23d05fa
PM / devfreq: Fix buffer overflow in trans_stat_show
...
Fix buffer overflow in trans_stat_show().
Convert simple snprintf to the more secure scnprintf with size of
PAGE_SIZE.
Add condition checking if we are exceeding PAGE_SIZE and exit early from
loop. Also add at the end a warning that we exceeded PAGE_SIZE and that
stats is disabled.
Return -EFBIG in the case where we don't have enough space to write the
full transition table.
Also document in the ABI that this function can return -EFBIG error.
Link: https://lore.kernel.org/all/20231024183016.14648-2-ansuelsmth@gmail.com/
Cc: stable@vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218041
Fixes: e552bbaf5b ("PM / devfreq: Add sysfs node for representing frequency transition information.")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-11-13 10:48:49 +09:00
Sascha Hauer
481d97ba61
PM / devfreq: rockchip-dfi: add support for RK3588
...
Add support for the RK3588 to the driver. The RK3588 has four DDR
channels with a register stride of 0x4000 between the channel
registers, also it has a DDRMON_CTRL register per channel.
Link: https://lore.kernel.org/all/20231018061714.3553817-20-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 21:21:16 +09:00
Sascha Hauer
bbe7cbd074
PM / devfreq: rockchip-dfi: account for multiple DDRMON_CTRL registers
...
The currently supported RK3399 has a set of registers per channel, but
it has only a single DDRMON_CTRL register. With upcoming RK3588 this
will be different, the RK3588 has a DDRMON_CTRL register per channel.
Instead of expecting a single DDRMON_CTRL register, loop over the
channels and write the channel specific DDRMON_CTRL register. Break
out early out of the loop when there is only a single DDRMON_CTRL
register like on the RK3399.
Link: https://lore.kernel.org/all/20231018061714.3553817-19-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 21:17:42 +09:00
Sascha Hauer
d1d0b3fe95
PM / devfreq: rockchip-dfi: make register stride SoC specific
...
The currently supported RK3399 has a stride of 20 between the channel
specific registers. Upcoming RK3588 has a different stride, so put
the stride into driver data to make it configurable.
While at it convert decimal 20 to hex 0x14 for consistency with RK3588
which has a register stride 0x4000 and we want to write that in hex
as well.
Link: https://lore.kernel.org/all/20231018061714.3553817-18-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 21:17:10 +09:00
Sascha Hauer
4d586b5724
PM / devfreq: rockchip-dfi: Add perf support
...
The DFI is a unit which is suitable for measuring DDR utilization, but
so far it could only be used as an event driver for the DDR frequency
scaling driver. This adds perf support to the DFI driver.
Usage with the 'perf' tool can look like:
perf stat -a -e rockchip_ddr/cycles/,\
rockchip_ddr/read-bytes/,\
rockchip_ddr/write-bytes/,\
rockchip_ddr/bytes/ sleep 1
Performance counter stats for 'system wide':
1582524826 rockchip_ddr/cycles/
1802.25 MB rockchip_ddr/read-bytes/
1793.72 MB rockchip_ddr/write-bytes/
3595.90 MB rockchip_ddr/bytes/
1.014369709 seconds time elapsed
perf support has been tested on a RK3568 and a RK3399, the latter with
dual channel DDR.
Link: https://lore.kernel.org/all/20231019064819.3496740-1-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
[cw00.choi: Fix typo from 'write_acccess' to 'write_access']
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 21:13:28 +09:00
Sascha Hauer
2785cc00f6
PM / devfreq: rockchip-dfi: give variable a better name
...
struct dmc_count_channel::total counts the clock cycles of the DDR
controller. Rename it accordingly to give the reader a better idea
what this is about. While at it, at some documentation to struct
dmc_count_channel.
Link: https://lore.kernel.org/all/20231018061714.3553817-16-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:58:34 +09:00
Sascha Hauer
d724f4a458
PM / devfreq: rockchip-dfi: Prepare for multiple users
...
When adding perf support later the DFI must be enabled when
either of devfreq-event or perf is active. Prepare for that
by adding a usage counter for the DFI. Also move enabling
and disabling of the clock away from the devfreq-event specific
functions to which the perf specific part won't have access.
Link: https://lore.kernel.org/all/20231018061714.3553817-15-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:50:10 +09:00
Sascha Hauer
b82932fbd8
PM / devfreq: rockchip-dfi: Pass private data struct to internal functions
...
The internal functions do not need the struct devfreq_event_dev *,
so pass them the struct rockchip_dfi *. This is a preparation for
adding perf support later which doesn't have a struct devfreq_event_dev *.
Link: https://lore.kernel.org/all/20231018061714.3553817-14-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:49:19 +09:00
Sascha Hauer
d8c6e337e7
PM / devfreq: rockchip-dfi: Handle LPDDR4X
...
In the DFI driver LPDDR4X can be handled in the same way as LPDDR4. Add
the missing case.
Link: https://lore.kernel.org/all/20231018061714.3553817-13-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:48:28 +09:00
Sascha Hauer
038ff6f53d
PM / devfreq: rockchip-dfi: Handle LPDDR2 correctly
...
According to the downstream driver the DDRMON_CTRL_LPDDR23 bit must be
set for both LPDDR2 and LPDDR3. Add the missing LPDDR2 case and while
at it turn the if/else if/else into switch/case which makes it easier
to read.
Link: https://lore.kernel.org/all/20231018061714.3553817-12-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:46:17 +09:00
Sascha Hauer
076b0597f5
PM / devfreq: rockchip-dfi: Add RK3568 support
...
This adds RK3568 support to the DFI driver. Only iniitialization
differs from the currently supported RK3399.
Link: https://lore.kernel.org/all/20231018061714.3553817-11-s.hauer@pengutronix.de/
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:45:39 +09:00
Sascha Hauer
d3b0f6ab0e
PM / devfreq: rockchip-dfi: Clean up DDR type register defines
...
Use the HIWORD_UPDATE() define known from other rockchip drivers to
make the defines look less odd to the readers who've seen other
rockchip drivers.
The HIWORD registers have their functional bits in the lower 16 bits
whereas the upper 16 bits contain a mask. Only the functional bits that
have the corresponding mask bit set are modified during a write. Although
the register writes look different, the end result should be the same,
at least there's no functional change intended with this patch.
Link: https://lore.kernel.org/all/20231018061714.3553817-10-s.hauer@pengutronix.de/
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:41:35 +09:00
Sascha Hauer
74002e668d
PM / devfreq: rk3399_dmc,dfi: generalize DDRTYPE defines
...
The DDRTYPE defines are named to be RK3399 specific, but they can be
used for other Rockchip SoCs as well, so replace the RK3399_PMUGRF_
prefix with ROCKCHIP_. They are defined in a SoC specific header
file, so when generalizing the prefix also move the new defines to
a SoC agnostic header file. While at it use GENMASK to define the
DDRTYPE bitfield and give it a name including the full register name.
Link: https://lore.kernel.org/all/20231018061714.3553817-9-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-19 20:39:08 +09:00
Sascha Hauer
63dcf38eb5
PM / devfreq: rockchip-dfi: introduce channel mask
...
Different Rockchip SoC variants have a different number of channels.
Introduce a channel mask to make the number of channels configurable
from SoC initialization code.
Link: https://lore.kernel.org/all/20231018061714.3553817-8-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-18 18:37:18 +09:00
Sascha Hauer
9991166494
PM / devfreq: rockchip-dfi: Use free running counter
...
The DDR_MON counters are free running counters. These are resetted to 0
when starting them over like currently done when reading the current
counter values.
Resetting the counters becomes a problem with perf support we want to
add later, because perf needs counters that are not modified elsewhere.
This patch removes resetting the counters and keeps them running
instead. That means we no longer use the absolute counter values but
instead compare them with the counter values we read last time. Not
stopping the counters also has the impact that they are running while
we are reading them. We cannot read multiple timers atomically, so
the values do not exactly fit together. The effect should be negligible
though as the time between two measurements is some orders of magnitude
bigger than the time we need to read multiple registers.
Link: https://lore.kernel.org/all/20231018061714.3553817-7-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-18 18:34:09 +09:00
Dan Carpenter
6c29e29e4d
PM / devfreq: mediatek: unlock on error in mtk_ccifreq_target()
...
Call mutex_unlock(&drv->reg_lock) before returning the error code.
Link: https://lore.kernel.org/all/1bada9b2-d276-4123-bfdf-03d165569543@moroto.mountain/
Fixes: d280560198 ("PM / devfreq: mediatek: protect oop in critical session")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-17 17:54:01 +09:00
Rob Herring
e50fa1a5ac
PM / devfreq: exynos-ppmu: Use device_get_match_data()
...
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.
Link: https://lore.kernel.org/all/20231006213854.333261-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:29:11 +09:00
Sascha Hauer
4198274098
PM / devfreq: rockchip-dfi: dfi store raw values in counter struct
...
When adding perf support to the DFI driver the perf part will
need the raw counter values, so move the fixed * 4 factor to
rockchip_dfi_get_event().
Link: https://lore.kernel.org/lkml/20230704093242.583575-6-s.hauer@pengutronix.de/
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00
Sascha Hauer
559dc2876c
PM / devfreq: rockchip-dfi: Add SoC specific init function
...
Move the RK3399 specifics to a SoC specific init function to make
the way free for supporting other SoCs later.
Link: https://lore.kernel.org/lkml/20230704093242.583575-5-s.hauer@pengutronix.de/
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00
Sascha Hauer
9325b3ec92
PM / devfreq: rockchip-dfi: use consistent name for private data struct
...
The variable name for the private data struct is 'info' in some
functions and 'data' in others. Both names do not give a clue what
type the variable has, so consistently use 'dfi'.
Link: https://lore.kernel.org/lkml/20230704093242.583575-4-s.hauer@pengutronix.de/
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00
Sascha Hauer
bbf4790054
PM / devfreq: rockchip-dfi: Embed desc into private data struct
...
No need for an extra allocation, just embed the struct
devfreq_event_desc into the private data struct.
Link: https://lore.kernel.org/lkml/20230704093242.583575-3-s.hauer@pengutronix.de/
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00
Sascha Hauer
1e0731c05c
PM / devfreq: rockchip-dfi: Make pmu regmap mandatory
...
As a matter of fact the regmap_pmu already is mandatory because
it is used unconditionally in the driver. Bail out gracefully in
probe() rather than crashing later.
Link: https://lore.kernel.org/lkml/20230704093242.583575-2-s.hauer@pengutronix.de/
Fixes: b9d1262bca ("PM / devfreq: event: support rockchip dfi controller")
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00
Manivannan Sadhasivam
8b3bd6ffbc
PM / devfreq: Switch to dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs
...
Some devfreq consumers like UFS driver need to work with multiple clocks
through the OPP framework. For this reason, OPP framework exposes the
_indexed() APIs for finding the floor/ceil of the supplied frequency of
the indexed clock. So let's use them in the devfreq driver.
Currently, the clock index of 0 is used which works fine for multiple as
well as single clock.
Link: https://lore.kernel.org/all/20231003111232.42663-3-manivannan.sadhasivam@linaro.org/
Acked-by: Chanwoo Choi <cw00.choi@samsung.com >
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org >
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com >
2023-10-09 07:28:50 +09:00