Lines Matching refs:mpp

69 		container_of(dev, struct vepu_dev, mpp)
98 struct mpp_dev mpp; member
225 struct mpp_dev *mpp = session->mpp; in vepu_alloc_task() local
235 mpp_task->hw_info = mpp->var->hw_info; in vepu_alloc_task()
254 mpp_task_dump_mem_region(mpp, mpp_task); in vepu_alloc_task()
255 mpp_task_dump_reg(mpp, mpp_task); in vepu_alloc_task()
261 static int vepu_run(struct mpp_dev *mpp, in vepu_run() argument
267 u32 timing_en = mpp->srv->timing_en; in vepu_run()
272 mpp_write_relaxed(mpp, VEPU1_REG_CLR_CACHE_BASE, 1); in vepu_run()
276 mpp_write_relaxed(mpp, VEPU1_REG_ENC_EN, in vepu_run()
284 mpp_write_req(mpp, task->reg, s, e, reg_en); in vepu_run()
288 mpp_iommu_flush_tlb(mpp->iommu_info); in vepu_run()
291 mpp->cur_task = mpp_task; in vepu_run()
297 mpp_write(mpp, VEPU1_REG_ENC_EN, in vepu_run()
307 static int vepu_irq(struct mpp_dev *mpp) in vepu_irq() argument
309 mpp->irq_status = mpp_read(mpp, VEPU1_REG_INT); in vepu_irq()
310 if (!(mpp->irq_status & VEPU1_INT_RAW)) in vepu_irq()
313 mpp_write(mpp, VEPU1_REG_INT, 0); in vepu_irq()
318 static int vepu_isr(struct mpp_dev *mpp) in vepu_isr() argument
322 struct mpp_task *mpp_task = mpp->cur_task; in vepu_isr()
326 dev_err(mpp->dev, "no current task\n"); in vepu_isr()
330 mpp->cur_task = NULL; in vepu_isr()
332 task->irq_status = mpp->irq_status; in vepu_isr()
341 atomic_inc(&mpp->reset_request); in vepu_isr()
349 static int vepu_finish(struct mpp_dev *mpp, in vepu_finish() argument
364 mpp_read_req(mpp, task->reg, s, e); in vepu_finish()
374 static int vepu_result(struct mpp_dev *mpp, in vepu_result() argument
481 static int vepu_procfs_remove(struct mpp_dev *mpp) in vepu_procfs_remove() argument
483 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_procfs_remove()
540 struct mpp_dev *mpp = seq->private; in vepu_show_session_info() local
542 mutex_lock(&mpp->srv->session_lock); in vepu_show_session_info()
544 &mpp->srv->session_list, in vepu_show_session_info()
550 if (mpp->dev_ops->dump_session) in vepu_show_session_info()
551 mpp->dev_ops->dump_session(session, seq); in vepu_show_session_info()
553 mutex_unlock(&mpp->srv->session_lock); in vepu_show_session_info()
558 static int vepu_procfs_init(struct mpp_dev *mpp) in vepu_procfs_init() argument
560 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_procfs_init()
562 enc->procfs = proc_mkdir(mpp->dev->of_node->name, mpp->srv->procfs); in vepu_procfs_init()
570 mpp_procfs_create_common(enc->procfs, mpp); in vepu_procfs_init()
575 enc->procfs, &mpp->session_max_buffers); in vepu_procfs_init()
578 enc->procfs, vepu_show_session_info, mpp); in vepu_procfs_init()
583 static inline int vepu_procfs_remove(struct mpp_dev *mpp) in vepu_procfs_remove() argument
588 static inline int vepu_procfs_init(struct mpp_dev *mpp) in vepu_procfs_init() argument
599 static int vepu_init(struct mpp_dev *mpp) in vepu_init() argument
602 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_init()
604 mpp->grf_info = &mpp->srv->grf_infos[MPP_DRIVER_VEPU1]; in vepu_init()
607 ret = mpp_get_clk_info(mpp, &enc->aclk_info, "aclk_vcodec"); in vepu_init()
610 ret = mpp_get_clk_info(mpp, &enc->hclk_info, "hclk_vcodec"); in vepu_init()
617 enc->rst_a = mpp_reset_control_get(mpp, RST_TYPE_A, "video_a"); in vepu_init()
620 enc->rst_h = mpp_reset_control_get(mpp, RST_TYPE_H, "video_h"); in vepu_init()
627 static int vepu_clk_on(struct mpp_dev *mpp) in vepu_clk_on() argument
629 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_clk_on()
637 static int vepu_clk_off(struct mpp_dev *mpp) in vepu_clk_off() argument
639 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_clk_off()
647 static int vepu_set_freq(struct mpp_dev *mpp, in vepu_set_freq() argument
650 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_set_freq()
658 static int vepu_reduce_freq(struct mpp_dev *mpp) in vepu_reduce_freq() argument
660 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_reduce_freq()
667 static int vepu_reset(struct mpp_dev *mpp) in vepu_reset() argument
669 struct vepu_dev *enc = to_vepu_dev(mpp); in vepu_reset()
673 mpp_pmu_idle_request(mpp, true); in vepu_reset()
679 mpp_pmu_idle_request(mpp, false); in vepu_reset()
681 mpp_write(mpp, VEPU1_REG_ENC_EN, 0); in vepu_reset()
730 struct mpp_dev *mpp = NULL; in vepu_probe() local
738 mpp = &enc->mpp; in vepu_probe()
739 platform_set_drvdata(pdev, mpp); in vepu_probe()
744 mpp->var = (struct mpp_dev_var *)match->data; in vepu_probe()
746 mpp->core_id = of_alias_get_id(pdev->dev.of_node, "vepu"); in vepu_probe()
749 ret = mpp_dev_probe(mpp, pdev); in vepu_probe()
755 ret = devm_request_threaded_irq(dev, mpp->irq, in vepu_probe()
759 dev_name(dev), mpp); in vepu_probe()
765 mpp->session_max_buffers = VEPU1_SESSION_MAX_BUFFERS; in vepu_probe()
766 vepu_procfs_init(mpp); in vepu_probe()
768 mpp_dev_register_srv(mpp, mpp->srv); in vepu_probe()
777 struct mpp_dev *mpp = dev_get_drvdata(dev); in vepu_remove() local
780 mpp_dev_remove(mpp); in vepu_remove()
781 vepu_procfs_remove(mpp); in vepu_remove()