diff mbox series

PM / devfreq: Add timer type to devfreq_summary debugfs

Message ID 20200908110853.19277-1-cw00.choi@samsung.com
State New
Headers show
Series PM / devfreq: Add timer type to devfreq_summary debugfs | expand

Commit Message

Chanwoo Choi Sept. 8, 2020, 11:08 a.m. UTC
The commit 4dc3bab8687f ("PM / devfreq: Add support delayed timer for
polling mode") supports the delayed timer but this commit missed
the adding the timer type to devfreq_summary debugfs node.
Add the timer type to devfreq_summary debugfs.

Fixes: 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Example after adding 'timer' information to debugfs_summary debugfs node
on Odroid-XU3 board as following:
root@localhost:~# cat /sys/kernel/debug/devfreq/devfreq_summary
dev                            parent_dev                     governor        timer      polling_ms  cur_freq_Hz  min_freq_Hz  max_freq_Hz
------------------------------ ------------------------------ --------------- ---------- ---------- ------------ ------------ ------------
10c20000.memory-controller     null                           simple_ondemand delayed           100    825000000    165000000    825000000
11800000.gpu                   null                           simple_ondemand deferrable         50    420000000    177000000    600000000
soc:bus_wcore                  null                           simple_ondemand deferrable         50    532000000     88700000    532000000
soc:bus_noc                    soc:bus_wcore                  passive         null                0    111000000     66600000    111000000
soc:bus_fsys_apb               soc:bus_wcore                  passive         null                0    222000000    111000000    222000000
soc:bus_fsys2                  soc:bus_wcore                  passive         null                0    200000000     75000000    200000000
soc:bus_mfc                    soc:bus_wcore                  passive         null                0    333000000     83250000    333000000
soc:bus_gen                    soc:bus_wcore                  passive         null                0    266000000     88700000    266000000
soc:bus_peri                   soc:bus_wcore                  passive         null                0     66600000     66600000     66600000
soc:bus_g2d                    soc:bus_wcore                  passive         null                0    333000000     83250000    333000000
soc:bus_g2d_acp                soc:bus_wcore                  passive         null                0    266000000     66500000    266000000
soc:bus_jpeg                   soc:bus_wcore                  passive         null                0    300000000     75000000    300000000
soc:bus_jpeg_apb               soc:bus_wcore                  passive         null                0    166500000     83250000    166500000
soc:bus_disp1_fimd             soc:bus_wcore                  passive         null                0    200000000    120000000    200000000
soc:bus_disp1                  soc:bus_wcore                  passive         null                0    300000000    120000000    300000000
soc:bus_gscl_scaler            soc:bus_wcore                  passive         null                0    300000000    150000000    300000000
soc:bus_mscl                   soc:bus_wcore                  passive         null                0    666000000     84000000    666000000
diff mbox series

Patch

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index b9b27fb3291e..d4424b5d8306 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -1790,20 +1790,23 @@  static int devfreq_summary_show(struct seq_file *s, void *data)
 	struct devfreq *p_devfreq = NULL;
 	unsigned long cur_freq, min_freq, max_freq;
 	unsigned int polling_ms;
+	unsigned int timer;
 
-	seq_printf(s, "%-30s %-30s %-15s %10s %12s %12s %12s\n",
+	seq_printf(s, "%-30s %-30s %-15s %-10s %10s %12s %12s %12s\n",
 			"dev",
 			"parent_dev",
 			"governor",
+			"timer",
 			"polling_ms",
 			"cur_freq_Hz",
 			"min_freq_Hz",
 			"max_freq_Hz");
-	seq_printf(s, "%30s %30s %15s %10s %12s %12s %12s\n",
+	seq_printf(s, "%30s %30s %15s %10s %10s %12s %12s %12s\n",
 			"------------------------------",
 			"------------------------------",
 			"---------------",
 			"----------",
+			"----------",
 			"------------",
 			"------------",
 			"------------");
@@ -1827,13 +1830,15 @@  static int devfreq_summary_show(struct seq_file *s, void *data)
 		cur_freq = devfreq->previous_freq;
 		get_freq_range(devfreq, &min_freq, &max_freq);
 		polling_ms = devfreq->profile->polling_ms;
+		timer = devfreq->profile->timer;
 		mutex_unlock(&devfreq->lock);
 
 		seq_printf(s,
-			"%-30s %-30s %-15s %10d %12ld %12ld %12ld\n",
+			"%-30s %-30s %-15s %-10s %10d %12ld %12ld %12ld\n",
 			dev_name(&devfreq->dev),
 			p_devfreq ? dev_name(&p_devfreq->dev) : "null",
 			devfreq->governor_name,
+			polling_ms ? timer_name[timer] : "null",
 			polling_ms,
 			cur_freq,
 			min_freq,