/linux-6.12.1/drivers/gpu/drm/virtio/ |
D | virtgpu_vq.c | 94 struct virtio_gpu_vbuffer *vbuf; in virtio_gpu_get_vbuf() local 96 vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL | __GFP_NOFAIL); in virtio_gpu_get_vbuf() 100 vbuf->buf = (void *)vbuf + sizeof(*vbuf); in virtio_gpu_get_vbuf() 101 vbuf->size = size; in virtio_gpu_get_vbuf() 103 vbuf->resp_cb = resp_cb; in virtio_gpu_get_vbuf() 104 vbuf->resp_size = resp_size; in virtio_gpu_get_vbuf() 106 vbuf->resp_buf = (void *)vbuf->buf + size; in virtio_gpu_get_vbuf() 108 vbuf->resp_buf = resp_buf; in virtio_gpu_get_vbuf() 109 BUG_ON(!vbuf->resp_buf); in virtio_gpu_get_vbuf() 110 return vbuf; in virtio_gpu_get_vbuf() [all …]
|
/linux-6.12.1/drivers/staging/media/meson/vdec/ |
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 …]
|
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-6.12.1/drivers/media/platform/amphion/ |
D | vpu_v4l2.c | 52 void vpu_set_buffer_state(struct vb2_v4l2_buffer *vbuf, unsigned int state) in vpu_set_buffer_state() argument 54 struct vpu_vb2_buffer *vpu_buf = to_vpu_vb2_buffer(vbuf); in vpu_set_buffer_state() 59 unsigned int vpu_get_buffer_state(struct vb2_v4l2_buffer *vbuf) in vpu_get_buffer_state() argument 61 struct vpu_vb2_buffer *vpu_buf = to_vpu_vb2_buffer(vbuf); in vpu_get_buffer_state() 66 void vpu_set_buffer_average_qp(struct vb2_v4l2_buffer *vbuf, u32 qp) in vpu_set_buffer_average_qp() argument 68 struct vpu_vb2_buffer *vpu_buf = to_vpu_vb2_buffer(vbuf); in vpu_set_buffer_average_qp() 290 struct vb2_v4l2_buffer *vbuf = NULL; in vpu_process_output_buffer() local 299 vbuf = &buf->vb; in vpu_process_output_buffer() 300 if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_IDLE) in vpu_process_output_buffer() 302 vbuf = NULL; in vpu_process_output_buffer() [all …]
|
D | vdec.c | 713 struct vb2_v4l2_buffer *vbuf; in vdec_frame_decoded() local 727 vbuf = &vpu_buf->m2m_buf.vb; in vdec_frame_decoded() 730 v4l2_m2m_buf_copy_metadata(src_buf, vbuf, true); in vdec_frame_decoded() 739 if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_DECODED) in vdec_frame_decoded() 741 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_DECODED); in vdec_frame_decoded() 747 vpu_set_buffer_state(vbuf, VPU_BUF_STATE_READY); in vdec_frame_decoded() 748 for (int i = 0; i < vbuf->vb2_buf.num_planes; i++) in vdec_frame_decoded() 749 vb2_set_plane_payload(&vbuf->vb2_buf, in vdec_frame_decoded() 751 vbuf->field = cur_fmt->field; in vdec_frame_decoded() 752 vbuf->sequence = vdec->sequence++; in vdec_frame_decoded() [all …]
|
D | vpu_v4l2.h | 13 void vpu_set_buffer_state(struct vb2_v4l2_buffer *vbuf, unsigned int state); 14 unsigned int vpu_get_buffer_state(struct vb2_v4l2_buffer *vbuf); 15 void vpu_set_buffer_average_qp(struct vb2_v4l2_buffer *vbuf, u32 qp); 51 static inline int vpu_vb_is_codecconfig(struct vb2_v4l2_buffer *vbuf) in vpu_vb_is_codecconfig() argument 54 return (vbuf->flags & V4L2_BUF_FLAG_CODECCONFIG) ? 1 : 0; in vpu_vb_is_codecconfig()
|
D | venc.c | 782 struct vb2_v4l2_buffer *vbuf) in venc_get_one_encoded_frame() argument 787 if (!vbuf) in venc_get_one_encoded_frame() 792 v4l2_m2m_buf_copy_metadata(src_buf, vbuf, true); in venc_get_one_encoded_frame() 797 vbuf->vb2_buf.timestamp = frame->info.timestamp; in venc_get_one_encoded_frame() 799 if (!venc_get_enable(inst->priv, vbuf->vb2_buf.type)) { in venc_get_one_encoded_frame() 800 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in venc_get_one_encoded_frame() 803 if (frame->bytesused > vbuf->vb2_buf.planes[0].length) { in venc_get_one_encoded_frame() 804 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in venc_get_one_encoded_frame() 812 void *dst = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in venc_get_one_encoded_frame() 818 vb2_set_plane_payload(&vbuf->vb2_buf, 0, frame->bytesused); in venc_get_one_encoded_frame() [all …]
|
/linux-6.12.1/drivers/media/platform/rockchip/rga/ |
D | rga-buf.c | 76 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in rga_buf_init() local 77 struct rga_vb_buffer *rbuf = vb_to_rga(vbuf); in rga_buf_init() 109 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in rga_buf_prepare() local 110 struct rga_vb_buffer *rbuf = vb_to_rga(vbuf); in rga_buf_prepare() 152 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in rga_buf_queue() local 155 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in rga_buf_queue() 160 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in rga_buf_cleanup() local 161 struct rga_vb_buffer *rbuf = vb_to_rga(vbuf); in rga_buf_cleanup() 173 struct vb2_v4l2_buffer *vbuf; in rga_buf_return_buffers() local 177 vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in rga_buf_return_buffers() [all …]
|
/linux-6.12.1/drivers/media/platform/st/sti/delta/ |
D | delta-v4l2.c | 28 #define to_au(__vbuf) container_of(__vbuf, struct delta_au, vbuf) 29 #define to_frame(__vbuf) container_of(__vbuf, struct delta_frame, vbuf) 69 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size, in dump_au() 73 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size, in dump_au() 92 struct vb2_v4l2_buffer *vbuf; in delta_au_done() local 94 vbuf = &au->vbuf; in delta_au_done() 95 vbuf->sequence = ctx->au_num++; in delta_au_done() 96 v4l2_m2m_buf_done(vbuf, err ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); in delta_au_done() 102 struct vb2_v4l2_buffer *vbuf; in delta_frame_done() local 109 vbuf = &frame->vbuf; in delta_frame_done() [all …]
|
/linux-6.12.1/include/trace/events/ |
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-6.12.1/drivers/media/common/videobuf2/ |
D | videobuf2-v4l2.c | 136 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in __init_vb2_v4l2_buffer() local 138 vbuf->request_fd = -1; in __init_vb2_v4l2_buffer() 144 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in __copy_timestamp() local 154 vbuf->flags |= b->flags & V4L2_BUF_FLAG_TIMECODE; in __copy_timestamp() 156 vbuf->timecode = b->timecode; in __copy_timestamp() 179 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vb2_fill_vb2_v4l2_buffer() local 180 struct vb2_plane *planes = vbuf->planes; in vb2_fill_vb2_v4l2_buffer() 202 vbuf->sequence = 0; in vb2_fill_vb2_v4l2_buffer() 203 vbuf->request_fd = -1; in vb2_fill_vb2_v4l2_buffer() 204 vbuf->is_held = false; in vb2_fill_vb2_v4l2_buffer() [all …]
|
/linux-6.12.1/drivers/media/pci/bt8xx/ |
D | bttv-vbi.c | 77 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_queue_vbi() local 80 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_queue_vbi() 100 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_prepare_vbi() local 101 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_prepare_vbi() 107 buf->vbuf.field = V4L2_FIELD_NONE; in buf_prepare_vbi() 115 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buf_cleanup_vbi() local 116 struct bttv_buffer *buf = container_of(vbuf, struct bttv_buffer, vbuf); in buf_cleanup_vbi() 138 buf->vbuf.sequence = (btv->field_count >> 1) + seqnr++; in start_streaming_vbi() 139 vb2_buffer_done(&buf->vbuf.vb2_buf, in start_streaming_vbi()
|
/linux-6.12.1/drivers/media/platform/chips-media/wave5/ |
D | wave5-vpu.h | 57 static inline struct vpu_src_buffer *wave5_to_vpu_src_buf(struct vb2_v4l2_buffer *vbuf) in wave5_to_vpu_src_buf() argument 59 return container_of(vbuf, struct vpu_src_buffer, v4l2_m2m_buf.vb); in wave5_to_vpu_src_buf() 62 static inline struct vpu_dst_buffer *wave5_to_vpu_dst_buf(struct vb2_v4l2_buffer *vbuf) in wave5_to_vpu_dst_buf() argument 64 return container_of(vbuf, struct vpu_dst_buffer, v4l2_m2m_buf.vb); in wave5_to_vpu_dst_buf()
|
D | wave5-helper.c | 220 struct vb2_v4l2_buffer *vbuf; in wave5_return_bufs() local 224 vbuf = v4l2_m2m_src_buf_remove(m2m_ctx); in wave5_return_bufs() 226 vbuf = v4l2_m2m_dst_buf_remove(m2m_ctx); in wave5_return_bufs() 227 if (!vbuf) in wave5_return_bufs() 229 v4l2_ctrl_request_complete(vbuf->vb2_buf.req_obj.req, &v4l2_ctrl_hdl); in wave5_return_bufs() 230 v4l2_m2m_buf_done(vbuf, state); in wave5_return_bufs()
|
/linux-6.12.1/include/media/ |
D | v4l2-mem2mem.h | 300 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_is_last_draining_src_buf() argument 302 return m2m_ctx->is_draining && vbuf == m2m_ctx->last_src_buf; in v4l2_m2m_is_last_draining_src_buf() 312 struct vb2_v4l2_buffer *vbuf); 592 struct vb2_v4l2_buffer *vbuf); 797 struct vb2_v4l2_buffer *vbuf); 807 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_src_buf_remove_by_buf() argument 809 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->out_q_ctx, vbuf); in v4l2_m2m_src_buf_remove_by_buf() 820 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_dst_buf_remove_by_buf() argument 822 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->cap_q_ctx, vbuf); in v4l2_m2m_dst_buf_remove_by_buf()
|
/linux-6.12.1/drivers/media/platform/qcom/venus/ |
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 …]
|
/linux-6.12.1/drivers/media/platform/ti/omap/ |
D | omap_voutdef.h | 120 struct vb2_v4l2_buffer vbuf; member 126 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vb2_to_omap_vout_buffer() local 128 return container_of(vbuf, struct omap_vout_buffer, vbuf); in vb2_to_omap_vout_buffer()
|
/linux-6.12.1/drivers/staging/media/sunxi/cedrus/ |
D | cedrus_video.c | 457 struct vb2_v4l2_buffer *vbuf; in cedrus_queue_cleanup() local 461 vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in cedrus_queue_cleanup() 463 vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); in cedrus_queue_cleanup() 465 if (!vbuf) in cedrus_queue_cleanup() 468 v4l2_ctrl_request_complete(vbuf->vb2_buf.req_obj.req, in cedrus_queue_cleanup() 470 v4l2_m2m_buf_done(vbuf, state); in cedrus_queue_cleanup() 476 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in cedrus_buf_out_validate() local 478 vbuf->field = V4L2_FIELD_NONE; in cedrus_buf_out_validate() 552 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in cedrus_buf_queue() local 555 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in cedrus_buf_queue()
|
/linux-6.12.1/drivers/net/ethernet/8390/ |
D | mcf8390.c | 77 void ei_insb(u32 addr, void *vbuf, int len) in ei_insb() argument 82 buf = (u8 *) vbuf; in ei_insb() 90 void ei_insw(u32 addr, void *vbuf, int len) in ei_insw() argument 95 buf = (u16 *) vbuf; in ei_insw() 103 void ei_outsb(u32 addr, const void *vbuf, int len) in ei_outsb() argument 108 buf = (u8 *) vbuf; in ei_outsb() 116 void ei_outsw(u32 addr, const void *vbuf, int len) in ei_outsw() argument 121 buf = (u16 *) vbuf; in ei_outsw()
|
/linux-6.12.1/drivers/media/test-drivers/vivid/ |
D | vivid-vbi-cap.c | 86 u8 *vbuf = vb2_plane_vaddr(&buf->vb.vb2_buf, 0); in vivid_raw_vbi_cap_process() local 95 memset(vbuf, 0x10, vb2_plane_size(&buf->vb.vb2_buf, 0)); in vivid_raw_vbi_cap_process() 98 vivid_vbi_gen_raw(&dev->vbi_gen, &vbi, vbuf); in vivid_raw_vbi_cap_process() 105 struct v4l2_sliced_vbi_data *vbuf = in vivid_sliced_vbi_cap_process() local 114 memset(vbuf, 0, vb2_plane_size(&buf->vb.vb2_buf, 0)); in vivid_sliced_vbi_cap_process() 119 vbuf[i] = dev->vbi_gen.data[i]; in vivid_sliced_vbi_cap_process() 174 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vbi_cap_buf_queue() local 176 struct vivid_buffer *buf = container_of(vbuf, struct vivid_buffer, vb); in vbi_cap_buf_queue()
|
/linux-6.12.1/drivers/media/pci/cx23885/ |
D | cx23885-vbi.c | 130 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_prepare() local 132 struct cx23885_buffer *buf = container_of(vbuf, in buffer_prepare() 154 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_finish() local 155 struct cx23885_buffer *buf = container_of(vbuf, in buffer_finish() 184 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_queue() local 186 struct cx23885_buffer *buf = container_of(vbuf, in buffer_queue()
|
/linux-6.12.1/drivers/media/pci/cx88/ |
D | cx88-vbi.c | 131 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_prepare() local 133 struct cx88_buffer *buf = container_of(vbuf, struct cx88_buffer, vb); in buffer_prepare() 155 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_finish() local 157 struct cx88_buffer *buf = container_of(vbuf, struct cx88_buffer, vb); in buffer_finish() 168 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_queue() local 170 struct cx88_buffer *buf = container_of(vbuf, struct cx88_buffer, vb); in buffer_queue()
|
/linux-6.12.1/drivers/media/platform/st/sti/hva/ |
D | hva-v4l2.c | 823 frame->vbuf.sequence = ctx->frame_num++; in hva_run_work() 934 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in hva_buf_prepare() local 937 struct hva_frame *frame = to_hva_frame(vbuf); in hva_buf_prepare() 939 if (vbuf->field == V4L2_FIELD_ANY) in hva_buf_prepare() 940 vbuf->field = V4L2_FIELD_NONE; in hva_buf_prepare() 941 if (vbuf->field != V4L2_FIELD_NONE) { in hva_buf_prepare() 944 ctx->name, vb->index, vbuf->field); in hva_buf_prepare() 950 frame->vaddr = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in hva_buf_prepare() 952 &vbuf->vb2_buf, 0); in hva_buf_prepare() 962 struct hva_stream *stream = to_hva_stream(vbuf); in hva_buf_prepare() [all …]
|
/linux-6.12.1/drivers/media/platform/renesas/ |
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() 1786 struct vb2_v4l2_buffer *vbuf, in fdp1_buf_prepare_field() argument 1789 struct fdp1_buffer *buf = to_fdp1_buffer(vbuf); in fdp1_buf_prepare_field() 1794 num_fields = V4L2_FIELD_HAS_BOTH(vbuf->field) ? 2 : 1; in fdp1_buf_prepare_field() 1796 fbuf->vb = vbuf; in fdp1_buf_prepare_field() 1799 for (i = 0; i < vbuf->vb2_buf.num_planes; ++i) in fdp1_buf_prepare_field() 1800 fbuf->addrs[i] = vb2_dma_contig_plane_dma_addr(&vbuf->vb2_buf, i); in fdp1_buf_prepare_field() 1802 switch (vbuf->field) { in fdp1_buf_prepare_field() [all …]
|
/linux-6.12.1/drivers/media/test-drivers/visl/ |
D | visl-video.c | 600 struct vb2_v4l2_buffer *vbuf; in visl_queue_cleanup() local 605 vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in visl_queue_cleanup() 607 vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); in visl_queue_cleanup() 609 if (!vbuf) in visl_queue_cleanup() 612 v4l2_ctrl_request_complete(vbuf->vb2_buf.req_obj.req, in visl_queue_cleanup() 615 vbuf->vb2_buf.req_obj.req); in visl_queue_cleanup() 617 v4l2_m2m_buf_done(vbuf, state); in visl_queue_cleanup() 620 vbuf->vb2_buf.timestamp, in visl_queue_cleanup() 627 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in visl_buf_out_validate() local 629 vbuf->field = V4L2_FIELD_NONE; in visl_buf_out_validate() [all …]
|