Home
last modified time | relevance | path

Searched refs:bytesused (Results 1 – 25 of 51) sorted by relevance

123

/drivers/media/pci/ivtv/
Divtv-queue.c15 if (s->buf_size - buf->bytesused < copybytes) in ivtv_buf_copy_from_user()
16 copybytes = s->buf_size - buf->bytesused; in ivtv_buf_copy_from_user()
17 if (copy_from_user(buf->buf + buf->bytesused, src, copybytes)) { in ivtv_buf_copy_from_user()
20 buf->bytesused += copybytes; in ivtv_buf_copy_from_user()
28 for (i = 0; i < buf->bytesused; i += 4) in ivtv_buf_swap()
37 q->bytesused = 0; in ivtv_queue_init()
46 buf->bytesused = 0; in ivtv_enqueue()
55 q->bytesused += buf->bytesused - buf->readpos; in ivtv_enqueue()
70 q->bytesused -= buf->bytesused - buf->readpos; in ivtv_dequeue()
84 from->bytesused -= buf->bytesused - buf->readpos; in ivtv_queue_move_buf()
[all …]
Divtv-irq.c49 if (buf->readpos < buf->bytesused) in ivtv_pcm_work_handler()
52 (size_t)(buf->bytesused - buf->readpos)); in ivtv_pcm_work_handler()
225 buf->bytesused = min(size, s->buf_size); in stream_enc_dma_append()
228 s->q_predma.bytesused += buf->bytesused; in stream_enc_dma_append()
229 size -= buf->bytesused; in stream_enc_dma_append()
288 buf->bytesused -= offset; in dma_post()
289 memcpy(buf->buf, buf->buf + offset, buf->bytesused + offset); in dma_post()
300 buf->bytesused += s->dma_last_offset; in dma_post()
304 s->q_dma.bytesused -= buf->bytesused; in dma_post()
306 s->q_dma.bytesused += buf->bytesused; in dma_post()
[all …]
Divtv-fileops.c222 if (buf->readpos != buf->bytesused) { in ivtv_get_buffer()
282 itv->vbi.sliced_mpeg_buf.bytesused = itv->vbi.sliced_mpeg_size[idx]; in ivtv_setup_sliced_vbi_buf()
290 size_t len = buf->bytesused - buf->readpos; in ivtv_copy_buf_to_user()
303 if ((char *)q + 15 >= buf->buf + buf->bytesused || in ivtv_copy_buf_to_user()
385 ivtv_enqueue(s, buf, (buf->readpos == buf->bytesused) ? &s->q_free : &s->q_io); in ivtv_read()
387 else if (buf->readpos == buf->bytesused) { in ivtv_read()
391 itv->vbi_data_inserted += buf->bytesused; in ivtv_read()
605 IVTV_DEBUG_HI_FILE("Wrote %d bytes to %s (%d)\n", bytes_written, s->name, s->q_full.bytesused); in ivtv_write()
612 while (q.length - q.bytesused < count && (buf = ivtv_dequeue(s, &s->q_io))) in ivtv_write()
614 while (q.length - q.bytesused < count && (buf = ivtv_dequeue(s, &s->q_free))) { in ivtv_write()
[all …]
Divtv-vbi.c367 u32 size = buf->bytesused; in ivtv_process_vbi_data()
378 size = buf->bytesused = compress_raw_buf(itv, p, size); in ivtv_process_vbi_data()
412 buf->bytesused = size = lines * sizeof(itv->vbi.sliced_data[0]); in ivtv_process_vbi_data()
444 buf->bytesused = cnt; in ivtv_process_vbi_data()
/drivers/media/pci/cx18/
Dcx18-queue.c21 for (i = 0; i < buf->bytesused; i += 4) in cx18_buf_swap()
30 if (buf->bytesused == 0) in _cx18_mdl_swap()
40 q->bytesused = 0; in cx18_queue_init()
48 mdl->bytesused = 0; in _cx18_enqueue()
66 q->bytesused += mdl->bytesused - mdl->readpos; in _cx18_enqueue()
81 q->bytesused -= mdl->bytesused - mdl->readpos; in cx18_dequeue()
94 u32 bytesused = mdl->bytesused; in _cx18_mdl_update_bufs_for_cpu() local
98 if (bytesused >= buf_size) { in _cx18_mdl_update_bufs_for_cpu()
99 buf->bytesused = buf_size; in _cx18_mdl_update_bufs_for_cpu()
100 bytesused -= buf_size; in _cx18_mdl_update_bufs_for_cpu()
[all …]
Dcx18-mailbox.c126 if (s->dvb == NULL || !s->dvb->enabled || mdl->bytesused == 0) in cx18_mdl_send_to_dvb()
135 if (buf->bytesused) in cx18_mdl_send_to_dvb()
137 buf->buf, buf->bytesused); in cx18_mdl_send_to_dvb()
142 if (buf->bytesused == 0) in cx18_mdl_send_to_dvb()
144 dvb_dmx_swfilter(&s->dvb->demux, buf->buf, buf->bytesused); in cx18_mdl_send_to_dvb()
157 if (mdl->bytesused == 0) in cx18_mdl_send_to_videobuf()
174 if (buf->bytesused == 0) in cx18_mdl_send_to_videobuf()
177 if ((offset + buf->bytesused) <= vb_buf->vb.bsize) { in cx18_mdl_send_to_videobuf()
178 memcpy(p + offset, buf->buf, buf->bytesused); in cx18_mdl_send_to_videobuf()
179 offset += buf->bytesused; in cx18_mdl_send_to_videobuf()
[all …]
Dcx18-vbi.c188 u32 size = buf->bytesused; in _cx18_process_vbi_data()
202 size = buf->bytesused = in _cx18_process_vbi_data()
229 buf->bytesused = size = lines * sizeof(cx->vbi.sliced_data[0]); in _cx18_process_vbi_data()
257 orig_used = buf->bytesused; in cx18_process_vbi_data()
261 mdl->bytesused -= (orig_used - buf->bytesused); in cx18_process_vbi_data()
Dcx18-fileops.c196 if (mdl->readpos != mdl->bytesused) in cx18_get_mdl()
251 buf->bytesused = cx->vbi.sliced_mpeg_size[idx]; in cx18_setup_sliced_vbi_mdl()
255 mdl->bytesused = cx->vbi.sliced_mpeg_size[idx]; in cx18_setup_sliced_vbi_mdl()
263 size_t len = buf->bytesused - buf->readpos; in cx18_copy_buf_to_user()
306 if ((char *)q + 15 >= buf->buf + buf->bytesused || in cx18_copy_buf_to_user()
380 mdl->readpos = mdl->bytesused; in cx18_copy_mdl_to_user()
386 if (mdl->curr_buf->readpos >= mdl->curr_buf->bytesused) in cx18_copy_mdl_to_user()
398 mdl->curr_buf->readpos < mdl->curr_buf->bytesused || in cx18_copy_mdl_to_user()
399 mdl->readpos >= mdl->bytesused) /* MDL buffers drained */ in cx18_copy_mdl_to_user()
449 if (mdl->readpos == mdl->bytesused) in cx18_read()
[all …]
Dcx18-ioctl.c687 remaining = buf->bytesused - buf->readpos; in _cx18_process_idx_data()
740 mdl->readpos = mdl->bytesused; in cx18_process_idx_data()
747 if (mdl->curr_buf->readpos >= mdl->curr_buf->bytesused) in cx18_process_idx_data()
754 mdl->curr_buf->readpos < mdl->curr_buf->bytesused || in cx18_process_idx_data()
755 mdl->readpos >= mdl->bytesused) in cx18_process_idx_data()
792 if (mdl->readpos < mdl->bytesused) { in cx18_g_enc_index()
Dcx18-driver.h292 u32 bytesused; member
306 u32 bytesused; member
313 u32 bytesused; member
/drivers/media/usb/uvc/
Duvc_isight.c72 if (is_header && buf->bytesused != 0) { in isight_decode()
81 maxlen = buf->length - buf->bytesused; in isight_decode()
82 mem = buf->mem + buf->bytesused; in isight_decode()
85 buf->bytesused += nbytes; in isight_decode()
87 if (len > maxlen || buf->bytesused == buf->length) { in isight_decode()
Duvc_queue.c124 buf->bytesused = 0; in uvc_buffer_prepare()
126 buf->bytesused = vb2_get_plane_payload(vb, 0); in uvc_buffer_prepare()
470 buf->bytesused = 0; in uvc_queue_buffer_requeue()
488 vb2_set_plane_payload(&buf->buf.vb2_buf, 0, buf->bytesused); in uvc_queue_buffer_complete()
Duvc_video.c1120 if (fid != stream->last_fid && buf->bytesused != 0) { in uvc_video_decode_start()
1169 maxlen = buf->length - buf->bytesused; in uvc_video_decode_data()
1176 op->dst = buf->mem + buf->bytesused; in uvc_video_decode_data()
1179 buf->bytesused += op->len; in uvc_video_decode_data()
1195 if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) { in uvc_video_decode_end()
1234 nbytes = min((unsigned int)len, buf->bytesused - queue->buf_used); in uvc_video_encode_data()
1274 if (meta_buf->length - meta_buf->bytesused < in uvc_video_decode_meta()
1300 meta = (struct uvc_meta_buf *)((u8 *)meta_buf->mem + meta_buf->bytesused); in uvc_video_decode_meta()
1314 meta_buf->bytesused += length + sizeof(meta->ns) + sizeof(meta->sof); in uvc_video_decode_meta()
1335 if (stream->ctrl.dwMaxVideoFrameSize != buf->bytesused && in uvc_video_validate_buffer()
[all …]
/drivers/media/common/videobuf2/
Dvideobuf2-v4l2.c98 unsigned int bytesused; in __verify_length() local
110 bytesused = b->m.planes[plane].bytesused in __verify_length()
111 ? b->m.planes[plane].bytesused : length; in __verify_length()
113 if (b->m.planes[plane].bytesused > length) in __verify_length()
117 b->m.planes[plane].data_offset >= bytesused) in __verify_length()
124 if (b->bytesused > length) in __verify_length()
256 if (psrc->bytesused == 0) in vb2_fill_vb2_v4l2_buffer()
260 pdst->bytesused = psrc->bytesused; in vb2_fill_vb2_v4l2_buffer()
262 pdst->bytesused = psrc->bytesused ? in vb2_fill_vb2_v4l2_buffer()
263 psrc->bytesused : pdst->length; in vb2_fill_vb2_v4l2_buffer()
[all …]
/drivers/media/usb/go7007/
Dgo7007-driver.c381 if (vb && vb->vb.vb2_buf.planes[0].bytesused < GO7007_BUF_SIZE) { in store_byte()
384 ptr[vb->vb.vb2_buf.planes[0].bytesused++] = byte; in store_byte()
412 u32 *bytesused = &vb->vb.vb2_buf.planes[0].bytesused; in go7007_motion_regions() local
432 *bytesused -= 216; in go7007_motion_regions()
441 u32 *bytesused; in frame_boundary() local
454 bytesused = &vb->vb.vb2_buf.planes[0].bytesused; in frame_boundary()
457 if (vb->modet_active && *bytesused + 216 < GO7007_BUF_SIZE) in frame_boundary()
516 if (vb && vb->vb.vb2_buf.planes[0].bytesused >= in go7007_parse_video_stream()
519 vb->vb.vb2_buf.planes[0].bytesused = 0; in go7007_parse_video_stream()
600 vb->vb.vb2_buf.planes[0].bytesused; in go7007_parse_video_stream()
/drivers/media/usb/stk1160/
Dstk1160-video.c93 vb2_set_plane_payload(&buf->vb.vb2_buf, 0, buf->bytesused); in stk1160_buffer_done()
142 if (lencopy > buf->bytesused - buf->length) { in stk1160_copy_video()
143 lencopy = buf->bytesused - buf->length; in stk1160_copy_video()
165 buf->bytesused += lencopy; in stk1160_copy_video()
185 if (lencopy > buf->bytesused - buf->length) { in stk1160_copy_video()
186 lencopy = buf->bytesused - buf->length; in stk1160_copy_video()
208 buf->bytesused += lencopy; in stk1160_copy_video()
/drivers/media/platform/sti/hva/
Dhva-debugfs.c180 u32 bytesused; in hva_dbg_perf_end() local
186 bytesused = vb2_get_plane_payload(&stream->vbuf.vb2_buf, 0); in hva_dbg_perf_end()
199 bytesused, (u32)div); in hva_dbg_perf_end()
213 dbg->total_stream_size += bytesused; in hva_dbg_perf_end()
214 dbg->window_stream_size += bytesused; in hva_dbg_perf_end()
Dhva-h264.c608 unsigned int payload = stream->bytesused; in hva_h264_prepare_task()
868 stream->bytesused = payload; in hva_h264_prepare_task()
1022 stream->bytesused += hva_h264_get_stream_size(task); in hva_h264_encode()
1030 &stream->bytesused); in hva_h264_encode()
1037 stream->bytesused = 0; in hva_h264_encode()
/drivers/staging/media/hantro/
Dhantro_h1_jpeg_enc.c144 u32 bytesused = vepu_read(vpu, H1_REG_STR_BUF_LIMIT) / 8; in hantro_jpeg_enc_done() local
153 ctx->jpeg_enc.bounce_buffer.cpu, bytesused); in hantro_jpeg_enc_done()
155 ctx->vpu_dst_fmt->header_size + bytesused); in hantro_jpeg_enc_done()
/drivers/usb/gadget/function/
Duvc_video.c62 if (buf->bytesused - video->queue.buf_used <= len - pos) in uvc_video_encode_header()
78 nbytes = min((unsigned int)len, buf->bytesused - queue->buf_used); in uvc_video_encode_data()
113 if (buf->bytesused == video->queue.buf_used) { in uvc_video_encode_bulk()
125 buf->bytesused == video->queue.buf_used) in uvc_video_encode_bulk()
133 unsigned int pending = buf->bytesused - video->queue.buf_used; in uvc_video_encode_isoc_sg()
185 if (buf->bytesused == video->queue.buf_used || !buf->sg || in uvc_video_encode_isoc_sg()
216 if (buf->bytesused == video->queue.buf_used || in uvc_video_encode_isoc()
Duvc_queue.c95 buf->bytesused = 0; in uvc_buffer_prepare()
97 buf->bytesused = vb2_get_plane_payload(vb, 0); in uvc_buffer_prepare()
345 vb2_set_plane_payload(&buf->buf.vb2_buf, 0, buf->bytesused); in uvcg_complete_buffer()
/drivers/staging/media/meson/vdec/
Dvdec_helpers.c283 vbuf->vb2_buf.planes[0].bytesused = output_size; in dst_buf_done()
284 vbuf->vb2_buf.planes[1].bytesused = output_size / 2; in dst_buf_done()
287 vbuf->vb2_buf.planes[0].bytesused = output_size; in dst_buf_done()
288 vbuf->vb2_buf.planes[1].bytesused = output_size / 4; in dst_buf_done()
289 vbuf->vb2_buf.planes[2].bytesused = output_size / 4; in dst_buf_done()
/drivers/media/usb/stkwebcam/
Dstk-webcam.c344 fill = fb->buffer + fb->v4lbuf.bytesused; in stk_isoc_handler()
372 if (fb->v4lbuf.bytesused != 0 in stk_isoc_handler()
373 && fb->v4lbuf.bytesused != dev->frame_size) { in stk_isoc_handler()
375 i, fb->v4lbuf.bytesused); in stk_isoc_handler()
376 fb->v4lbuf.bytesused = 0; in stk_isoc_handler()
378 } else if (fb->v4lbuf.bytesused == dev->frame_size) { in stk_isoc_handler()
381 fb->v4lbuf.bytesused = 0; in stk_isoc_handler()
389 fb->v4lbuf.bytesused = 0; in stk_isoc_handler()
399 if (framelen + fb->v4lbuf.bytesused > dev->frame_size) { in stk_isoc_handler()
410 fb->v4lbuf.bytesused += framelen; in stk_isoc_handler()
/drivers/media/v4l2-core/
Dv4l2-compat-ioctl32.c460 __u32 bytesused; member
483 __u32 bytesused; member
509 __u32 bytesused; member
675 if (assign_in_user(&p64->bytesused, &p32->bytesused) || in get_v4l2_buffer32()
775 if (assign_in_user(&p64->bytesused, &p32->bytesused) || in get_v4l2_buffer32_time32()
868 if (assign_in_user(&p32->bytesused, &p64->bytesused) || in put_v4l2_buffer32()
948 if (assign_in_user(&p32->bytesused, &p64->bytesused) || in put_v4l2_buffer32_time32()
/drivers/media/dvb-core/
Ddvb_vb2.c144 b->bytesused = vb->planes[0].bytesused; in _fill_dmx_buffer()
153 planes[0].bytesused = 0; in _fill_vb2_buffer()

123