1. 09 6月, 2017 1 次提交
  2. 18 5月, 2017 1 次提交
  3. 22 3月, 2017 1 次提交
  4. 21 10月, 2016 1 次提交
    • M
      [media] v4l2-core: don't break long lines · 8720427c
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      8720427c
  5. 09 9月, 2016 1 次提交
  6. 25 8月, 2016 1 次提交
  7. 24 8月, 2016 3 次提交
  8. 09 7月, 2016 4 次提交
  9. 16 6月, 2016 1 次提交
  10. 25 4月, 2016 1 次提交
  11. 14 4月, 2016 1 次提交
  12. 27 2月, 2016 1 次提交
  13. 04 2月, 2016 2 次提交
    • M
      [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR · 1f2c4501
      Mauro Carvalho Chehab 提交于
      changeset 70433a15 ("media: videobuf2: Refactor vb2_fileio_data
      and vb2_thread") broke videobuf2-dvb.
      
      The root cause is that, instead of calling threadio->fnc() for
      all types of events except for VB2_BUF_STATE_ERROR, it was calling
      it only for VB2_BUF_STATE_DONE.
      
      With that, the DVB thread were never called.
      
      Cc: stable@vger.kernel.org # Kernel >= 4.3
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      1f2c4501
    • H
      [media] vb2: fix nasty vb2_thread regression · fac710e4
      Hans Verkuil 提交于
      The vb2_thread implementation was made generic and was moved from
      videobuf2-v4l2.c to videobuf2-core.c in commit af3bac1a. Unfortunately
      that clearly was never tested since it broke read() causing NULL address
      references.
      
      The root cause was confused handling of vb2_buffer vs v4l2_buffer (the pb
      pointer in various core functions).
      
      The v4l2_buffer no longer exists after moving the code into the core and
      it is no longer needed. However, the vb2_thread code passed a pointer to
      a vb2_buffer to the core functions were a v4l2_buffer pointer was expected
      and vb2_thread expected that the vb2_buffer fields would be filled in
      correctly.
      
      This is obviously wrong since v4l2_buffer != vb2_buffer. Note that the
      pb pointer is a void pointer, so no type-checking took place.
      
      This patch fixes this problem:
      
      1) allow pb to be NULL for vb2_core_(d)qbuf. The vb2_thread code will use
         a NULL pointer here since they don't care about v4l2_buffer anyway.
      2) let vb2_core_dqbuf pass back the index of the received buffer. This is
         all vb2_thread needs: this index is the index into the q->bufs array
         and vb2_thread just gets the vb2_buffer from there.
      3) the fileio->b pointer (that originally contained a v4l2_buffer) is
         removed altogether since it is no longer needed.
      
      Tested with vivid and the cobalt driver.
      
      Cc: stable@vger.kernel.org # Kernel >= 4.3
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: NMatthias Schwarzott <zzam@gentoo.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      fac710e4
  14. 01 2月, 2016 1 次提交
  15. 19 12月, 2015 6 次提交
  16. 18 12月, 2015 4 次提交
  17. 21 10月, 2015 3 次提交
  18. 01 10月, 2015 2 次提交
  19. 17 8月, 2015 1 次提交
    • J
      [media] vb2: Push mmap_sem down to memops · 0f6e2825
      Jan Kara 提交于
      Currently vb2 core acquires mmap_sem just around call to
      __qbuf_userptr(). However since commit f035eb4e (videobuf2: fix
      lockdep warning) it isn't necessary to acquire it so early as we no
      longer have to drop queue mutex before acquiring mmap_sem. So push
      acquisition of mmap_sem down into .get_userptr memop so that the
      semaphore is acquired for a shorter time and it is clearer what it is
      needed for.
      
      Note that we also need mmap_sem in .put_userptr memop since that ends up
      calling vb2_put_vma() which calls vma->vm_ops->close() which should be
      called with mmap_sem held. However we didn't hold mmap_sem in some code
      paths anyway (e.g. when called via vb2_ioctl_reqbufs() ->
      __vb2_queue_free() -> vb2_dma_sg_put_userptr()) and getting mmap_sem in
      put_userptr() introduces a lock inversion with queue->mmap_lock in the
      above mentioned call path.
      
      Luckily this whole locking mess will get resolved once we convert
      videobuf2 core to the new mm helper which avoids the need for mmap_sem
      in .put_userptr memop altogether.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      0f6e2825
  20. 10 8月, 2015 1 次提交
  21. 17 7月, 2015 2 次提交
    • P
      [media] videobuf2: add trace events · 2091f518
      Philipp Zabel 提交于
      Add videobuf2 specific vb2_qbuf and vb2_dqbuf trace events that mirror the
      v4l2_qbuf and v4l2_dqbuf trace events, only they include additional
      information about queue fill state and are emitted right before the buffer
      is enqueued in the driver or userspace is woken up. This allows to make
      sense of the timeline of trace events in combination with others that might
      be triggered by __enqueue_in_driver.
      
      Also two new trace events vb2_buf_queue and vb2_buf_done are added,
      allowing to trace the handover between videobuf2 framework and driver.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      2091f518
    • S
      [media] vb2: Only requeue buffers immediately once streaming is started · 6d058c56
      Sakari Ailus 提交于
      Buffers can be returned back to videobuf2 in driver's streamon handler. In
      this case vb2_buffer_done() with buffer state VB2_BUF_STATE_QUEUED will
      cause the driver's buf_queue vb2 operation to be called, queueing the same
      buffer again only to be returned to videobuf2 using vb2_buffer_done() and so
      on.
      
      Add a new buffer state VB2_BUF_STATE_REQUEUEING which, when used as the
      state argument to vb2_buffer_done(), will result in buffers queued to the
      driver. Using VB2_BUF_STATE_QUEUED will leave the buffer to videobuf2, as it
      was before "[media] vb2: allow requeuing buffers while streaming".
      
      Fixes: ce0eff01 ("[media] vb2: allow requeuing buffers while streaming")
      
      [mchehab@osg.samsung.com: fix warning: enumeration value 'VB2_BUF_STATE_REQUEUEING' not handled in switch]
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: stable@vger.kernel.org # for v4.1
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      6d058c56
  22. 22 6月, 2015 1 次提交