video: rockchip: rga2: add hardware time-consuming printing

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I780056e58892cf9c265026119ebbe0c6eb3dc75d
This commit is contained in:
Yu Qiaowei
2023-10-10 16:41:35 +08:00
committed by Tao Huang
parent 180ac760c9
commit 4bbe1970ad
+13 -4
View File
@@ -76,7 +76,6 @@
#define RGA2_PHY_PAGE_SIZE (((8192 * 8192 * 4) / 4096) + 1)
ktime_t rga2_start;
ktime_t rga2_end;
int rga2_flag;
int first_RGA2_proc;
static int rk3368;
@@ -1179,9 +1178,11 @@ retry:
#ifdef CONFIG_ROCKCHIP_RGA2_DEBUGGER
if (RGA2_TEST_TIME) {
rga2_end = ktime_get();
rga2_end = ktime_sub(rga2_end, rga2_start);
DBG("sync one cmd end time %d\n", (int)ktime_to_us(rga2_end));
ktime_t rga2_cmd_end;
rga2_cmd_end = ktime_get();
rga2_cmd_end = ktime_sub(rga2_cmd_end, rga2_start);
DBG("sync one cmd end time %d us\n", (int)ktime_to_us(rga2_cmd_end));
}
#endif
if (ret == -ETIMEDOUT && try--) {
@@ -1657,6 +1658,14 @@ static irqreturn_t rga2_irq_thread(int irq, void *dev_id)
if (RGA2_INT_FLAG)
INFO("irqthread INT[%x],STATS[%x]\n", rga2_read(RGA2_INT),
rga2_read(RGA2_STATUS));
if (RGA2_TEST_TIME) {
ktime_t rga2_hw_end;
rga2_hw_end = ktime_get();
rga2_hw_end = ktime_sub(rga2_hw_end, rga2_start);
DBG("RGA hardware cost time %d us\n", (int)ktime_to_us(rga2_hw_end));
}
#endif
RGA2_flush_page();
mutex_lock(&rga2_service.lock);