Lines Matching refs:vbuf
627 struct vb2_v4l2_buffer *vbuf; in vdec_frame_decoded() local
641 vbuf = &vpu_buf->m2m_buf.vb; in vdec_frame_decoded()
644 v4l2_m2m_buf_copy_metadata(src_buf, vbuf, true); in vdec_frame_decoded()
653 if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_DECODED) in vdec_frame_decoded()
655 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_DECODED); in vdec_frame_decoded()
682 struct vb2_v4l2_buffer *vbuf; in vdec_buf_done() local
702 vbuf = &vpu_buf->m2m_buf.vb; in vdec_buf_done()
703 if (vbuf->vb2_buf.index != frame->id) in vdec_buf_done()
705 inst->id, vbuf->vb2_buf.index, frame->id); in vdec_buf_done()
707 if (vpu_get_buffer_state(vbuf) != VPU_BUF_STATE_DECODED) in vdec_buf_done()
709 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_READY); in vdec_buf_done()
710 vb2_set_plane_payload(&vbuf->vb2_buf, 0, inst->cap_format.sizeimage[0]); in vdec_buf_done()
711 vb2_set_plane_payload(&vbuf->vb2_buf, 1, inst->cap_format.sizeimage[1]); in vdec_buf_done()
712 vbuf->field = inst->cap_format.field; in vdec_buf_done()
713 vbuf->sequence = sequence; in vdec_buf_done()
714 dev_dbg(inst->dev, "[%d][OUTPUT TS]%32lld\n", inst->id, vbuf->vb2_buf.timestamp); in vdec_buf_done()
716 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_DONE); in vdec_buf_done()
934 static int vdec_response_frame(struct vpu_inst *inst, struct vb2_v4l2_buffer *vbuf) in vdec_response_frame() argument
950 if (!vbuf) in vdec_response_frame()
953 if (vdec->slots[vbuf->vb2_buf.index]) { in vdec_response_frame()
955 inst->id, vbuf->vb2_buf.index); in vdec_response_frame()
960 inst->id, inst->state, vbuf->vb2_buf.index, vdec->seq_tag); in vdec_response_frame()
961 vpu_buf = to_vpu_vb2_buffer(vbuf); in vdec_response_frame()
964 info.id = vbuf->vb2_buf.index; in vdec_response_frame()
967 info.luma_addr = vpu_get_vb_phy_addr(&vbuf->vb2_buf, 0); in vdec_response_frame()
969 info.chroma_addr = vpu_get_vb_phy_addr(&vbuf->vb2_buf, 1); in vdec_response_frame()
980 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_INUSE); in vdec_response_frame()
1031 static void vdec_recycle_buffer(struct vpu_inst *inst, struct vb2_v4l2_buffer *vbuf) in vdec_recycle_buffer() argument
1035 if (vbuf->vb2_buf.state != VB2_BUF_STATE_ACTIVE) in vdec_recycle_buffer()
1037 if (vpu_find_buf_by_idx(inst, vbuf->vb2_buf.type, vbuf->vb2_buf.index)) in vdec_recycle_buffer()
1039 v4l2_m2m_buf_queue(inst->fh.m2m_ctx, vbuf); in vdec_recycle_buffer()
1046 struct vb2_v4l2_buffer *vbuf; in vdec_clear_slots() local
1054 vbuf = &vpu_buf->m2m_buf.vb; in vdec_clear_slots()
1058 vdec_recycle_buffer(inst, vbuf); in vdec_clear_slots()
1161 struct vb2_v4l2_buffer *vbuf; in vdec_evnet_rel_fs() local
1182 vbuf = &vpu_buf->m2m_buf.vb; in vdec_evnet_rel_fs()
1183 if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_DECODED) { in vdec_evnet_rel_fs()
1189 if (vpu_get_buffer_state(vbuf) != VPU_BUF_STATE_READY) in vdec_evnet_rel_fs()
1190 vdec_recycle_buffer(inst, vbuf); in vdec_evnet_rel_fs()
1192 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_IDLE); in vdec_evnet_rel_fs()
1243 struct vb2_v4l2_buffer *vbuf; in vdec_process_output() local
1248 vbuf = to_vb2_v4l2_buffer(vb); in vdec_process_output()
1250 inst->id, vbuf->sequence, vb->index, vb2_get_plane_payload(vb, 0)); in vdec_process_output()
1268 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_INUSE); in vdec_process_output()
1285 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vdec_process_capture() local
1293 ret = vdec_response_frame(inst, vbuf); in vdec_process_capture()
1296 v4l2_m2m_dst_buf_remove_by_buf(inst->fh.m2m_ctx, vbuf); in vdec_process_capture()