| .. | .. |
|---|
| 977 | 977 | struct vb2_buffer *vb2_buf = &buf->vb.vb2_buf; |
|---|
| 978 | 978 | u64 ns = 0; |
|---|
| 979 | 979 | |
|---|
| 980 | + if (stream->skip_frame) { |
|---|
| 981 | + spin_lock_irqsave(&stream->vbq_lock, lock_flags); |
|---|
| 982 | + list_add_tail(&buf->queue, &stream->buf_queue); |
|---|
| 983 | + spin_unlock_irqrestore(&stream->vbq_lock, lock_flags); |
|---|
| 984 | + if (stream->skip_frame) |
|---|
| 985 | + stream->skip_frame--; |
|---|
| 986 | + goto end; |
|---|
| 987 | + } |
|---|
| 988 | + |
|---|
| 980 | 989 | /* Dequeue a filled buffer */ |
|---|
| 981 | 990 | for (i = 0; i < isp_fmt->mplanes; i++) { |
|---|
| 982 | 991 | u32 payload_size = stream->out_fmt.plane_fmt[i].sizeimage; |
|---|
| .. | .. |
|---|
| 987 | 996 | rkisp_dmarx_get_frame(dev, &i, NULL, &ns, true); |
|---|
| 988 | 997 | buf->vb.sequence = i; |
|---|
| 989 | 998 | if (!ns) |
|---|
| 990 | | - ns = ktime_get_ns(); |
|---|
| 999 | + ns = rkisp_time_get_ns(dev); |
|---|
| 991 | 1000 | vb2_buf->timestamp = ns; |
|---|
| 992 | 1001 | |
|---|
| 993 | | - ns = ktime_get_ns(); |
|---|
| 1002 | + ns = rkisp_time_get_ns(dev); |
|---|
| 994 | 1003 | stream->dbg.interval = ns - stream->dbg.timestamp; |
|---|
| 995 | 1004 | stream->dbg.timestamp = ns; |
|---|
| 996 | 1005 | stream->dbg.id = buf->vb.sequence; |
|---|
| .. | .. |
|---|
| 1097 | 1106 | |
|---|
| 1098 | 1107 | stream->ops->enable_mi(stream); |
|---|
| 1099 | 1108 | stream->streaming = true; |
|---|
| 1100 | | - |
|---|
| 1109 | + stream->skip_frame = 0; |
|---|
| 1101 | 1110 | return 0; |
|---|
| 1102 | 1111 | } |
|---|
| 1103 | 1112 | |
|---|