/linux/drivers/gpu/drm/virtio/ |
H A 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/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 …]
|
H A D | vdec_helpers.h | 45 struct vb2_v4l2_buffer *vbuf, u32 field); 47 struct vb2_v4l2_buffer *vbuf,
|
H A D | codec_vp9.c | 427 struct vb2_v4l2_buffer *vbuf; member 673 amvdec_dst_buf_done(sess, tmp->vbuf, in codec_vp9_flush_output() 676 v4l2_m2m_buf_queue(sess->m2m_ctx, tmp->vbuf); in codec_vp9_flush_output() 1192 struct vb2_v4l2_buffer *vbuf; in codec_vp9_get_new_frame() local 1199 vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx); in codec_vp9_get_new_frame() 1200 if (!vbuf) { in codec_vp9_get_new_frame() 1206 while (codec_vp9_get_frame_by_idx(vp9, vbuf->vb2_buf.index)) { in codec_vp9_get_new_frame() 1207 struct vb2_v4l2_buffer *old_vbuf = vbuf; in codec_vp9_get_new_frame() 1209 vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx); in codec_vp9_get_new_frame() 1211 if (!vbuf) { in codec_vp9_get_new_frame() [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 | 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 …]
|
H A 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()
|
H A D | vpu_dbg.c | 144 struct vb2_v4l2_buffer *vbuf; in vpu_dbg_instance() local 153 vbuf = to_vb2_v4l2_buffer(vb); in vpu_dbg_instance() 158 to_vpu_stat_name(vpu_get_buffer_state(vbuf))); in vpu_dbg_instance() 166 struct vb2_v4l2_buffer *vbuf; in vpu_dbg_instance() local 175 vbuf = to_vb2_v4l2_buffer(vb); in vpu_dbg_instance() 180 to_vpu_stat_name(vpu_get_buffer_state(vbuf))); in vpu_dbg_instance()
|
/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/include/media/ |
H A 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/drivers/media/common/v4l2-tpg/ |
H A D | v4l2-tpg-core.c | 2198 u8 *basep[TPG_MAX_PLANES][2], unsigned p, u8 *vbuf) in tpg_calc_text_basep() argument 2205 basep[p][0] = vbuf; in tpg_calc_text_basep() 2206 basep[p][1] = vbuf; in tpg_calc_text_basep() 2213 tpg_calc_text_basep(tpg, basep, 1, vbuf); in tpg_calc_text_basep() 2351 unsigned p, unsigned h, u8 *vbuf) in tpg_fill_plane_extras() argument 2368 memcpy(vbuf, wss, params->wss_width); in tpg_fill_plane_extras() 2379 memcpy(vbuf + left, tpg->contrast_line[p], in tpg_fill_plane_extras() 2384 memcpy(vbuf + left, in tpg_fill_plane_extras() 2388 memcpy(vbuf + right - twopixsize, in tpg_fill_plane_extras() 2394 memcpy(vbuf, tpg->black_line[p], params->left_pillar_width); in tpg_fill_plane_extras() [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 …]
|
H A D | zoran.h | 36 struct vb2_v4l2_buffer vbuf; member 42 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vb2_to_zr_buffer() local 44 return container_of(vbuf, struct zr_buffer, vbuf); in vb2_to_zr_buffer()
|
/linux/drivers/media/platform/st/sti/hva/ |
H A D | hva.h | 116 struct vb2_v4l2_buffer vbuf; member 128 container_of(vb, struct hva_frame, vbuf) 142 struct vb2_v4l2_buffer vbuf; member 155 container_of(vb, struct hva_stream, vbuf)
|
/linux/drivers/media/platform/verisilicon/ |
H A D | hantro_v4l2.c | 869 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in hantro_buf_queue() local 879 vbuf->field = V4L2_FIELD_NONE; in hantro_buf_queue() 880 vbuf->sequence = ctx->sequence_cap++; in hantro_buf_queue() 882 v4l2_m2m_last_buffer_done(ctx->fh.m2m_ctx, vbuf); in hantro_buf_queue() 887 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in hantro_buf_queue() 946 struct vb2_v4l2_buffer *vbuf; in hantro_return_bufs() local 948 vbuf = buf_remove(ctx->fh.m2m_ctx); in hantro_return_bufs() 949 if (!vbuf) in hantro_return_bufs() 951 v4l2_ctrl_request_complete(vbuf->vb2_buf.req_obj.req, in hantro_return_bufs() 953 v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR); in hantro_return_bufs() [all …]
|
/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/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/pci/mgb4/ |
H A D | mgb4_io.h | 29 static inline struct mgb4_frame_buffer *to_frame_buffer(struct vb2_v4l2_buffer *vbuf) in to_frame_buffer() argument 31 return container_of(vbuf, struct mgb4_frame_buffer, vb); in to_frame_buffer()
|
/linux/drivers/media/platform/atmel/ |
H A D | atmel-isi.c | 177 struct vb2_v4l2_buffer *vbuf = &isi->active->vb; in atmel_isi_handle_streaming() local 181 vbuf->vb2_buf.timestamp = ktime_get_ns(); in atmel_isi_handle_streaming() 182 vbuf->sequence = isi->sequence++; in atmel_isi_handle_streaming() 183 vbuf->field = V4L2_FIELD_NONE; in atmel_isi_handle_streaming() 184 vb2_buffer_done(&vbuf->vb2_buf, VB2_BUF_STATE_DONE); in atmel_isi_handle_streaming() 297 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_init() local 298 struct frame_buffer *buf = container_of(vbuf, struct frame_buffer, vb); in buffer_init() 308 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_prepare() local 309 struct frame_buffer *buf = container_of(vbuf, struct frame_buffer, vb); in buffer_prepare() 349 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in buffer_cleanup() local [all …]
|
/linux/drivers/media/test-drivers/vicodec/ |
H A D | vicodec-core.c | 1390 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vicodec_buf_out_validate() local 1392 vbuf->field = V4L2_FIELD_NONE; in vicodec_buf_out_validate() 1398 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vicodec_buf_prepare() local 1406 if (vbuf->field == V4L2_FIELD_ANY) in vicodec_buf_prepare() 1407 vbuf->field = V4L2_FIELD_NONE; in vicodec_buf_prepare() 1408 if (vbuf->field != V4L2_FIELD_NONE) { in vicodec_buf_prepare() 1428 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in vicodec_buf_queue() local 1430 unsigned int sz = vb2_get_plane_payload(&vbuf->vb2_buf, 0); in vicodec_buf_queue() 1431 u8 *p_src = vb2_plane_vaddr(&vbuf->vb2_buf, 0); in vicodec_buf_queue() 1451 vbuf->field = V4L2_FIELD_NONE; in vicodec_buf_queue() [all …]
|
/linux/drivers/media/v4l2-core/ |
H A D | v4l2-mem2mem.c | 192 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_buf_remove_by_buf() argument 198 b = container_of(vbuf, struct v4l2_m2m_buffer, vb); in v4l2_m2m_buf_remove_by_buf() 635 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_last_buffer_done() argument 637 vbuf->flags |= V4L2_BUF_FLAG_LAST; in v4l2_m2m_last_buffer_done() 638 vb2_buffer_done(&vbuf->vb2_buf, VB2_BUF_STATE_DONE); in v4l2_m2m_last_buffer_done() 736 struct vb2_v4l2_buffer *vbuf; in v4l2_m2m_force_last_buf_done() local 755 vbuf = to_vb2_v4l2_buffer(vb); in v4l2_m2m_force_last_buf_done() 756 vbuf->field = V4L2_FIELD_NONE; in v4l2_m2m_force_last_buf_done() 758 v4l2_m2m_last_buffer_done(m2m_ctx, vbuf); in v4l2_m2m_force_last_buf_done() 1284 struct vb2_v4l2_buffer *vbuf) in v4l2_m2m_buf_queue() argument [all …]
|
/linux/drivers/media/test-drivers/vivid/ |
H A D | vivid-kthread-cap.c | 206 void *vbuf; in plane_vaddr() local 210 vbuf = vb2_plane_vaddr(&buf->vb.vb2_buf, 0); in plane_vaddr() 212 vbuf += bpl[i] * h / tpg->vdownsampling[i]; in plane_vaddr() 213 return vbuf; in plane_vaddr() 455 void *vbuf = plane_vaddr(tpg, buf, p, in vivid_fillbuff() local 464 memset(vbuf, dev->fmt_cap->data_offset[p] & 0xff, in vivid_fillbuff() 466 vbuf += dev->fmt_cap->data_offset[p]; in vivid_fillbuff() 468 tpg_calc_text_basep(tpg, basep, p, vbuf); in vivid_fillbuff() 469 if (!out_dev || vivid_copy_buffer(dev, out_dev, p, vbuf, buf)) in vivid_fillbuff() 471 p, vbuf); in vivid_fillbuff()
|
/linux/mm/kmsan/ |
H A D | kmsan_test.c | 321 void *vbuf; in test_init_kmsan_vmap_vunmap() local 328 vbuf = vmap(pages, npages, VM_MAP, PAGE_KERNEL); in test_init_kmsan_vmap_vunmap() 329 memset(vbuf, 0xfe, npages * PAGE_SIZE); in test_init_kmsan_vmap_vunmap() 333 if (vbuf) in test_init_kmsan_vmap_vunmap() 334 vunmap(vbuf); in test_init_kmsan_vmap_vunmap()
|