Lines Matching full:mdp

96 			"VPU MDP process failed: %d\n", ret);  in mdp_m2m_device_run()
564 struct mdp_dev *mdp = video_get_drvdata(vdev); in mdp_m2m_open() local
566 struct device *dev = &mdp->pdev->dev; in mdp_m2m_open()
569 const struct mdp_limit *limit = mdp->mdp_data->def_limit; in mdp_m2m_open()
575 if (mutex_lock_interruptible(&mdp->m2m_lock)) { in mdp_m2m_open()
580 ret = ida_alloc(&mdp->mdp_ida, GFP_KERNEL); in mdp_m2m_open()
585 ctx->mdp_dev = mdp; in mdp_m2m_open()
598 ctx->m2m_ctx = v4l2_m2m_ctx_init(mdp->m2m_dev, ctx, mdp_m2m_queue_init); in mdp_m2m_open()
607 ret = mdp_frameparam_init(mdp, &ctx->curr_param); in mdp_m2m_open()
609 dev_err(dev, "Failed to initialize mdp parameter\n"); in mdp_m2m_open()
613 mutex_unlock(&mdp->m2m_lock); in mdp_m2m_open()
635 ida_free(&mdp->mdp_ida, ctx->id); in mdp_m2m_open()
637 mutex_unlock(&mdp->m2m_lock); in mdp_m2m_open()
647 struct mdp_dev *mdp = video_drvdata(file); in mdp_m2m_release() local
648 struct device *dev = &mdp->pdev->dev; in mdp_m2m_release()
650 mutex_lock(&mdp->m2m_lock); in mdp_m2m_release()
653 mdp_vpu_put_locked(mdp); in mdp_m2m_release()
658 ida_free(&mdp->mdp_ida, ctx->id); in mdp_m2m_release()
659 mutex_unlock(&mdp->m2m_lock); in mdp_m2m_release()
680 int mdp_m2m_device_register(struct mdp_dev *mdp) in mdp_m2m_device_register() argument
682 struct device *dev = &mdp->pdev->dev; in mdp_m2m_device_register()
685 mdp->m2m_vdev = video_device_alloc(); in mdp_m2m_device_register()
686 if (!mdp->m2m_vdev) { in mdp_m2m_device_register()
691 mdp->m2m_vdev->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | in mdp_m2m_device_register()
693 mdp->m2m_vdev->fops = &mdp_m2m_fops; in mdp_m2m_device_register()
694 mdp->m2m_vdev->ioctl_ops = &mdp_m2m_ioctl_ops; in mdp_m2m_device_register()
695 mdp->m2m_vdev->release = mdp_video_device_release; in mdp_m2m_device_register()
696 mdp->m2m_vdev->lock = &mdp->m2m_lock; in mdp_m2m_device_register()
697 mdp->m2m_vdev->vfl_dir = VFL_DIR_M2M; in mdp_m2m_device_register()
698 mdp->m2m_vdev->v4l2_dev = &mdp->v4l2_dev; in mdp_m2m_device_register()
699 snprintf(mdp->m2m_vdev->name, sizeof(mdp->m2m_vdev->name), "%s:m2m", in mdp_m2m_device_register()
701 video_set_drvdata(mdp->m2m_vdev, mdp); in mdp_m2m_device_register()
703 mdp->m2m_dev = v4l2_m2m_init(&mdp_m2m_ops); in mdp_m2m_device_register()
704 if (IS_ERR(mdp->m2m_dev)) { in mdp_m2m_device_register()
706 ret = PTR_ERR(mdp->m2m_dev); in mdp_m2m_device_register()
710 ret = video_register_device(mdp->m2m_vdev, VFL_TYPE_VIDEO, -1); in mdp_m2m_device_register()
716 v4l2_info(&mdp->v4l2_dev, "Driver registered as /dev/video%d", in mdp_m2m_device_register()
717 mdp->m2m_vdev->num); in mdp_m2m_device_register()
721 v4l2_m2m_release(mdp->m2m_dev); in mdp_m2m_device_register()
723 video_device_release(mdp->m2m_vdev); in mdp_m2m_device_register()
729 void mdp_m2m_device_unregister(struct mdp_dev *mdp) in mdp_m2m_device_unregister() argument
731 video_unregister_device(mdp->m2m_vdev); in mdp_m2m_device_unregister()