| .. | .. |
|---|
| 82 | 82 | struct rkisp_luma_vdev *params = video_drvdata(filp); |
|---|
| 83 | 83 | int ret; |
|---|
| 84 | 84 | |
|---|
| 85 | + if (!params->dev->is_probe_end) |
|---|
| 86 | + return -EINVAL; |
|---|
| 87 | + |
|---|
| 85 | 88 | ret = v4l2_fh_open(filp); |
|---|
| 86 | 89 | if (!ret) { |
|---|
| 87 | | - ret = v4l2_pipeline_pm_use(¶ms->vnode.vdev.entity, 1); |
|---|
| 90 | + ret = v4l2_pipeline_pm_get(¶ms->vnode.vdev.entity); |
|---|
| 88 | 91 | if (ret < 0) |
|---|
| 89 | 92 | vb2_fop_release(filp); |
|---|
| 90 | 93 | } |
|---|
| .. | .. |
|---|
| 98 | 101 | int ret; |
|---|
| 99 | 102 | |
|---|
| 100 | 103 | ret = vb2_fop_release(file); |
|---|
| 101 | | - if (!ret) { |
|---|
| 102 | | - ret = v4l2_pipeline_pm_use(&luma->vnode.vdev.entity, 0); |
|---|
| 103 | | - if (ret < 0) |
|---|
| 104 | | - v4l2_err(&luma->dev->v4l2_dev, |
|---|
| 105 | | - "set pipeline power failed %d\n", ret); |
|---|
| 106 | | - } |
|---|
| 104 | + if (!ret) |
|---|
| 105 | + v4l2_pipeline_pm_put(&luma->vnode.vdev.entity); |
|---|
| 107 | 106 | return ret; |
|---|
| 108 | 107 | } |
|---|
| 109 | 108 | |
|---|
| .. | .. |
|---|
| 397 | 396 | |
|---|
| 398 | 397 | if (send_task) { |
|---|
| 399 | 398 | luma_vdev->work.readout = RKISP_ISP_READOUT_LUMA; |
|---|
| 400 | | - luma_vdev->work.timestamp = ktime_get_ns(); |
|---|
| 399 | + luma_vdev->work.timestamp = rkisp_time_get_ns(luma_vdev->dev); |
|---|
| 401 | 400 | luma_vdev->work.frame_id = cur_frame_id; |
|---|
| 402 | 401 | |
|---|
| 403 | 402 | if (frm_mode == RKISP_LUMA_THREEFRM) |
|---|
| .. | .. |
|---|
| 473 | 472 | if (ret < 0) |
|---|
| 474 | 473 | goto err_release_queue; |
|---|
| 475 | 474 | |
|---|
| 476 | | - ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); |
|---|
| 475 | + ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1); |
|---|
| 477 | 476 | if (ret < 0) { |
|---|
| 478 | 477 | dev_err(&vdev->dev, |
|---|
| 479 | 478 | "could not register Video for Linux device\n"); |
|---|