mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
video: rockchip: rga3: fixup scheduler load
Signed-off-by: Li Huang <putin.li@rock-chips.com> Change-Id: I60a2357d1fd517092d1721cfcd16cd1a2e2dba04
This commit is contained in:
@@ -66,8 +66,11 @@
|
||||
|
||||
#define RGA_CORE_REG_OFFSET 0x10000
|
||||
|
||||
/* sample interval: 1000ms */
|
||||
#define RGA_LOAD_INTERVAL 1000000000
|
||||
/* load interval: 1000ms */
|
||||
#define RGA_LOAD_INTERVAL_US 1000000
|
||||
|
||||
/* timer interval: 1000ms */
|
||||
#define RGA_TIMER_INTERVAL_NS 1000000000
|
||||
|
||||
#if ((defined(CONFIG_RK_IOMMU) || defined(CONFIG_ROCKCHIP_IOMMU)) \
|
||||
&& defined(CONFIG_ION_ROCKCHIP))
|
||||
|
||||
@@ -178,8 +178,11 @@ static int rga_load_show(struct seq_file *m, void *data)
|
||||
|
||||
spin_unlock_irqrestore(&rga_scheduler->irq_lock, flags);
|
||||
|
||||
load = (busy_time_total * 100000 / RGA_LOAD_INTERVAL);
|
||||
seq_printf(m, "\t load = %d\n", load);
|
||||
load = (busy_time_total * 100 / RGA_LOAD_INTERVAL_US);
|
||||
if (load > 100)
|
||||
load = 100;
|
||||
|
||||
seq_printf(m, "\t load = %d%%\n", load);
|
||||
seq_printf(m, "-----------------------------------\n");
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -297,10 +297,12 @@ static enum hrtimer_restart hrtimer_handler(struct hrtimer *timer)
|
||||
|
||||
static void rga_init_timer(void)
|
||||
{
|
||||
kt = ktime_set(0, RGA_LOAD_INTERVAL);
|
||||
kt = ktime_set(0, RGA_TIMER_INTERVAL_NS);
|
||||
hrtimer_init(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
|
||||
|
||||
timer.function = hrtimer_handler;
|
||||
|
||||
hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static void rga_cancel_timer(void)
|
||||
|
||||
Reference in New Issue
Block a user