aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/videobuf2-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 21:21:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 21:21:14 -0400
commit9cfcc658da9693f65e7224e8329e40ada2f3c699 (patch)
tree44fb518eee069733f3f895177899815e7c89e5b0 /drivers/media/v4l2-core/videobuf2-core.c
parente3a98ac47698bf1c1e4e6fae72afc9866953fce5 (diff)
parent50ef28a6ac216fd8b796257a3768fef8f57b917d (diff)
Merge tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - new DVB frontend drivers: ascot2e, cxd2841er, horus3a, lnbh25 - new HDMI capture driver: tc358743 - new driver for NetUP DVB new boards (netup_unidvb) - IR support for DVBSky cards (smipcie-ir) - Coda driver has gain macroblock tiling support - Renesas R-Car gains JPEG codec driver - new DVB platform driver for STi boards: c8sectpfe - added documentation for the media core kABI to device-drivers DocBook - lots of driver fixups, cleanups and improvements * tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (297 commits) [media] c8sectpfe: Remove select on undefined LIBELF_32 [media] i2c: fix platform_no_drv_owner.cocci warnings [media] cx231xx: Use wake_up_interruptible() instead of wake_up_interruptible_nr() [media] tc358743: only queue subdev notifications if devnode is set [media] tc358743: add missing Kconfig dependency/select [media] c8sectpfe: Use %pad to print 'dma_addr_t' [media] DocBook media: Fix typo "the the" in xml files [media] tc358743: make reset gpio optional [media] tc358743: set direction of reset gpio using devm_gpiod_get [media] dvbdev: document most of the functions/data structs [media] dvb_frontend.h: document the struct dvb_frontend [media] dvb-frontend.h: document struct dtv_frontend_properties [media] dvb-frontend.h: document struct dvb_frontend_ops [media] dvb: Use DVBFE_ALGO_HW where applicable [media] dvb_frontend.h: document struct analog_demod_ops [media] dvb_frontend.h: Document struct dvb_tuner_ops [media] Docbook: Document struct analog_parameters [media] dvb_frontend.h: get rid of dvbfe_modcod [media] add documentation for struct dvb_tuner_info [media] dvb_frontend: document dvb_frontend_tune_settings ...
Diffstat (limited to 'drivers/media/v4l2-core/videobuf2-core.c')
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index a14c428f70e9..f1022d810d22 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -30,6 +30,8 @@
30#include <media/v4l2-common.h> 30#include <media/v4l2-common.h>
31#include <media/videobuf2-core.h> 31#include <media/videobuf2-core.h>
32 32
33#include <trace/events/v4l2.h>
34
33static int debug; 35static int debug;
34module_param(debug, int, 0644); 36module_param(debug, int, 0644);
35 37
@@ -1213,6 +1215,8 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
1213 atomic_dec(&q->owned_by_drv_count); 1215 atomic_dec(&q->owned_by_drv_count);
1214 spin_unlock_irqrestore(&q->done_lock, flags); 1216 spin_unlock_irqrestore(&q->done_lock, flags);
1215 1217
1218 trace_vb2_buf_done(q, vb);
1219
1216 switch (state) { 1220 switch (state) {
1217 case VB2_BUF_STATE_QUEUED: 1221 case VB2_BUF_STATE_QUEUED:
1218 return; 1222 return;
@@ -1639,6 +1643,8 @@ static void __enqueue_in_driver(struct vb2_buffer *vb)
1639 vb->state = VB2_BUF_STATE_ACTIVE; 1643 vb->state = VB2_BUF_STATE_ACTIVE;
1640 atomic_inc(&q->owned_by_drv_count); 1644 atomic_inc(&q->owned_by_drv_count);
1641 1645
1646 trace_vb2_buf_queue(q, vb);
1647
1642 /* sync buffers */ 1648 /* sync buffers */
1643 for (plane = 0; plane < vb->num_planes; ++plane) 1649 for (plane = 0; plane < vb->num_planes; ++plane)
1644 call_void_memop(vb, prepare, vb->planes[plane].mem_priv); 1650 call_void_memop(vb, prepare, vb->planes[plane].mem_priv);
@@ -1888,6 +1894,8 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
1888 vb->v4l2_buf.timecode = b->timecode; 1894 vb->v4l2_buf.timecode = b->timecode;
1889 } 1895 }
1890 1896
1897 trace_vb2_qbuf(q, vb);
1898
1891 /* 1899 /*
1892 * If already streaming, give the buffer to driver for processing. 1900 * If already streaming, give the buffer to driver for processing.
1893 * If not, the buffer will be given to driver on next streamon. 1901 * If not, the buffer will be given to driver on next streamon.
@@ -2133,6 +2141,9 @@ static int vb2_internal_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool n
2133 /* Remove from videobuf queue */ 2141 /* Remove from videobuf queue */
2134 list_del(&vb->queued_entry); 2142 list_del(&vb->queued_entry);
2135 q->queued_count--; 2143 q->queued_count--;
2144
2145 trace_vb2_dqbuf(q, vb);
2146
2136 if (!V4L2_TYPE_IS_OUTPUT(q->type) && 2147 if (!V4L2_TYPE_IS_OUTPUT(q->type) &&
2137 vb->v4l2_buf.flags & V4L2_BUF_FLAG_LAST) 2148 vb->v4l2_buf.flags & V4L2_BUF_FLAG_LAST)
2138 q->last_buffer_dequeued = true; 2149 q->last_buffer_dequeued = true;