.. | .. |
---|
264 | 264 | u32 i; |
---|
265 | 265 | u32 reg_en; |
---|
266 | 266 | struct vepu_task *task = to_vepu_task(mpp_task); |
---|
| 267 | + u32 timing_en = mpp->srv->timing_en; |
---|
267 | 268 | |
---|
268 | 269 | mpp_debug_enter(); |
---|
269 | 270 | |
---|
.. | .. |
---|
282 | 283 | |
---|
283 | 284 | mpp_write_req(mpp, task->reg, s, e, reg_en); |
---|
284 | 285 | } |
---|
| 286 | + |
---|
| 287 | + /* flush tlb before starting hardware */ |
---|
| 288 | + mpp_iommu_flush_tlb(mpp->iommu_info); |
---|
| 289 | + |
---|
285 | 290 | /* init current task */ |
---|
286 | 291 | mpp->cur_task = mpp_task; |
---|
| 292 | + |
---|
| 293 | + mpp_task_run_begin(mpp_task, timing_en, MPP_WORK_TIMEOUT_DELAY); |
---|
| 294 | + |
---|
287 | 295 | /* Last, flush start registers */ |
---|
288 | 296 | wmb(); |
---|
289 | 297 | mpp_write(mpp, VEPU1_REG_ENC_EN, |
---|
290 | 298 | task->reg[reg_en] | VEPU1_ENC_START); |
---|
| 299 | + |
---|
| 300 | + mpp_task_run_end(mpp_task, timing_en); |
---|
291 | 301 | |
---|
292 | 302 | mpp_debug_leave(); |
---|
293 | 303 | |
---|
.. | .. |
---|
555 | 565 | enc->procfs = NULL; |
---|
556 | 566 | return -EIO; |
---|
557 | 567 | } |
---|
| 568 | + |
---|
| 569 | + /* for common mpp_dev options */ |
---|
| 570 | + mpp_procfs_create_common(enc->procfs, mpp); |
---|
| 571 | + |
---|
558 | 572 | mpp_procfs_create_u32("aclk", 0644, |
---|
559 | 573 | enc->procfs, &enc->aclk_info.debug_rate_hz); |
---|
560 | 574 | mpp_procfs_create_u32("session_buffers", 0644, |
---|
.. | .. |
---|
656 | 670 | |
---|
657 | 671 | if (enc->rst_a && enc->rst_h) { |
---|
658 | 672 | /* Don't skip this or iommu won't work after reset */ |
---|
659 | | - rockchip_pmu_idle_request(mpp->dev, true); |
---|
| 673 | + mpp_pmu_idle_request(mpp, true); |
---|
660 | 674 | mpp_safe_reset(enc->rst_a); |
---|
661 | 675 | mpp_safe_reset(enc->rst_h); |
---|
662 | 676 | udelay(5); |
---|
663 | 677 | mpp_safe_unreset(enc->rst_a); |
---|
664 | 678 | mpp_safe_unreset(enc->rst_h); |
---|
665 | | - rockchip_pmu_idle_request(mpp->dev, false); |
---|
| 679 | + mpp_pmu_idle_request(mpp, false); |
---|
666 | 680 | } |
---|
667 | 681 | mpp_write(mpp, VEPU1_REG_ENC_EN, 0); |
---|
668 | 682 | |
---|