Lines Matching refs:mdl

189 	struct cx18_mdl *mdl;  in cx18_get_mdl()  local
202 while ((mdl = cx18_dequeue(s_vbi, in cx18_get_mdl()
205 cx18_process_vbi_data(cx, mdl, in cx18_get_mdl()
207 cx18_stream_put_mdl_fw(s_vbi, mdl); in cx18_get_mdl()
210 mdl = &cx->vbi.sliced_mpeg_mdl; in cx18_get_mdl()
211 if (mdl->readpos != mdl->bytesused) in cx18_get_mdl()
212 return mdl; in cx18_get_mdl()
216 mdl = cx18_dequeue(s, &s->q_full); in cx18_get_mdl()
217 if (mdl) { in cx18_get_mdl()
219 &mdl->m_flags)) in cx18_get_mdl()
220 return mdl; in cx18_get_mdl()
223 cx18_mdl_swap(mdl); in cx18_get_mdl()
226 cx18_process_vbi_data(cx, mdl, s->type); in cx18_get_mdl()
228 return mdl; in cx18_get_mdl()
261 struct cx18_mdl *mdl = &cx->vbi.sliced_mpeg_mdl; in cx18_setup_sliced_vbi_mdl() local
269 mdl->curr_buf = NULL; in cx18_setup_sliced_vbi_mdl()
270 mdl->bytesused = cx->vbi.sliced_mpeg_size[idx]; in cx18_setup_sliced_vbi_mdl()
271 mdl->readpos = 0; in cx18_setup_sliced_vbi_mdl()
379 struct cx18_mdl *mdl, char __user *ubuf, size_t ucount) in cx18_copy_mdl_to_user() argument
385 if (mdl->curr_buf == NULL) in cx18_copy_mdl_to_user()
386 mdl->curr_buf = list_first_entry(&mdl->buf_list, in cx18_copy_mdl_to_user()
389 if (list_entry_is_past_end(mdl->curr_buf, &mdl->buf_list, list)) { in cx18_copy_mdl_to_user()
395 mdl->readpos = mdl->bytesused; in cx18_copy_mdl_to_user()
399 list_for_each_entry_from(mdl->curr_buf, &mdl->buf_list, list) { in cx18_copy_mdl_to_user()
401 if (mdl->curr_buf->readpos >= mdl->curr_buf->bytesused) in cx18_copy_mdl_to_user()
404 rc = cx18_copy_buf_to_user(s, mdl->curr_buf, ubuf + tot_written, in cx18_copy_mdl_to_user()
408 mdl->readpos += rc; in cx18_copy_mdl_to_user()
413 mdl->curr_buf->readpos < mdl->curr_buf->bytesused || in cx18_copy_mdl_to_user()
414 mdl->readpos >= mdl->bytesused) /* MDL buffers drained */ in cx18_copy_mdl_to_user()
441 struct cx18_mdl *mdl; in cx18_read() local
444 mdl = cx18_get_mdl(s, non_block, &rc); in cx18_read()
446 if (mdl == NULL) { in cx18_read()
460 rc = cx18_copy_mdl_to_user(s, mdl, ubuf + tot_written, in cx18_read()
463 if (mdl != &cx->vbi.sliced_mpeg_mdl) { in cx18_read()
464 if (mdl->readpos == mdl->bytesused) in cx18_read()
465 cx18_stream_put_mdl_fw(s, mdl); in cx18_read()
467 cx18_push(s, mdl, &s->q_full); in cx18_read()
468 } else if (mdl->readpos == mdl->bytesused) { in cx18_read()
473 cx->vbi_data_inserted += mdl->bytesused; in cx18_read()