1. 06 3月, 2014 2 次提交
    • S
      [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags · ade48681
      Sakari Ailus 提交于
      The timestamp_type field used to contain only the timestamp type. Soon it
      will be used for timestamp source flags as well. Rename the field
      accordingly.
      
      [m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
      Signed-off-by: NSakari Ailus <sakari.ailus@iki.fi>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      ade48681
    • H
      [media] vb2: fix timecode and flags handling for output buffers · f1343281
      Hans Verkuil 提交于
      When sending a buffer to a video output device some of the fields need
      to be copied so they arrive in the driver. These are the KEY/P/BFRAME
      flags and the TIMECODE flag, and, if that flag is set, the timecode field
      itself.
      
      There are a number of functions involved in this: the __fill_vb2_buffer()
      is called while preparing a buffer. For output buffers the buffer contains
      the video data, so any meta data associated with that (KEY/P/BFRAME and
      the field information) should be stored at that point.
      
      The timecode, timecode flag and timestamp information is not part of that,
      that information will have to be set when vb2_internal_qbuf() is called to
      actually queue the buffer to the driver. Usually VIDIOC_QBUF will do the
      prepare as well, but you can call PREPARE_BUF first and only later VIDIOC_QBUF.
      You most likely will want to set the timestamp and timecode when you actually
      queue the buffer, not when you prepare it.
      
      Finally, in buf_prepare() make sure the timestamp and sequence fields are
      actually cleared so that when you do a QUERYBUF of a prepared-but-not-yet-queued
      buffer you will not see stale timestamp/sequence data.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      f1343281
  2. 07 1月, 2014 9 次提交
  3. 10 12月, 2013 2 次提交
  4. 09 12月, 2013 3 次提交
    • R
      [media] videobuf2: Add missing lock held on vb2_fop_release · 1380f575
      Ricardo Ribalda 提交于
      vb2_fop_release does not hold the lock although it is modifying the
      queue->owner field.
      This could lead to race conditions on the vb2_perform_io function
      when multiple applications are accessing the video device via
      read/write API:
      [ 308.297741] BUG: unable to handle kernel NULL pointer dereference at
      0000000000000260
      [ 308.297759] IP: [<ffffffffa07a9fd2>] vb2_perform_fileio+0x372/0x610
      [videobuf2_core]
      [ 308.297794] PGD 159719067 PUD 158119067 PMD 0
      [ 308.297812] Oops: 0000 #1 SMP
      [ 308.297826] Modules linked in: qt5023_video videobuf2_dma_sg
      qtec_xform videobuf2_vmalloc videobuf2_memops videobuf2_core
      qtec_white qtec_mem gpio_xilinx qtec_cmosis qtec_pcie fglrx(PO)
      spi_xilinx spi_bitbang qt5023
      [ 308.297888] CPU: 1 PID: 2189 Comm: java Tainted: P O 3.11.0-qtec-standard #1
      [ 308.297919] Hardware name: QTechnology QT5022/QT5022, BIOS
      PM_2.1.0.309 X64 05/23/2013
      [ 308.297952] task: ffff8801564e1690 ti: ffff88014dc02000 task.ti:
      ffff88014dc02000
      [ 308.297962] RIP: 0010:[<ffffffffa07a9fd2>] [<ffffffffa07a9fd2>]
      vb2_perform_fileio+0x372/0x610 [videobuf2_core]
      [ 308.297985] RSP: 0018:ffff88014dc03df8 EFLAGS: 00010202
      [ 308.297995] RAX: 0000000000000000 RBX: ffff880158a23000 RCX: dead000000100100
      [ 308.298003] RDX: 0000000000000000 RSI: dead000000200200 RDI: 0000000000000000
      [ 308.298012] RBP: ffff88014dc03e58 R08: 0000000000000000 R09: 0000000000000001
      [ 308.298020] R10: ffffea00051e8380 R11: ffff88014dc03fd8 R12: ffff880158a23070
      [ 308.298029] R13: ffff8801549040b8 R14: 0000000000198000 R15: 0000000001887e60
      [ 308.298040] FS: 00007f65130d5700(0000) GS:ffff88015ed00000(0000)
      knlGS:0000000000000000
      [ 308.298049] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 308.298057] CR2: 0000000000000260 CR3: 0000000159630000 CR4: 00000000000007e0
      [ 308.298064] Stack:
      [ 308.298071] ffff880156416c00 0000000000198000 0000000000000000
      ffff880100000001
      [ 308.298087] ffff88014dc03f50 00000000810a79ca 0002000000000001
      ffff880154904718
      [ 308.298101] ffff880156416c00 0000000000198000 ffff880154904338
      ffff88014dc03f50
      [ 308.298116] Call Trace:
      [ 308.298143] [<ffffffffa07aa3c4>] vb2_read+0x14/0x20 [videobuf2_core]
      [ 308.298198] [<ffffffffa07aa494>] vb2_fop_read+0xc4/0x120 [videobuf2_core]
      [ 308.298252] [<ffffffff8154ee9e>] v4l2_read+0x7e/0xc0
      [ 308.298296] [<ffffffff8116e639>] vfs_read+0xa9/0x160
      [ 308.298312] [<ffffffff8116e882>] SyS_read+0x52/0xb0
      [ 308.298328] [<ffffffff81784179>] tracesys+0xd0/0xd5
      [ 308.298335] Code: e5 d6 ff ff 83 3d be 24 00 00 04 89 c2 4c 8b 45 b0
      44 8b 4d b8 0f 8f 20 02 00 00 85 d2 75 32 83 83 78 03 00 00 01 4b 8b
      44 c5 48 <8b> 88 60 02 00 00 85 c9 0f 84 b0 00 00 00 8b 40 58 89 c2 41
      89
      [ 308.298487] RIP [<ffffffffa07a9fd2>] vb2_perform_fileio+0x372/0x610
      [videobuf2_core]
      [ 308.298507] RSP <ffff88014dc03df8>
      [ 308.298514] CR2: 0000000000000260
      [ 308.298526] ---[ end trace e8f01717c96d1e41 ]---
      Signed-off-by: NRicardo Ribalda <ricardo.ribalda@gmail.com>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      1380f575
    • S
      [media] videobuf2: Add log for size checking error in __qbuf_dmabuf · 77c0782e
      Seung-Woo Kim 提交于
      __qbuf_dmabuf checks whether size of provided dmabuf is large
      enough, and it returns error without any log. So this patch adds
      error log in the case.
      Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      77c0782e
    • R
      [media] vb2: Return 0 when streamon and streamoff are already on/off · f956035c
      Ricardo Ribalda 提交于
      According to the doc:
      If VIDIOC_STREAMON is called when streaming is already in progress,
      or if VIDIOC_STREAMOFF is called when streaming is already stopped,
      then the ioctl does nothing and 0 is returned.
      The current implementation was returning -EINVAL instead.
      Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      f956035c
  5. 30 11月, 2013 1 次提交
  6. 17 10月, 2013 1 次提交
  7. 26 9月, 2013 3 次提交
  8. 25 9月, 2013 1 次提交
  9. 22 8月, 2013 2 次提交
  10. 18 8月, 2013 2 次提交
  11. 04 6月, 2013 1 次提交
  12. 27 5月, 2013 1 次提交
  13. 25 4月, 2013 1 次提交
  14. 15 4月, 2013 1 次提交
  15. 25 3月, 2013 1 次提交
  16. 22 3月, 2013 1 次提交
  17. 06 3月, 2013 1 次提交
  18. 06 2月, 2013 1 次提交
  19. 06 1月, 2013 1 次提交
  20. 21 12月, 2012 1 次提交
  21. 26 11月, 2012 3 次提交
  22. 06 10月, 2012 1 次提交