Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Sascha Hauer and committed by
Chanwoo Choi
41982740 559dc287

+2 -2
+2 -2
drivers/devfreq/event/rockchip-dfi.c
··· 97 97 /* Find out which channel is busier */ 98 98 for (i = 0; i < RK3399_DMC_NUM_CH; i++) { 99 99 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); 101 101 dfi->ch_usage[i].total = readl_relaxed(dfi_regs + 102 102 DDRMON_CH0_COUNT_NUM + i * 20); 103 103 tmp = dfi->ch_usage[i].access; ··· 149 149 150 150 busier_ch = rockchip_dfi_get_busier_ch(edev); 151 151 152 - edata->load_count = dfi->ch_usage[busier_ch].access; 152 + edata->load_count = dfi->ch_usage[busier_ch].access * 4; 153 153 edata->total_count = dfi->ch_usage[busier_ch].total; 154 154 155 155 return 0;