mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
video: rockchip: mpp: rkvdec2: Add task timing
NOTE: On link mode the timing is start from driver push task to hardware linked queue. So the timing is not actual the hardware timing on multi decoder case. echo 0x100 > /sys/module/rk_vcodec/parameters/mpp_dev_debug This command for hardware performance test is still valid. But the hardware timing output is accurate only on single decoder case. Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I4db4a35955cb1e42e3f250583e83d88c2fde5872
This commit is contained in:
@@ -304,6 +304,7 @@ static int rkvdec2_run(struct mpp_dev *mpp, struct mpp_task *mpp_task)
|
||||
}
|
||||
/* init current task */
|
||||
mpp->cur_task = mpp_task;
|
||||
mpp_time_record(mpp_task);
|
||||
/* Flush the register before the start the device */
|
||||
wmb();
|
||||
mpp_write(mpp, RKVDEC_REG_START_EN_BASE, task->reg[reg_en] | RKVDEC_START_EN);
|
||||
|
||||
@@ -447,6 +447,7 @@ static int rkvdec_link_send_task_to_hw(struct rkvdec_link_dev *dev,
|
||||
set_bit(TASK_STATE_START, &task_ddr->state);
|
||||
schedule_delayed_work(&task_ddr->timeout_work,
|
||||
msecs_to_jiffies(200));
|
||||
mpp_time_record(task_ddr);
|
||||
}
|
||||
} else {
|
||||
if (task_total)
|
||||
@@ -566,6 +567,7 @@ static int rkvdec_link_isr_recv_task(struct mpp_dev *mpp,
|
||||
continue;
|
||||
}
|
||||
|
||||
mpp_time_diff(mpp_task);
|
||||
task = to_rkvdec2_task(mpp_task);
|
||||
regs = table_base + idx * link_dec->link_reg_count;
|
||||
irq_status = regs[info->tb_reg_int];
|
||||
@@ -1173,7 +1175,6 @@ static int mpp_task_queue(struct mpp_dev *mpp, struct mpp_task *task)
|
||||
}
|
||||
|
||||
rkvdec2_link_power_on(mpp);
|
||||
mpp_time_record(task);
|
||||
mpp_debug(DEBUG_TASK_INFO, "pid %d, start hw %s\n",
|
||||
task->session->pid, dev_name(mpp->dev));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user