.. | .. |
---|
439 | 439 | int i; |
---|
440 | 440 | struct mpp_request *req; |
---|
441 | 441 | u32 reg_en = mpp_task->hw_info->reg_en; |
---|
| 442 | + u32 timing_en = mpp->srv->timing_en; |
---|
442 | 443 | |
---|
443 | 444 | /* |
---|
444 | 445 | * Tips: ensure osd plt clock is 0 before setting register, |
---|
.. | .. |
---|
466 | 467 | rkvenc_write_req_backward(mpp, task->reg, s, e, reg_en); |
---|
467 | 468 | } |
---|
468 | 469 | } |
---|
| 470 | + |
---|
| 471 | + /* flush tlb before starting hardware */ |
---|
| 472 | + mpp_iommu_flush_tlb(mpp->iommu_info); |
---|
| 473 | + |
---|
469 | 474 | /* init current task */ |
---|
470 | 475 | mpp->cur_task = mpp_task; |
---|
| 476 | + |
---|
| 477 | + mpp_task_run_begin(mpp_task, timing_en, MPP_WORK_TIMEOUT_DELAY); |
---|
| 478 | + |
---|
471 | 479 | /* Flush the register before the start the device */ |
---|
472 | 480 | wmb(); |
---|
473 | 481 | mpp_write(mpp, RKVENC_ENC_START_BASE, task->reg[reg_en]); |
---|
| 482 | + |
---|
| 483 | + mpp_task_run_end(mpp_task, timing_en); |
---|
474 | 484 | } break; |
---|
475 | 485 | case RKVENC_MODE_LINKTABLE_FIX: |
---|
476 | 486 | case RKVENC_MODE_LINKTABLE_UPDATE: |
---|
.. | .. |
---|
802 | 812 | enc->procfs = NULL; |
---|
803 | 813 | return -EIO; |
---|
804 | 814 | } |
---|
| 815 | + |
---|
| 816 | + /* for common mpp_dev options */ |
---|
| 817 | + mpp_procfs_create_common(enc->procfs, mpp); |
---|
| 818 | + |
---|
805 | 819 | /* for debug */ |
---|
806 | 820 | mpp_procfs_create_u32("aclk", 0644, |
---|
807 | 821 | enc->procfs, &enc->aclk_info.debug_rate_hz); |
---|
.. | .. |
---|
1264 | 1278 | mpp_write(mpp, RKVENC_INT_STATUS_BASE, 0); |
---|
1265 | 1279 | /* cru reset */ |
---|
1266 | 1280 | if (enc->rst_a && enc->rst_h && enc->rst_core) { |
---|
1267 | | - rockchip_pmu_idle_request(mpp->dev, true); |
---|
| 1281 | + mpp_pmu_idle_request(mpp, true); |
---|
1268 | 1282 | mpp_safe_reset(enc->rst_a); |
---|
1269 | 1283 | mpp_safe_reset(enc->rst_h); |
---|
1270 | 1284 | mpp_safe_reset(enc->rst_core); |
---|
.. | .. |
---|
1272 | 1286 | mpp_safe_unreset(enc->rst_a); |
---|
1273 | 1287 | mpp_safe_unreset(enc->rst_h); |
---|
1274 | 1288 | mpp_safe_unreset(enc->rst_core); |
---|
1275 | | - rockchip_pmu_idle_request(mpp->dev, false); |
---|
| 1289 | + mpp_pmu_idle_request(mpp, false); |
---|
1276 | 1290 | } |
---|
1277 | 1291 | #ifdef CONFIG_PM_DEVFREQ |
---|
1278 | 1292 | if (enc->devfreq) |
---|