.. | .. |
---|
251 | 251 | u32 i; |
---|
252 | 252 | u32 reg_en; |
---|
253 | 253 | struct jpgdec_task *task = to_jpgdec_task(mpp_task); |
---|
| 254 | + u32 timing_en = mpp->srv->timing_en; |
---|
254 | 255 | |
---|
255 | 256 | mpp_debug_enter(); |
---|
256 | 257 | |
---|
.. | .. |
---|
263 | 264 | |
---|
264 | 265 | mpp_write_req(mpp, task->reg, s, e, reg_en); |
---|
265 | 266 | } |
---|
| 267 | + |
---|
| 268 | + /* flush tlb before starting hardware */ |
---|
| 269 | + mpp_iommu_flush_tlb(mpp->iommu_info); |
---|
| 270 | + |
---|
266 | 271 | /* init current task */ |
---|
267 | 272 | mpp->cur_task = mpp_task; |
---|
| 273 | + |
---|
| 274 | + mpp_task_run_begin(mpp_task, timing_en, MPP_WORK_TIMEOUT_DELAY); |
---|
| 275 | + |
---|
268 | 276 | /* Flush the register before the start the device */ |
---|
269 | 277 | wmb(); |
---|
270 | 278 | mpp_write(mpp, JPGDEC_REG_INT_EN_BASE, |
---|
271 | 279 | task->reg[reg_en] | JPGDEC_START_EN); |
---|
| 280 | + |
---|
| 281 | + mpp_task_run_end(mpp_task, timing_en); |
---|
272 | 282 | |
---|
273 | 283 | mpp_debug_leave(); |
---|
274 | 284 | |
---|
.. | .. |
---|
374 | 384 | dec->procfs = NULL; |
---|
375 | 385 | return -EIO; |
---|
376 | 386 | } |
---|
| 387 | + |
---|
| 388 | + /* for common mpp_dev options */ |
---|
| 389 | + mpp_procfs_create_common(dec->procfs, mpp); |
---|
| 390 | + |
---|
377 | 391 | mpp_procfs_create_u32("aclk", 0644, |
---|
378 | 392 | dec->procfs, &dec->aclk_info.debug_rate_hz); |
---|
379 | 393 | mpp_procfs_create_u32("session_buffers", 0644, |
---|
.. | .. |
---|
510 | 524 | mpp_debug(DEBUG_RESET, "reset in\n"); |
---|
511 | 525 | |
---|
512 | 526 | /* Don't skip this or iommu won't work after reset */ |
---|
513 | | - rockchip_pmu_idle_request(mpp->dev, true); |
---|
| 527 | + mpp_pmu_idle_request(mpp, true); |
---|
514 | 528 | mpp_safe_reset(dec->rst_a); |
---|
515 | 529 | mpp_safe_reset(dec->rst_h); |
---|
516 | 530 | udelay(5); |
---|
517 | 531 | mpp_safe_unreset(dec->rst_a); |
---|
518 | 532 | mpp_safe_unreset(dec->rst_h); |
---|
519 | | - rockchip_pmu_idle_request(mpp->dev, false); |
---|
| 533 | + mpp_pmu_idle_request(mpp, false); |
---|
520 | 534 | |
---|
521 | 535 | mpp_debug(DEBUG_RESET, "reset out\n"); |
---|
522 | 536 | } |
---|