Lines Matching full:csi
57 strscpy(cap->card, "sun4i-csi", sizeof(cap->card)); in sun4i_csi_querycap()
91 static void _sun4i_csi_try_fmt(struct sun4i_csi *csi, in _sun4i_csi_try_fmt() argument
134 struct sun4i_csi *csi = video_drvdata(file); in sun4i_csi_try_fmt_vid_cap() local
136 _sun4i_csi_try_fmt(csi, &f->fmt.pix_mp); in sun4i_csi_try_fmt_vid_cap()
144 struct sun4i_csi *csi = video_drvdata(file); in sun4i_csi_s_fmt_vid_cap() local
146 _sun4i_csi_try_fmt(csi, &f->fmt.pix_mp); in sun4i_csi_s_fmt_vid_cap()
147 csi->fmt = f->fmt.pix_mp; in sun4i_csi_s_fmt_vid_cap()
155 struct sun4i_csi *csi = video_drvdata(file); in sun4i_csi_g_fmt_vid_cap() local
157 f->fmt.pix_mp = csi->fmt; in sun4i_csi_g_fmt_vid_cap()
198 struct sun4i_csi *csi = video_drvdata(file); in sun4i_csi_open() local
201 ret = mutex_lock_interruptible(&csi->lock); in sun4i_csi_open()
205 ret = pm_runtime_resume_and_get(csi->dev); in sun4i_csi_open()
209 ret = v4l2_pipeline_pm_get(&csi->vdev.entity); in sun4i_csi_open()
217 mutex_unlock(&csi->lock); in sun4i_csi_open()
222 v4l2_pipeline_pm_put(&csi->vdev.entity); in sun4i_csi_open()
225 pm_runtime_put(csi->dev); in sun4i_csi_open()
228 mutex_unlock(&csi->lock); in sun4i_csi_open()
235 struct sun4i_csi *csi = video_drvdata(file); in sun4i_csi_release() local
237 mutex_lock(&csi->lock); in sun4i_csi_release()
241 v4l2_pipeline_pm_put(&csi->vdev.entity); in sun4i_csi_release()
242 pm_runtime_put(csi->dev); in sun4i_csi_release()
244 mutex_unlock(&csi->lock); in sun4i_csi_release()
284 struct sun4i_csi *csi = container_of(subdev, struct sun4i_csi, subdev); in sun4i_csi_subdev_get_fmt() local
290 subdev_fmt = &csi->subdev_fmt; in sun4i_csi_subdev_get_fmt()
301 struct sun4i_csi *csi = container_of(subdev, struct sun4i_csi, subdev); in sun4i_csi_subdev_set_fmt() local
307 subdev_fmt = &csi->subdev_fmt; in sun4i_csi_subdev_set_fmt()
350 int sun4i_csi_v4l2_register(struct sun4i_csi *csi) in sun4i_csi_v4l2_register() argument
352 struct video_device *vdev = &csi->vdev; in sun4i_csi_v4l2_register()
356 vdev->v4l2_dev = &csi->v4l; in sun4i_csi_v4l2_register()
357 vdev->queue = &csi->queue; in sun4i_csi_v4l2_register()
360 vdev->lock = &csi->lock; in sun4i_csi_v4l2_register()
363 csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc; in sun4i_csi_v4l2_register()
364 csi->fmt.width = CSI_DEFAULT_WIDTH; in sun4i_csi_v4l2_register()
365 csi->fmt.height = CSI_DEFAULT_HEIGHT; in sun4i_csi_v4l2_register()
366 _sun4i_csi_try_fmt(csi, &csi->fmt); in sun4i_csi_v4l2_register()
367 csi->subdev_fmt = sun4i_csi_pad_fmt_default; in sun4i_csi_v4l2_register()
371 video_set_drvdata(vdev, csi); in sun4i_csi_v4l2_register()
373 ret = video_register_device(&csi->vdev, VFL_TYPE_VIDEO, -1); in sun4i_csi_v4l2_register()
377 dev_info(csi->dev, "Device registered as %s\n", in sun4i_csi_v4l2_register()