Lines Matching full:mdp

176 	struct mtk_mdp_dev *mdp = ctx->mdp_dev;  in mtk_mdp_try_fmt_mplane()  local
177 struct mtk_mdp_variant *variant = mdp->variant; in mtk_mdp_try_fmt_mplane()
279 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_try_crop() local
280 struct mtk_mdp_variant *variant = mdp->variant; in mtk_mdp_try_crop()
473 struct mtk_mdp_dev *mdp = priv; in mtk_mdp_process_done() local
477 ctx = v4l2_m2m_get_curr_priv(mdp->m2m_dev); in mtk_mdp_process_done()
498 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_m2m_worker() local
503 dev_err(&mdp->pdev->dev, "ctx is in error state"); in mtk_mdp_m2m_worker()
523 dev_err(&mdp->pdev->dev, "processing failed: %d", ret); in mtk_mdp_m2m_worker()
530 mtk_mdp_process_done(mdp, buf_state); in mtk_mdp_m2m_worker()
595 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_m2m_querycap() local
598 strscpy(cap->card, mdp->pdev->name, sizeof(cap->card)); in mtk_mdp_m2m_querycap()
956 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_s_ctrl() local
957 struct mtk_mdp_variant *variant = mdp->variant; in mtk_mdp_s_ctrl()
1029 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_set_default_params() local
1035 frame->width = mdp->variant->pix_min->org_w; in mtk_mdp_set_default_params()
1036 frame->height = mdp->variant->pix_min->org_h; in mtk_mdp_set_default_params()
1043 frame->width = mdp->variant->pix_min->target_rot_dis_w; in mtk_mdp_set_default_params()
1044 frame->height = mdp->variant->pix_min->target_rot_dis_h; in mtk_mdp_set_default_params()
1052 struct mtk_mdp_dev *mdp = video_drvdata(file); in mtk_mdp_m2m_open() local
1062 if (mutex_lock_interruptible(&mdp->lock)) { in mtk_mdp_m2m_open()
1068 ctx->id = mdp->id_counter++; in mtk_mdp_m2m_open()
1080 ctx->mdp_dev = mdp; in mtk_mdp_m2m_open()
1084 ctx->m2m_ctx = v4l2_m2m_ctx_init(mdp->m2m_dev, ctx, in mtk_mdp_m2m_open()
1087 dev_err(&mdp->pdev->dev, "Failed to initialize m2m context"); in mtk_mdp_m2m_open()
1092 if (mdp->ctx_num++ == 0) { in mtk_mdp_m2m_open()
1093 ret = vpu_load_firmware(mdp->vpu_dev); in mtk_mdp_m2m_open()
1095 dev_err(&mdp->pdev->dev, in mtk_mdp_m2m_open()
1100 ret = mtk_mdp_vpu_register(mdp->pdev); in mtk_mdp_m2m_open()
1102 dev_err(&mdp->pdev->dev, in mtk_mdp_m2m_open()
1108 list_add(&ctx->list, &mdp->ctx_list); in mtk_mdp_m2m_open()
1109 mutex_unlock(&mdp->lock); in mtk_mdp_m2m_open()
1121 mtk_mdp_dbg(0, "%s [%d]", dev_name(&mdp->pdev->dev), ctx->id); in mtk_mdp_m2m_open()
1126 mdp->ctx_num--; in mtk_mdp_m2m_open()
1133 mutex_unlock(&mdp->lock); in mtk_mdp_m2m_open()
1143 struct mtk_mdp_dev *mdp = ctx->mdp_dev; in mtk_mdp_m2m_release() local
1145 flush_workqueue(mdp->job_wq); in mtk_mdp_m2m_release()
1146 mutex_lock(&mdp->lock); in mtk_mdp_m2m_release()
1152 mdp->ctx_num--; in mtk_mdp_m2m_release()
1155 mtk_mdp_dbg(0, "%s [%d]", dev_name(&mdp->pdev->dev), ctx->id); in mtk_mdp_m2m_release()
1157 mutex_unlock(&mdp->lock); in mtk_mdp_m2m_release()
1176 int mtk_mdp_register_m2m_device(struct mtk_mdp_dev *mdp) in mtk_mdp_register_m2m_device() argument
1178 struct device *dev = &mdp->pdev->dev; in mtk_mdp_register_m2m_device()
1181 mdp->variant = &mtk_mdp_default_variant; in mtk_mdp_register_m2m_device()
1182 mdp->vdev = video_device_alloc(); in mtk_mdp_register_m2m_device()
1183 if (!mdp->vdev) { in mtk_mdp_register_m2m_device()
1188 mdp->vdev->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING; in mtk_mdp_register_m2m_device()
1189 mdp->vdev->fops = &mtk_mdp_m2m_fops; in mtk_mdp_register_m2m_device()
1190 mdp->vdev->ioctl_ops = &mtk_mdp_m2m_ioctl_ops; in mtk_mdp_register_m2m_device()
1191 mdp->vdev->release = video_device_release; in mtk_mdp_register_m2m_device()
1192 mdp->vdev->lock = &mdp->lock; in mtk_mdp_register_m2m_device()
1193 mdp->vdev->vfl_dir = VFL_DIR_M2M; in mtk_mdp_register_m2m_device()
1194 mdp->vdev->v4l2_dev = &mdp->v4l2_dev; in mtk_mdp_register_m2m_device()
1195 snprintf(mdp->vdev->name, sizeof(mdp->vdev->name), "%s:m2m", in mtk_mdp_register_m2m_device()
1197 video_set_drvdata(mdp->vdev, mdp); in mtk_mdp_register_m2m_device()
1199 mdp->m2m_dev = v4l2_m2m_init(&mtk_mdp_m2m_ops); in mtk_mdp_register_m2m_device()
1200 if (IS_ERR(mdp->m2m_dev)) { in mtk_mdp_register_m2m_device()
1202 ret = PTR_ERR(mdp->m2m_dev); in mtk_mdp_register_m2m_device()
1206 ret = video_register_device(mdp->vdev, VFL_TYPE_VIDEO, 2); in mtk_mdp_register_m2m_device()
1212 v4l2_info(&mdp->v4l2_dev, "driver registered as /dev/video%d", in mtk_mdp_register_m2m_device()
1213 mdp->vdev->num); in mtk_mdp_register_m2m_device()
1217 v4l2_m2m_release(mdp->m2m_dev); in mtk_mdp_register_m2m_device()
1219 video_device_release(mdp->vdev); in mtk_mdp_register_m2m_device()
1225 void mtk_mdp_unregister_m2m_device(struct mtk_mdp_dev *mdp) in mtk_mdp_unregister_m2m_device() argument
1227 video_unregister_device(mdp->vdev); in mtk_mdp_unregister_m2m_device()
1228 v4l2_m2m_release(mdp->m2m_dev); in mtk_mdp_unregister_m2m_device()