diff options
| author | Sascha Hauer <[email protected]> | 2023-07-04 11:32:21 +0200 |
|---|---|---|
| committer | Chanwoo Choi <[email protected]> | 2023-10-09 07:28:50 +0900 |
| commit | 419827409834f4e6602456ae23d4557d541adcbf (patch) | |
| tree | f5fb9d61b12623fd5c391283ce2dab943afa5f14 /drivers/devfreq | |
| parent | 559dc2876c0c46850dfed5c2a810d17b259e4bd9 (diff) | |
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/[email protected]/
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Diffstat (limited to 'drivers/devfreq')
| -rw-r--r-- | drivers/devfreq/event/rockchip-dfi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 6b1ef29df704..680f629da64f 100644 --- a/drivers/devfreq/event/rockchip-dfi.c +++ b/drivers/devfreq/event/rockchip-dfi.c @@ -97,7 +97,7 @@ static int rockchip_dfi_get_busier_ch(struct devfreq_event_dev *edev) /* Find out which channel is busier */ for (i = 0; i < RK3399_DMC_NUM_CH; i++) { dfi->ch_usage[i].access = readl_relaxed(dfi_regs + - DDRMON_CH0_DFI_ACCESS_NUM + i * 20) * 4; + DDRMON_CH0_DFI_ACCESS_NUM + i * 20); dfi->ch_usage[i].total = readl_relaxed(dfi_regs + DDRMON_CH0_COUNT_NUM + i * 20); tmp = dfi->ch_usage[i].access; @@ -149,7 +149,7 @@ static int rockchip_dfi_get_event(struct devfreq_event_dev *edev, busier_ch = rockchip_dfi_get_busier_ch(edev); - edata->load_count = dfi->ch_usage[busier_ch].access; + edata->load_count = dfi->ch_usage[busier_ch].access * 4; edata->total_count = dfi->ch_usage[busier_ch].total; return 0; |