Skip to content

Commit 4198274

Browse files
saschahauerchanwoochoi
authored andcommitted
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]>
1 parent 559dc28 commit 4198274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/devfreq/event/rockchip-dfi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int rockchip_dfi_get_busier_ch(struct devfreq_event_dev *edev)
9797
/* Find out which channel is busier */
9898
for (i = 0; i < RK3399_DMC_NUM_CH; i++) {
9999
dfi->ch_usage[i].access = readl_relaxed(dfi_regs +
100-
DDRMON_CH0_DFI_ACCESS_NUM + i * 20) * 4;
100+
DDRMON_CH0_DFI_ACCESS_NUM + i * 20);
101101
dfi->ch_usage[i].total = readl_relaxed(dfi_regs +
102102
DDRMON_CH0_COUNT_NUM + i * 20);
103103
tmp = dfi->ch_usage[i].access;
@@ -149,7 +149,7 @@ static int rockchip_dfi_get_event(struct devfreq_event_dev *edev,
149149

150150
busier_ch = rockchip_dfi_get_busier_ch(edev);
151151

152-
edata->load_count = dfi->ch_usage[busier_ch].access;
152+
edata->load_count = dfi->ch_usage[busier_ch].access * 4;
153153
edata->total_count = dfi->ch_usage[busier_ch].total;
154154

155155
return 0;

0 commit comments

Comments
 (0)