Lines Matching refs:vfd
749 v4l2_fh_init(&inst->fh, func->vfd); in vpu_v4l2_open()
809 struct video_device *vfd; in vpu_add_func() local
815 if (func->vfd) in vpu_add_func()
821 func->vfd = NULL; in vpu_add_func()
825 vfd = video_device_alloc(); in vpu_add_func()
826 if (!vfd) { in vpu_add_func()
831 vfd->release = video_device_release; in vpu_add_func()
832 vfd->vfl_dir = VFL_DIR_M2M; in vpu_add_func()
833 vfd->v4l2_dev = &vpu->v4l2_dev; in vpu_add_func()
834 vfd->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING; in vpu_add_func()
836 strscpy(vfd->name, "amphion-vpu-encoder", sizeof(vfd->name)); in vpu_add_func()
837 vfd->fops = venc_get_fops(); in vpu_add_func()
838 vfd->ioctl_ops = venc_get_ioctl_ops(); in vpu_add_func()
840 strscpy(vfd->name, "amphion-vpu-decoder", sizeof(vfd->name)); in vpu_add_func()
841 vfd->fops = vdec_get_fops(); in vpu_add_func()
842 vfd->ioctl_ops = vdec_get_ioctl_ops(); in vpu_add_func()
845 ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1); in vpu_add_func()
847 video_device_release(vfd); in vpu_add_func()
851 video_set_drvdata(vfd, vpu); in vpu_add_func()
852 func->vfd = vfd; in vpu_add_func()
854 ret = v4l2_m2m_register_media_controller(func->m2m_dev, func->vfd, func->function); in vpu_add_func()
858 video_unregister_device(func->vfd); in vpu_add_func()
859 func->vfd = NULL; in vpu_add_func()
876 if (func->vfd) { in vpu_remove_func()
877 video_unregister_device(func->vfd); in vpu_remove_func()
878 func->vfd = NULL; in vpu_remove_func()