Lines Matching refs:mpp

75 		container_of(dev, struct jpgdec_dev, mpp)
93 struct mpp_dev mpp; member
203 struct mpp_dev *mpp = session->mpp; in jpgdec_alloc_task() local
213 mpp_task->hw_info = mpp->var->hw_info; in jpgdec_alloc_task()
233 mpp_task_dump_mem_region(mpp, mpp_task); in jpgdec_alloc_task()
234 mpp_task_dump_reg(mpp, mpp_task); in jpgdec_alloc_task()
240 static int jpgdec_soft_reset(struct mpp_dev *mpp) in jpgdec_soft_reset() argument
242 mpp_write(mpp, JPGDEC_REG_SYS_BASE, JPGDEC_FORCE_SOFTRESET_VALID); in jpgdec_soft_reset()
243 mpp_write(mpp, JPGDEC_REG_INT_EN_BASE, JPGDEC_SOFT_REST_EN); in jpgdec_soft_reset()
248 static int jpgdec_run(struct mpp_dev *mpp, in jpgdec_run() argument
254 u32 timing_en = mpp->srv->timing_en; in jpgdec_run()
265 mpp_write_req(mpp, task->reg, s, e, reg_en); in jpgdec_run()
268 mpp_iommu_flush_tlb(mpp->iommu_info); in jpgdec_run()
271 mpp->cur_task = mpp_task; in jpgdec_run()
277 mpp_write(mpp, JPGDEC_REG_INT_EN_BASE, in jpgdec_run()
287 static int jpgdec_finish(struct mpp_dev *mpp, in jpgdec_finish() argument
304 mpp_read_req(mpp, task->reg, s, e); in jpgdec_finish()
309 dec_get = mpp_read_relaxed(mpp, JPGDEC_REG_STREAM_RLC_BASE); in jpgdec_finish()
318 !atomic_read(&mpp->reset_request)) in jpgdec_finish()
319 jpgdec_soft_reset(mpp); in jpgdec_finish()
329 static int jpgdec_result(struct mpp_dev *mpp, in jpgdec_result() argument
364 static int jpgdec_procfs_remove(struct mpp_dev *mpp) in jpgdec_procfs_remove() argument
366 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_procfs_remove()
376 static int jpgdec_procfs_init(struct mpp_dev *mpp) in jpgdec_procfs_init() argument
378 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_procfs_init()
380 dec->procfs = proc_mkdir(mpp->dev->of_node->name, mpp->srv->procfs); in jpgdec_procfs_init()
388 mpp_procfs_create_common(dec->procfs, mpp); in jpgdec_procfs_init()
393 dec->procfs, &mpp->session_max_buffers); in jpgdec_procfs_init()
398 static inline int jpgdec_procfs_remove(struct mpp_dev *mpp) in jpgdec_procfs_remove() argument
403 static inline int jpgdec_procfs_init(struct mpp_dev *mpp) in jpgdec_procfs_init() argument
409 static int jpgdec_init(struct mpp_dev *mpp) in jpgdec_init() argument
412 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_init()
414 mpp->grf_info = &mpp->srv->grf_infos[MPP_DRIVER_VDPU1]; in jpgdec_init()
417 ret = mpp_get_clk_info(mpp, &dec->aclk_info, "aclk_vcodec"); in jpgdec_init()
420 ret = mpp_get_clk_info(mpp, &dec->hclk_info, "hclk_vcodec"); in jpgdec_init()
427 dec->rst_a = mpp_reset_control_get(mpp, RST_TYPE_A, "video_a"); in jpgdec_init()
430 dec->rst_h = mpp_reset_control_get(mpp, RST_TYPE_H, "video_h"); in jpgdec_init()
437 static int jpgdec_clk_on(struct mpp_dev *mpp) in jpgdec_clk_on() argument
439 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_clk_on()
447 static int jpgdec_clk_off(struct mpp_dev *mpp) in jpgdec_clk_off() argument
449 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_clk_off()
457 static int jpgdec_set_freq(struct mpp_dev *mpp, in jpgdec_set_freq() argument
460 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_set_freq()
468 static int jpgdec_reduce_freq(struct mpp_dev *mpp) in jpgdec_reduce_freq() argument
470 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_reduce_freq()
477 static int jpgdec_irq(struct mpp_dev *mpp) in jpgdec_irq() argument
479 mpp->irq_status = mpp_read(mpp, JPGDEC_REG_INT_EN_BASE); in jpgdec_irq()
480 if (!(mpp->irq_status & JPGDEC_IRQ_RAW)) in jpgdec_irq()
482 mpp_write(mpp, JPGDEC_REG_INT_EN_BASE, 0); in jpgdec_irq()
487 static int jpgdec_isr(struct mpp_dev *mpp) in jpgdec_isr() argument
491 struct mpp_task *mpp_task = mpp->cur_task; in jpgdec_isr()
495 dev_err(mpp->dev, "no current task\n"); in jpgdec_isr()
499 mpp->cur_task = NULL; in jpgdec_isr()
501 task->irq_status = mpp->irq_status; in jpgdec_isr()
509 atomic_inc(&mpp->reset_request); in jpgdec_isr()
518 static int jpgdec_reset(struct mpp_dev *mpp) in jpgdec_reset() argument
520 struct jpgdec_dev *dec = to_jpgdec_dev(mpp); in jpgdec_reset()
526 mpp_pmu_idle_request(mpp, true); in jpgdec_reset()
532 mpp_pmu_idle_request(mpp, false); in jpgdec_reset()
536 mpp_write(mpp, JPGDEC_REG_INT_EN_BASE, 0); in jpgdec_reset()
580 struct mpp_dev *mpp = NULL; in jpgdec_probe() local
588 mpp = &dec->mpp; in jpgdec_probe()
589 platform_set_drvdata(pdev, mpp); in jpgdec_probe()
594 mpp->var = (struct mpp_dev_var *)match->data; in jpgdec_probe()
597 ret = mpp_dev_probe(mpp, pdev); in jpgdec_probe()
603 ret = devm_request_threaded_irq(dev, mpp->irq, in jpgdec_probe()
607 dev_name(dev), mpp); in jpgdec_probe()
613 mpp->session_max_buffers = JPGDEC_SESSION_MAX_BUFFERS; in jpgdec_probe()
614 jpgdec_procfs_init(mpp); in jpgdec_probe()
616 mpp_dev_register_srv(mpp, mpp->srv); in jpgdec_probe()
625 struct mpp_dev *mpp = dev_get_drvdata(dev); in jpgdec_remove() local
628 mpp_dev_remove(mpp); in jpgdec_remove()
629 jpgdec_procfs_remove(mpp); in jpgdec_remove()