| /linux/drivers/gpu/drm/virtio/ |
| H A D | virtgpu_vq.c | 94 struct virtio_gpu_vbuffer *vbuf; in virtio_gpu_panic_get_vbuf() local 96 vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_ATOMIC); in virtio_gpu_panic_get_vbuf() 98 vbuf->buf = (void *)vbuf + sizeof(*vbuf); in virtio_gpu_panic_get_vbuf() 99 vbuf->size = size; in virtio_gpu_panic_get_vbuf() 100 vbuf->resp_cb = NULL; in virtio_gpu_panic_get_vbuf() 101 vbuf->resp_size = sizeof(struct virtio_gpu_ctrl_hdr); in virtio_gpu_panic_get_vbuf() 102 vbuf->resp_buf = (void *)vbuf->buf + size; in virtio_gpu_panic_get_vbuf() 103 return vbuf; in virtio_gpu_panic_get_vbuf() 111 struct virtio_gpu_vbuffer *vbuf; in virtio_gpu_get_vbuf() local 113 vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL | __GFP_NOFAIL); in virtio_gpu_get_vbuf() [all …]
|
| /linux/drivers/staging/media/meson/vdec/ |
| H A D | vdec_helpers.c | 274 struct vb2_v4l2_buffer *vbuf, in dst_buf_done() argument 283 vb2_set_plane_payload(&vbuf->vb2_buf, 0, output_size); in dst_buf_done() 284 vb2_set_plane_payload(&vbuf->vb2_buf, 1, output_size / 2); in dst_buf_done() 287 vb2_set_plane_payload(&vbuf->vb2_buf, 0, output_size); in dst_buf_done() 288 vb2_set_plane_payload(&vbuf->vb2_buf, 1, output_size / 4); in dst_buf_done() 289 vb2_set_plane_payload(&vbuf->vb2_buf, 2, output_size / 4); in dst_buf_done() 293 vbuf->vb2_buf.timestamp = timestamp; in dst_buf_done() 294 vbuf->sequence = sess->sequence_cap++; in dst_buf_done() 295 vbuf->flags = flags; in dst_buf_done() 296 vbuf->timecode = timecode; in dst_buf_done() [all …]
|
| H A D | esparser.c | 291 esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf) in esparser_queue() argument 294 struct vb2_buffer *vb = &vbuf->vb2_buf; in esparser_queue() 325 v4l2_m2m_src_buf_remove_by_buf(sess->m2m_ctx, vbuf); in esparser_queue() 329 ret = amvdec_add_ts(sess, vb->timestamp, vbuf->timecode, offset, vbuf->flags); in esparser_queue() 331 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in esparser_queue() 336 vb->timestamp, payload_size, offset, vbuf->flags); in esparser_queue() 338 vbuf->flags = 0; in esparser_queue() 339 vbuf->field = V4L2_FIELD_NONE; in esparser_queue() 340 vbuf->sequence = sess->sequence_out++; in esparser_queue() 348 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in esparser_queue() [all …]
|
| /linux/drivers/media/platform/st/sti/delta/ |
| H A D | delta-v4l2.c | 32 #define to_au(__vbuf) container_of(__vbuf, struct delta_au, vbuf) 33 #define to_frame(__vbuf) container_of(__vbuf, struct delta_frame, vbuf) 73 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size, in dump_au() 77 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size, in dump_au() 96 struct vb2_v4l2_buffer *vbuf; in delta_au_done() local 98 vbuf = &au->vbuf; in delta_au_done() 99 vbuf->sequence = ctx->au_num++; in delta_au_done() 100 v4l2_m2m_buf_done(vbuf, err ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); in delta_au_done() 106 struct vb2_v4l2_buffer *vbuf; in delta_frame_done() local 113 vbuf = &frame->vbuf; in delta_frame_done() [all …]
|
| /linux/include/trace/events/ |
| H A D | v4l2.h | 204 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); 208 __entry->flags = vbuf->flags; 209 __entry->field = vbuf->field; 211 __entry->timecode_type = vbuf->timecode.type; 212 __entry->timecode_flags = vbuf->timecode.flags; 213 __entry->timecode_frames = vbuf->timecode.frames; 214 __entry->timecode_seconds = vbuf->timecode.seconds; 215 __entry->timecode_minutes = vbuf->timecode.minutes; 216 __entry->timecode_hours = vbuf->timecode.hours; 217 __entry->timecode_userbits0 = vbuf->timecode.userbits[0]; [all …]
|
| /linux/drivers/media/platform/amphion/ |
| H A D | vdec.c | 300 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vdec_attach_frame_store() local 301 struct vpu_vb2_buffer *vpu_buf = to_vpu_vb2_buffer(vbuf); in vdec_attach_frame_store() 311 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_CHANGED); in vdec_attach_frame_store() 314 vpu_set_buffer_state(vbuf, vdec->slots[i].state); in vdec_attach_frame_store() 333 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_ERROR); in vdec_attach_frame_store() 806 struct vb2_v4l2_buffer *vbuf; in vdec_frame_decoded() local 820 vbuf = &vpu_buf->m2m_buf.vb; in vdec_frame_decoded() 823 v4l2_m2m_buf_copy_metadata(src_buf, vbuf); in vdec_frame_decoded() 832 if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_DECODED) in vdec_frame_decoded() 834 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_DECODED); in vdec_frame_decoded() [all …]
|
| H A D | venc.c | 779 struct vb2_v4l2_buffer *vbuf) in venc_get_one_encoded_frame() argument 784 if (!vbuf) in venc_get_one_encoded_frame() 789 v4l2_m2m_buf_copy_metadata(src_buf, vbuf); in venc_get_one_encoded_frame() 794 vbuf->vb2_buf.timestamp = frame->info.timestamp; in venc_get_one_encoded_frame() 796 if (!venc_get_enable(inst->priv, vbuf->vb2_buf.type)) { in venc_get_one_encoded_frame() 797 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in venc_get_one_encoded_frame() 800 if (frame->bytesused > vbuf->vb2_buf.planes[0].length) { in venc_get_one_encoded_frame() 801 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in venc_get_one_encoded_frame() 809 void *dst = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in venc_get_one_encoded_frame() 815 vb2_set_plane_payload(&vbuf->vb2_buf, 0, frame->bytesused); in venc_get_one_encoded_frame() [all …]
|
| /linux/drivers/media/platform/qcom/iris/ |
| H A D | iris_buffer.c | 721 struct vb2_v4l2_buffer *vbuf) in iris_get_ts_metadata() argument 730 vbuf->flags &= ~mask; in iris_get_ts_metadata() 731 vbuf->flags |= inst->tss[i].flags; in iris_get_ts_metadata() 732 vbuf->timecode = inst->tss[i].tc; in iris_get_ts_metadata() 736 vbuf->flags &= ~mask; in iris_get_ts_metadata() 737 vbuf->flags |= inst->tss[inst->metadata_idx].flags; in iris_get_ts_metadata() 738 vbuf->timecode = inst->tss[inst->metadata_idx].tc; in iris_get_ts_metadata() 744 struct vb2_v4l2_buffer *vbuf; in iris_vb2_buffer_done() local 759 vbuf = iris_helper_find_buf(inst, type, buf->index); in iris_vb2_buffer_done() 760 if (!vbuf) in iris_vb2_buffer_done() [all …]
|
| /linux/drivers/media/platform/qcom/venus/ |
| H A D | helpers.c | 435 struct vb2_v4l2_buffer *vbuf) in return_buf_error() argument 439 if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) in return_buf_error() 440 v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf); in return_buf_error() 442 v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf); in return_buf_error() 444 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in return_buf_error() 448 put_ts_metadata(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) in put_ts_metadata() argument 450 struct vb2_buffer *vb = &vbuf->vb2_buf; in put_ts_metadata() 470 inst->tss[slot].flags = vbuf->flags; in put_ts_metadata() 471 inst->tss[slot].tc = vbuf->timecode; in put_ts_metadata() 477 struct vb2_v4l2_buffer *vbuf) in venus_helper_get_ts_metadata() argument [all …]
|
| H A D | helpers.h | 18 struct vb2_v4l2_buffer *vbuf, unsigned int type, 52 void venus_helper_acquire_buf_ref(struct vb2_v4l2_buffer *vbuf); 69 struct vb2_v4l2_buffer *vbuf);
|
| /linux/drivers/media/platform/st/sti/hva/ |
| H A D | hva-v4l2.c | 826 frame->vbuf.sequence = ctx->frame_num++; in hva_run_work() 937 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in hva_buf_prepare() local 940 struct hva_frame *frame = to_hva_frame(vbuf); in hva_buf_prepare() 942 if (vbuf->field == V4L2_FIELD_ANY) in hva_buf_prepare() 943 vbuf->field = V4L2_FIELD_NONE; in hva_buf_prepare() 944 if (vbuf->field != V4L2_FIELD_NONE) { in hva_buf_prepare() 947 ctx->name, vb->index, vbuf->field); in hva_buf_prepare() 953 frame->vaddr = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in hva_buf_prepare() 955 &vbuf->vb2_buf, 0); in hva_buf_prepare() 965 struct hva_stream *stream = to_hva_stream(vbuf); in hva_buf_prepare() [all …]
|
| /linux/drivers/media/platform/renesas/ |
| H A D | rcar_fdp1.c | 1182 struct vb2_v4l2_buffer *vbuf; in fdp1_prepare_job() local 1216 vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); in fdp1_prepare_job() 1217 fbuf = to_fdp1_buffer(vbuf); in fdp1_prepare_job() 1783 struct vb2_v4l2_buffer *vbuf, in fdp1_buf_prepare_field() argument 1786 struct fdp1_buffer *buf = to_fdp1_buffer(vbuf); in fdp1_buf_prepare_field() 1791 num_fields = V4L2_FIELD_HAS_BOTH(vbuf->field) ? 2 : 1; in fdp1_buf_prepare_field() 1793 fbuf->vb = vbuf; in fdp1_buf_prepare_field() 1796 for (i = 0; i < vbuf->vb2_buf.num_planes; ++i) in fdp1_buf_prepare_field() 1797 fbuf->addrs[i] = vb2_dma_contig_plane_dma_addr(&vbuf->vb2_buf, i); in fdp1_buf_prepare_field() 1799 switch (vbuf->field) { in fdp1_buf_prepare_field() [all …]
|
| /linux/drivers/media/pci/bt8xx/ |
| H A D | bttv-driver.c | 1482 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_queue() local 1485 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_queue() 1504 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_prepare() local 1505 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_prepare() 1513 buf->vbuf.field = btv->field; in buf_prepare() 1515 buf->vbuf.field = V4L2_FIELD_BOTTOM; in buf_prepare() 1518 buf->vbuf.field = V4L2_FIELD_TOP; in buf_prepare() 1530 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_cleanup() local 1531 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_cleanup() 1550 buf->vbuf.sequence = (btv->field_count >> 1) + seqnr++; in start_streaming() [all …]
|
| /linux/drivers/media/pci/zoran/ |
| H A D | zoran_device.c | 736 struct vb2_v4l2_buffer *vbuf; in zoran_feed_stat_com() local 755 vbuf = &buf->vbuf; in zoran_feed_stat_com() 756 vbuf->vb2_buf.state = VB2_BUF_STATE_ACTIVE; in zoran_feed_stat_com() 757 phys_addr = vb2_dma_contig_plane_dma_addr(&vbuf->vb2_buf, 0); in zoran_feed_stat_com() 758 payload = vb2_get_plane_payload(&vbuf->vb2_buf, 0); in zoran_feed_stat_com() 837 buf->vbuf.vb2_buf.timestamp = ktime_get_ns(); in zoran_reap_stat_com() 840 vb2_set_plane_payload(&buf->vbuf.vb2_buf, 0, size); in zoran_reap_stat_com() 847 buf->vbuf.sequence = zr->jpg_settings.tmp_dcm == in zoran_reap_stat_com() 851 buf->vbuf.field = zr->jpg_settings.odd_even ? in zoran_reap_stat_com() 854 buf->vbuf.field = zr->jpg_settings.odd_even ? in zoran_reap_stat_com() [all …]
|
| /linux/drivers/media/platform/st/stm32/dma2d/ |
| H A D | dma2d.c | 129 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in dma2d_buf_out_validate() local 131 if (vbuf->field == V4L2_FIELD_ANY) in dma2d_buf_out_validate() 132 vbuf->field = V4L2_FIELD_NONE; in dma2d_buf_out_validate() 133 if (vbuf->field != V4L2_FIELD_NONE) in dma2d_buf_out_validate() 154 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in dma2d_buf_queue() local 157 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in dma2d_buf_queue() 172 struct vb2_v4l2_buffer *vbuf; in dma2d_stop_streaming() local 176 vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in dma2d_stop_streaming() 178 vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); in dma2d_stop_streaming() 179 if (!vbuf) in dma2d_stop_streaming() [all …]
|
| /linux/drivers/media/platform/arm/mali-c55/ |
| H A D | mali-c55-params.c | 68 #define to_mali_c55_params_buf(vbuf) \ argument 69 container_of(vbuf, struct mali_c55_params_buf, vb) 556 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in mali_c55_params_buf_init() local 557 struct mali_c55_params_buf *buf = to_mali_c55_params_buf(vbuf); in mali_c55_params_buf_init() 569 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in mali_c55_params_buf_cleanup() local 570 struct mali_c55_params_buf *buf = to_mali_c55_params_buf(vbuf); in mali_c55_params_buf_cleanup() 579 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in mali_c55_params_buf_prepare() local 580 struct mali_c55_params_buf *buf = to_mali_c55_params_buf(vbuf); in mali_c55_params_buf_prepare() 606 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in mali_c55_params_buf_queue() local 607 struct mali_c55_params_buf *buf = to_mali_c55_params_buf(vbuf); in mali_c55_params_buf_queue()
|
| /linux/drivers/media/platform/st/stm32/stm32-dcmipp/ |
| H A D | dcmipp-bytecap.c | 545 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in dcmipp_bytecap_buf_prepare() local 546 struct dcmipp_buf *buf = container_of(vbuf, struct dcmipp_buf, vb); in dcmipp_bytecap_buf_prepare() 578 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb2_buf); in dcmipp_bytecap_buf_queue() local 579 struct dcmipp_buf *buf = container_of(vbuf, struct dcmipp_buf, vb); in dcmipp_bytecap_buf_queue() 626 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in dcmipp_bytecap_buf_init() local 627 struct dcmipp_buf *buf = container_of(vbuf, struct dcmipp_buf, vb); in dcmipp_bytecap_buf_init() 668 struct vb2_v4l2_buffer *vbuf; in dcmipp_buffer_done() local 672 vbuf = &buf->vb; in dcmipp_buffer_done() 674 vbuf->sequence = vcap->sequence++; in dcmipp_buffer_done() 675 vbuf->field = V4L2_FIELD_NONE; in dcmipp_buffer_done() [all …]
|
| /linux/drivers/media/pci/saa7134/ |
| H A D | saa7134-ts.c | 69 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb2); in saa7134_ts_buffer_init() local 71 struct saa7134_buf *buf = container_of(vbuf, struct saa7134_buf, vb2); in saa7134_ts_buffer_init() 82 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb2); in saa7134_ts_buffer_prepare() local 85 struct saa7134_buf *buf = container_of(vbuf, struct saa7134_buf, vb2); in saa7134_ts_buffer_prepare() 99 vbuf->field = dev->field; in saa7134_ts_buffer_prepare()
|
| H A D | saa7134-vbi.c | 109 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb2); in buffer_prepare() local 110 struct saa7134_buf *buf = container_of(vbuf, struct saa7134_buf, vb2); in buffer_prepare() 151 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb2); in buffer_init() local 152 struct saa7134_buf *buf = container_of(vbuf, struct saa7134_buf, vb2); in buffer_init()
|
| /linux/drivers/media/test-drivers/vimc/ |
| H A D | vimc-capture.c | 228 struct vimc_capture_buffer *vbuf, *node; in vimc_capture_return_all_buffers() local 232 list_for_each_entry_safe(vbuf, node, &vcapture->buf_list, list) { in vimc_capture_return_all_buffers() 233 list_del(&vbuf->list); in vimc_capture_return_all_buffers() 234 vb2_buffer_done(&vbuf->vb2.vb2_buf, state); in vimc_capture_return_all_buffers() 356 void *vbuf; in vimc_capture_process_frame() local 378 vbuf = vb2_plane_vaddr(&vimc_buf->vb2.vb2_buf, 0); in vimc_capture_process_frame() 380 memcpy(vbuf, frame, vcapture->format.sizeimage); in vimc_capture_process_frame()
|
| /linux/drivers/staging/media/imx/ |
| H A D | imx-media.h | 100 struct vb2_v4l2_buffer vbuf; /* v4l buffer must be first */ member 119 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in to_imx_media_vb() local 121 return container_of(vbuf, struct imx_media_buffer, vbuf); in to_imx_media_vb()
|
| /linux/drivers/media/pci/solo6x10/ |
| H A D | solo6x10-v4l2-enc.c | 309 struct sg_table *vbuf, int off, int size, in solo_send_desc() argument 322 for_each_sg(vbuf->sgl, sg, vbuf->nents, i) { in solo_send_desc() 452 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in solo_fill_jpeg() local 457 vbuf->flags |= V4L2_BUF_FLAG_KEYFRAME; in solo_fill_jpeg() 474 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in solo_fill_mpeg() local 484 vbuf->flags &= ~(V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_PFRAME | in solo_fill_mpeg() 488 vbuf->flags |= V4L2_BUF_FLAG_KEYFRAME; in solo_fill_mpeg() 492 vbuf->flags |= V4L2_BUF_FLAG_PFRAME; in solo_fill_mpeg() 509 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in solo_enc_fillbuf() local 524 vbuf->sequence = solo_enc->sequence++; in solo_enc_fillbuf() [all …]
|
| /linux/drivers/media/platform/renesas/vsp1/ |
| H A D | vsp1_video.h | 26 to_vsp1_vb2_buffer(struct vb2_v4l2_buffer *vbuf) in to_vsp1_vb2_buffer() argument 28 return container_of(vbuf, struct vsp1_vb2_buffer, buf); in to_vsp1_vb2_buffer()
|
| /linux/drivers/media/platform/chips-media/wave5/ |
| H A D | wave5-vpu-dec.c | 1117 struct vb2_v4l2_buffer *vbuf = &buf->vb; in wave5_prepare_fb() local 1119 ret = wave5_vpu_dec_clr_disp_flag(inst, vbuf->vb2_buf.index); in wave5_prepare_fb() 1191 struct vb2_v4l2_buffer *vbuf = &vpu_buf->v4l2_m2m_buf.vb; in fill_ringbuffer() local 1193 size_t src_size = vb2_get_plane_payload(&vbuf->vb2_buf, 0); in fill_ringbuffer() 1194 void *src_buf = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in fill_ringbuffer() 1201 vbuf->vb2_buf.index); in fill_ringbuffer() 1208 __func__, vbuf->vb2_buf.index); in fill_ringbuffer() 1225 __func__, remain_size, src_size, vbuf->vb2_buf.index); in fill_ringbuffer() 1232 vbuf->vb2_buf.index, ret); in fill_ringbuffer() 1240 ret, vbuf->vb2_buf.index); in fill_ringbuffer() [all …]
|
| /linux/drivers/media/common/saa7146/ |
| H A D | saa7146_vbi.c | 236 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_queue() local 239 struct saa7146_buf *buf = container_of(vbuf, struct saa7146_buf, vb); in buf_queue() 250 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_init() local 251 struct saa7146_buf *buf = container_of(vbuf, struct saa7146_buf, vb); in buf_init() 282 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_cleanup() local 283 struct saa7146_buf *buf = container_of(vbuf, struct saa7146_buf, vb); in buf_cleanup()
|