Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] v4l: Convert drivers to use monotonic timestamps

Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Sakari Ailus and committed by
Mauro Carvalho Chehab
8e6057b5 abd23295

+61 -70
+1 -1
drivers/media/common/saa7146/saa7146_fops.c
··· 105 105 } 106 106 107 107 q->curr->vb.state = state; 108 - do_gettimeofday(&q->curr->vb.ts); 108 + v4l2_get_timestamp(&q->curr->vb.ts); 109 109 wake_up(&q->curr->vb.done); 110 110 111 111 q->curr = NULL;
+3 -3
drivers/media/pci/bt8xx/bttv-driver.c
··· 3835 3835 { 3836 3836 struct timeval ts; 3837 3837 3838 - do_gettimeofday(&ts); 3838 + v4l2_get_timestamp(&ts); 3839 3839 3840 3840 if (wakeup->top == wakeup->bottom) { 3841 3841 if (NULL != wakeup->top && curr->top != wakeup->top) { ··· 3878 3878 if (NULL == wakeup) 3879 3879 return; 3880 3880 3881 - do_gettimeofday(&ts); 3881 + v4l2_get_timestamp(&ts); 3882 3882 wakeup->vb.ts = ts; 3883 3883 wakeup->vb.field_count = btv->field_count; 3884 3884 wakeup->vb.state = state; ··· 3949 3949 btv->curr.top = NULL; 3950 3950 bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0); 3951 3951 3952 - do_gettimeofday(&wakeup->vb.ts); 3952 + v4l2_get_timestamp(&wakeup->vb.ts); 3953 3953 wakeup->vb.field_count = btv->field_count; 3954 3954 wakeup->vb.state = VIDEOBUF_DONE; 3955 3955 wake_up(&wakeup->vb.done);
+1 -1
drivers/media/pci/cx23885/cx23885-core.c
··· 439 439 if ((s16) (count - buf->count) < 0) 440 440 break; 441 441 442 - do_gettimeofday(&buf->vb.ts); 442 + v4l2_get_timestamp(&buf->vb.ts); 443 443 dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, 444 444 count, buf->count); 445 445 buf->vb.state = VIDEOBUF_DONE;
+1 -1
drivers/media/pci/cx23885/cx23885-video.c
··· 300 300 if ((s16) (count - buf->count) < 0) 301 301 break; 302 302 303 - do_gettimeofday(&buf->vb.ts); 303 + v4l2_get_timestamp(&buf->vb.ts); 304 304 dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, 305 305 count, buf->count); 306 306 buf->vb.state = VIDEOBUF_DONE;
+1 -1
drivers/media/pci/cx25821/cx25821-video.c
··· 130 130 if ((s16) (count - buf->count) < 0) 131 131 break; 132 132 133 - do_gettimeofday(&buf->vb.ts); 133 + v4l2_get_timestamp(&buf->vb.ts); 134 134 buf->vb.state = VIDEOBUF_DONE; 135 135 list_del(&buf->vb.queue); 136 136 wake_up(&buf->vb.done);
+1 -1
drivers/media/pci/cx88/cx88-core.c
··· 549 549 * up to 32767 buffers in flight... */ 550 550 if ((s16) (count - buf->count) < 0) 551 551 break; 552 - do_gettimeofday(&buf->vb.ts); 552 + v4l2_get_timestamp(&buf->vb.ts); 553 553 dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i, 554 554 count, buf->count); 555 555 buf->vb.state = VIDEOBUF_DONE;
+2 -2
drivers/media/pci/meye/meye.c
··· 811 811 mchip_hsize() * mchip_vsize() * 2); 812 812 meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2; 813 813 meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; 814 - do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); 814 + v4l2_get_timestamp(&meye.grab_buffer[reqnr].timestamp); 815 815 meye.grab_buffer[reqnr].sequence = sequence++; 816 816 kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, 817 817 sizeof(int), &meye.doneq_lock); ··· 832 832 size); 833 833 meye.grab_buffer[reqnr].size = size; 834 834 meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; 835 - do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); 835 + v4l2_get_timestamp(&meye.grab_buffer[reqnr].timestamp); 836 836 meye.grab_buffer[reqnr].sequence = sequence++; 837 837 kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, 838 838 sizeof(int), &meye.doneq_lock);
+1 -1
drivers/media/pci/saa7134/saa7134-core.c
··· 308 308 309 309 /* finish current buffer */ 310 310 q->curr->vb.state = state; 311 - do_gettimeofday(&q->curr->vb.ts); 311 + v4l2_get_timestamp(&q->curr->vb.ts); 312 312 wake_up(&q->curr->vb.done); 313 313 q->curr = NULL; 314 314 }
+1 -1
drivers/media/pci/sta2x11/sta2x11_vip.c
··· 1088 1088 1089 1089 REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) & ~DVP_CTL_ENA); 1090 1090 if (vip->active) { 1091 - do_gettimeofday(&vip->active->ts); 1091 + v4l2_get_timestamp(&vip->active->ts); 1092 1092 vip->active->field_count++; 1093 1093 vip->active->state = VIDEOBUF_DONE; 1094 1094 wake_up(&vip->active->done);
+2 -2
drivers/media/pci/zoran/zoran_device.c
··· 1169 1169 } 1170 1170 frame = zr->jpg_pend[zr->jpg_dma_tail & BUZ_MASK_FRAME]; 1171 1171 buffer = &zr->jpg_buffers.buffer[frame]; 1172 - do_gettimeofday(&buffer->bs.timestamp); 1172 + v4l2_get_timestamp(&buffer->bs.timestamp); 1173 1173 1174 1174 if (zr->codec_mode == BUZ_MODE_MOTION_COMPRESS) { 1175 1175 buffer->bs.length = (stat_com & 0x7fffff) >> 1; ··· 1407 1407 1408 1408 zr->v4l_buffers.buffer[zr->v4l_grab_frame].state = BUZ_STATE_DONE; 1409 1409 zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.seq = zr->v4l_grab_seq; 1410 - do_gettimeofday(&zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.timestamp); 1410 + v4l2_get_timestamp(&zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.timestamp); 1411 1411 zr->v4l_grab_frame = NO_GRAB_ACTIVE; 1412 1412 zr->v4l_pend_tail++; 1413 1413 }
+1 -3
drivers/media/platform/blackfin/bfin_capture.c
··· 484 484 { 485 485 struct ppi_if *ppi = dev_id; 486 486 struct bcap_device *bcap_dev = ppi->priv; 487 - struct timeval timevalue; 488 487 struct vb2_buffer *vb = &bcap_dev->cur_frm->vb; 489 488 dma_addr_t addr; 490 489 491 490 spin_lock(&bcap_dev->lock); 492 491 493 492 if (bcap_dev->cur_frm != bcap_dev->next_frm) { 494 - do_gettimeofday(&timevalue); 495 - vb->v4l2_buf.timestamp = timevalue; 493 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 496 494 vb2_buffer_done(vb, VB2_BUF_STATE_DONE); 497 495 bcap_dev->cur_frm = bcap_dev->next_frm; 498 496 }
+1 -4
drivers/media/platform/davinci/vpfe_capture.c
··· 560 560 561 561 static void vpfe_process_buffer_complete(struct vpfe_device *vpfe_dev) 562 562 { 563 - struct timeval timevalue; 564 - 565 - do_gettimeofday(&timevalue); 566 - vpfe_dev->cur_frm->ts = timevalue; 563 + v4l2_get_timestamp(&vpfe_dev->cur_frm->ts); 567 564 vpfe_dev->cur_frm->state = VIDEOBUF_DONE; 568 565 vpfe_dev->cur_frm->size = vpfe_dev->fmt.fmt.pix.sizeimage; 569 566 wake_up_interruptible(&vpfe_dev->cur_frm->done);
+1 -1
drivers/media/platform/davinci/vpif_capture.c
··· 411 411 */ 412 412 static void vpif_process_buffer_complete(struct common_obj *common) 413 413 { 414 - do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); 414 + v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp); 415 415 vb2_buffer_done(&common->cur_frm->vb, 416 416 VB2_BUF_STATE_DONE); 417 417 /* Make curFrm pointing to nextFrm */
+3 -3
drivers/media/platform/davinci/vpif_display.c
··· 402 402 /* one frame is displayed If next frame is 403 403 * available, release cur_frm and move on */ 404 404 /* Copy frame display time */ 405 - do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); 405 + v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp); 406 406 /* Change status of the cur_frm */ 407 407 vb2_buffer_done(&common->cur_frm->vb, 408 408 VB2_BUF_STATE_DONE); ··· 462 462 if (!channel_first_int[i][channel_id]) { 463 463 /* Mark status of the cur_frm to 464 464 * done and unlock semaphore on it */ 465 - do_gettimeofday(&common->cur_frm->vb. 466 - v4l2_buf.timestamp); 465 + v4l2_get_timestamp(&common->cur_frm->vb. 466 + v4l2_buf.timestamp); 467 467 vb2_buffer_done(&common->cur_frm->vb, 468 468 VB2_BUF_STATE_DONE); 469 469 /* Make cur_frm pointing to next_frm */
+1 -1
drivers/media/platform/fsl-viu.c
··· 1181 1181 1182 1182 if (waitqueue_active(&buf->vb.done)) { 1183 1183 list_del(&buf->vb.queue); 1184 - do_gettimeofday(&buf->vb.ts); 1184 + v4l2_get_timestamp(&buf->vb.ts); 1185 1185 buf->vb.state = VIDEOBUF_DONE; 1186 1186 buf->vb.field_count++; 1187 1187 wake_up(&buf->vb.done);
+1 -1
drivers/media/platform/omap/omap_vout.c
··· 597 597 return; 598 598 599 599 spin_lock(&vout->vbq_lock); 600 - do_gettimeofday(&timevalue); 600 + v4l2_get_timestamp(&timevalue); 601 601 602 602 switch (cur_display->type) { 603 603 case OMAP_DISPLAY_TYPE_DSI:
+1 -1
drivers/media/platform/omap24xxcam.c
··· 402 402 omap24xxcam_core_disable(cam); 403 403 spin_unlock_irqrestore(&cam->core_enable_disable_lock, flags); 404 404 405 - do_gettimeofday(&vb->ts); 405 + v4l2_get_timestamp(&vb->ts); 406 406 vb->field_count = atomic_add_return(2, &fh->field_count); 407 407 if (csr & csr_error) { 408 408 vb->state = VIDEOBUF_ERROR;
+1 -1
drivers/media/platform/sh_vou.c
··· 1092 1092 list_del(&vb->queue); 1093 1093 1094 1094 vb->state = VIDEOBUF_DONE; 1095 - do_gettimeofday(&vb->ts); 1095 + v4l2_get_timestamp(&vb->ts); 1096 1096 vb->field_count++; 1097 1097 wake_up(&vb->done); 1098 1098
+1 -1
drivers/media/platform/soc_camera/atmel-isi.c
··· 166 166 struct frame_buffer *buf = isi->active; 167 167 168 168 list_del_init(&buf->list); 169 - do_gettimeofday(&vb->v4l2_buf.timestamp); 169 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 170 170 vb->v4l2_buf.sequence = isi->sequence++; 171 171 vb2_buffer_done(vb, VB2_BUF_STATE_DONE); 172 172 }
+1 -1
drivers/media/platform/soc_camera/mx1_camera.c
··· 307 307 /* _init is used to debug races, see comment in mx1_camera_reqbufs() */ 308 308 list_del_init(&vb->queue); 309 309 vb->state = VIDEOBUF_DONE; 310 - do_gettimeofday(&vb->ts); 310 + v4l2_get_timestamp(&vb->ts); 311 311 vb->field_count++; 312 312 wake_up(&vb->done); 313 313
+2 -2
drivers/media/platform/soc_camera/mx2_camera.c
··· 516 516 dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%p %lu\n", __func__, 517 517 vb, vb2_plane_vaddr(vb, 0), vb2_get_plane_payload(vb, 0)); 518 518 519 - do_gettimeofday(&vb->v4l2_buf.timestamp); 519 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 520 520 vb->v4l2_buf.sequence++; 521 521 vb2_buffer_done(vb, VB2_BUF_STATE_DONE); 522 522 ··· 1561 1561 vb2_get_plane_payload(vb, 0)); 1562 1562 1563 1563 list_del_init(&buf->internal.queue); 1564 - do_gettimeofday(&vb->v4l2_buf.timestamp); 1564 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 1565 1565 vb->v4l2_buf.sequence = pcdev->frame_count; 1566 1566 if (err) 1567 1567 vb2_buffer_done(vb, VB2_BUF_STATE_ERROR);
+1 -1
drivers/media/platform/soc_camera/mx3_camera.c
··· 156 156 struct mx3_camera_buffer *buf = to_mx3_vb(vb); 157 157 158 158 list_del_init(&buf->queue); 159 - do_gettimeofday(&vb->v4l2_buf.timestamp); 159 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 160 160 vb->v4l2_buf.field = mx3_cam->field; 161 161 vb->v4l2_buf.sequence = mx3_cam->sequence++; 162 162 vb2_buffer_done(vb, VB2_BUF_STATE_DONE);
+1 -1
drivers/media/platform/soc_camera/omap1_camera.c
··· 591 591 suspend_capture(pcdev); 592 592 } 593 593 vb->state = result; 594 - do_gettimeofday(&vb->ts); 594 + v4l2_get_timestamp(&vb->ts); 595 595 if (result != VIDEOBUF_ERROR) 596 596 vb->field_count++; 597 597 wake_up(&vb->done);
+1 -1
drivers/media/platform/soc_camera/pxa_camera.c
··· 681 681 /* _init is used to debug races, see comment in pxa_camera_reqbufs() */ 682 682 list_del_init(&vb->queue); 683 683 vb->state = VIDEOBUF_DONE; 684 - do_gettimeofday(&vb->ts); 684 + v4l2_get_timestamp(&vb->ts); 685 685 vb->field_count++; 686 686 wake_up(&vb->done); 687 687 dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s dequeud buffer (vb=0x%p)\n",
+1 -1
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
··· 516 516 pcdev->active = NULL; 517 517 518 518 ret = sh_mobile_ceu_capture(pcdev); 519 - do_gettimeofday(&vb->v4l2_buf.timestamp); 519 + v4l2_get_timestamp(&vb->v4l2_buf.timestamp); 520 520 if (!ret) { 521 521 vb->v4l2_buf.field = pcdev->field; 522 522 vb->v4l2_buf.sequence = pcdev->sequence++;
+1 -1
drivers/media/platform/timblogiw.c
··· 130 130 131 131 if (vb->state != VIDEOBUF_ERROR) { 132 132 list_del(&vb->queue); 133 - do_gettimeofday(&vb->ts); 133 + v4l2_get_timestamp(&vb->ts); 134 134 vb->field_count = fh->frame_count * 2; 135 135 vb->state = VIDEOBUF_DONE; 136 136
+4 -4
drivers/media/platform/vino.c
··· 2474 2474 2475 2475 if ((!handled_a) && (done_a || skip_a)) { 2476 2476 if (!skip_a) { 2477 - do_gettimeofday(&vino_drvdata-> 2478 - a.int_data.timestamp); 2477 + v4l2_get_timestamp( 2478 + &vino_drvdata->a.int_data.timestamp); 2479 2479 vino_drvdata->a.int_data.frame_counter = fc_a; 2480 2480 } 2481 2481 vino_drvdata->a.int_data.skip = skip_a; ··· 2489 2489 2490 2490 if ((!handled_b) && (done_b || skip_b)) { 2491 2491 if (!skip_b) { 2492 - do_gettimeofday(&vino_drvdata-> 2493 - b.int_data.timestamp); 2492 + v4l2_get_timestamp( 2493 + &vino_drvdata->b.int_data.timestamp); 2494 2494 vino_drvdata->b.int_data.frame_counter = fc_b; 2495 2495 } 2496 2496 vino_drvdata->b.int_data.skip = skip_b;
+2 -4
drivers/media/platform/vivi.c
··· 554 554 { 555 555 int wmax = dev->width; 556 556 int hmax = dev->height; 557 - struct timeval ts; 558 557 void *vbuf = vb2_plane_vaddr(&buf->vb, 0); 559 558 unsigned ms; 560 559 char str[100]; ··· 621 622 buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; 622 623 dev->field_count++; 623 624 buf->vb.v4l2_buf.sequence = dev->field_count >> 1; 624 - do_gettimeofday(&ts); 625 - buf->vb.v4l2_buf.timestamp = ts; 625 + v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); 626 626 } 627 627 628 628 static void vivi_thread_tick(struct vivi_dev *dev) ··· 643 645 list_del(&buf->list); 644 646 spin_unlock_irqrestore(&dev->slock, flags); 645 647 646 - do_gettimeofday(&buf->vb.v4l2_buf.timestamp); 648 + v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); 647 649 648 650 /* Fill buffer */ 649 651 vivi_fillbuff(dev, buf);
+2 -2
drivers/media/usb/au0828/au0828-video.c
··· 304 304 305 305 buf->vb.state = VIDEOBUF_DONE; 306 306 buf->vb.field_count++; 307 - do_gettimeofday(&buf->vb.ts); 307 + v4l2_get_timestamp(&buf->vb.ts); 308 308 309 309 dev->isoc_ctl.buf = NULL; 310 310 ··· 321 321 322 322 buf->vb.state = VIDEOBUF_DONE; 323 323 buf->vb.field_count++; 324 - do_gettimeofday(&buf->vb.ts); 324 + v4l2_get_timestamp(&buf->vb.ts); 325 325 326 326 dev->isoc_ctl.vbi_buf = NULL; 327 327
+1 -1
drivers/media/usb/cpia2/cpia2_usb.c
··· 328 328 continue; 329 329 } 330 330 DBG("Start of frame pattern found\n"); 331 - do_gettimeofday(&cam->workbuff->timestamp); 331 + v4l2_get_timestamp(&cam->workbuff->timestamp); 332 332 cam->workbuff->seq = cam->frame_count++; 333 333 cam->workbuff->data[0] = 0xFF; 334 334 cam->workbuff->data[1] = 0xD8;
+2 -2
drivers/media/usb/cx231xx/cx231xx-417.c
··· 1291 1291 1292 1292 buf->vb.state = VIDEOBUF_DONE; 1293 1293 buf->vb.field_count++; 1294 - do_gettimeofday(&buf->vb.ts); 1294 + v4l2_get_timestamp(&buf->vb.ts); 1295 1295 list_del(&buf->vb.queue); 1296 1296 wake_up(&buf->vb.done); 1297 1297 dma_q->mpeg_buffer_completed = 0; ··· 1327 1327 memcpy(vbuf, data, len); 1328 1328 buf->vb.state = VIDEOBUF_DONE; 1329 1329 buf->vb.field_count++; 1330 - do_gettimeofday(&buf->vb.ts); 1330 + v4l2_get_timestamp(&buf->vb.ts); 1331 1331 list_del(&buf->vb.queue); 1332 1332 wake_up(&buf->vb.done); 1333 1333
+1 -1
drivers/media/usb/cx231xx/cx231xx-vbi.c
··· 530 530 531 531 buf->vb.state = VIDEOBUF_DONE; 532 532 buf->vb.field_count++; 533 - do_gettimeofday(&buf->vb.ts); 533 + v4l2_get_timestamp(&buf->vb.ts); 534 534 535 535 dev->vbi_mode.bulk_ctl.buf = NULL; 536 536
+1 -1
drivers/media/usb/cx231xx/cx231xx-video.c
··· 235 235 cx231xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); 236 236 buf->vb.state = VIDEOBUF_DONE; 237 237 buf->vb.field_count++; 238 - do_gettimeofday(&buf->vb.ts); 238 + v4l2_get_timestamp(&buf->vb.ts); 239 239 240 240 if (dev->USE_ISO) 241 241 dev->video_mode.isoc_ctl.buf = NULL;
+2 -2
drivers/media/usb/em28xx/em28xx-video.c
··· 163 163 em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); 164 164 buf->vb.state = VIDEOBUF_DONE; 165 165 buf->vb.field_count++; 166 - do_gettimeofday(&buf->vb.ts); 166 + v4l2_get_timestamp(&buf->vb.ts); 167 167 168 168 dev->isoc_ctl.vid_buf = NULL; 169 169 ··· 180 180 181 181 buf->vb.state = VIDEOBUF_DONE; 182 182 buf->vb.field_count++; 183 - do_gettimeofday(&buf->vb.ts); 183 + v4l2_get_timestamp(&buf->vb.ts); 184 184 185 185 dev->isoc_ctl.vbi_buf = NULL; 186 186
+2 -1
drivers/media/usb/pwc/pwc-if.c
··· 316 316 struct pwc_frame_buf *fbuf = pdev->fill_buf; 317 317 318 318 if (pdev->vsync == 1) { 319 - do_gettimeofday(&fbuf->vb.v4l2_buf.timestamp); 319 + v4l2_get_timestamp( 320 + &fbuf->vb.v4l2_buf.timestamp); 320 321 pdev->vsync = 2; 321 322 } 322 323
+2 -4
drivers/media/usb/s2255/s2255drv.c
··· 593 593 buf = list_entry(dma_q->active.next, 594 594 struct s2255_buffer, vb.queue); 595 595 list_del(&buf->vb.queue); 596 - do_gettimeofday(&buf->vb.ts); 596 + v4l2_get_timestamp(&buf->vb.ts); 597 597 s2255_fillbuff(channel, buf, jpgsize); 598 598 wake_up(&buf->vb.done); 599 599 dprintk(2, "%s: [buf/i] [%p/%d]\n", __func__, buf, buf->vb.i); ··· 629 629 struct s2255_buffer *buf, int jpgsize) 630 630 { 631 631 int pos = 0; 632 - struct timeval ts; 633 632 const char *tmpbuf; 634 633 char *vbuf = videobuf_to_vmalloc(&buf->vb); 635 634 unsigned long last_frame; ··· 673 674 /* tell v4l buffer was filled */ 674 675 675 676 buf->vb.field_count = channel->frame_count * 2; 676 - do_gettimeofday(&ts); 677 - buf->vb.ts = ts; 677 + v4l2_get_timestamp(&buf->vb.ts); 678 678 buf->vb.state = VIDEOBUF_DONE; 679 679 } 680 680
+2 -1
drivers/media/usb/sn9c102/sn9c102_core.c
··· 773 773 img); 774 774 775 775 if ((*f)->buf.bytesused == 0) 776 - do_gettimeofday(&(*f)->buf.timestamp); 776 + v4l2_get_timestamp( 777 + &(*f)->buf.timestamp); 777 778 778 779 (*f)->buf.bytesused += img; 779 780
+1 -1
drivers/media/usb/stk1160/stk1160-video.c
··· 101 101 buf->vb.v4l2_buf.sequence = dev->field_count >> 1; 102 102 buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; 103 103 buf->vb.v4l2_buf.bytesused = buf->bytesused; 104 - do_gettimeofday(&buf->vb.v4l2_buf.timestamp); 104 + v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); 105 105 106 106 vb2_set_plane_payload(&buf->vb, 0, buf->bytesused); 107 107 vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);
+1 -1
drivers/media/usb/stkwebcam/stk-webcam.c
··· 1113 1113 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED; 1114 1114 sbuf->v4lbuf.flags |= V4L2_BUF_FLAG_DONE; 1115 1115 sbuf->v4lbuf.sequence = ++dev->sequence; 1116 - do_gettimeofday(&sbuf->v4lbuf.timestamp); 1116 + v4l2_get_timestamp(&sbuf->v4lbuf.timestamp); 1117 1117 1118 1118 *buf = sbuf->v4lbuf; 1119 1119 return 0;
+1 -1
drivers/media/usb/tlg2300/pd-video.c
··· 212 212 front->curr_frame = NULL; 213 213 vb->state = VIDEOBUF_DONE; 214 214 vb->field_count++; 215 - do_gettimeofday(&vb->ts); 215 + v4l2_get_timestamp(&vb->ts); 216 216 217 217 wake_up(&vb->done); 218 218 }
+1 -1
drivers/media/usb/tm6000/tm6000-video.c
··· 194 194 dprintk(dev, V4L2_DEBUG_ISOC, "[%p/%d] wakeup\n", buf, buf->vb.i); 195 195 buf->vb.state = VIDEOBUF_DONE; 196 196 buf->vb.field_count++; 197 - do_gettimeofday(&buf->vb.ts); 197 + v4l2_get_timestamp(&buf->vb.ts); 198 198 199 199 list_del(&buf->vb.queue); 200 200 wake_up(&buf->vb.done);
+1 -1
drivers/media/usb/usbvision/usbvision-core.c
··· 1169 1169 1170 1170 if (newstate == parse_state_next_frame) { 1171 1171 frame->grabstate = frame_state_done; 1172 - do_gettimeofday(&(frame->timestamp)); 1172 + v4l2_get_timestamp(&(frame->timestamp)); 1173 1173 frame->sequence = usbvision->frame_num; 1174 1174 1175 1175 spin_lock_irqsave(&usbvision->queue_lock, lock_flags);
+2 -4
drivers/media/usb/zr364xx/zr364xx.c
··· 501 501 int jpgsize) 502 502 { 503 503 int pos = 0; 504 - struct timeval ts; 505 504 const char *tmpbuf; 506 505 char *vbuf = videobuf_to_vmalloc(&buf->vb); 507 506 unsigned long last_frame; ··· 529 530 /* tell v4l buffer was filled */ 530 531 531 532 buf->vb.field_count = cam->frame_count * 2; 532 - do_gettimeofday(&ts); 533 - buf->vb.ts = ts; 533 + v4l2_get_timestamp(&buf->vb.ts); 534 534 buf->vb.state = VIDEOBUF_DONE; 535 535 } 536 536 ··· 557 559 goto unlock; 558 560 } 559 561 list_del(&buf->vb.queue); 560 - do_gettimeofday(&buf->vb.ts); 562 + v4l2_get_timestamp(&buf->vb.ts); 561 563 DBG("[%p/%d] wakeup\n", buf, buf->vb.i); 562 564 zr364xx_fillbuff(cam, buf, jpgsize); 563 565 wake_up(&buf->vb.done);