platform/kernel/linux-3.10.git
9 years agoupstream: [media] vb2: fix num_buffers calculation if req->count > VIDEO_MAX_FRAMES
Philipp Zabel [Fri, 9 May 2014 15:32:10 +0000 (12:32 -0300)]
upstream: [media] vb2: fix num_buffers calculation if req->count > VIDEO_MAX_FRAMES

num_buffers can't be bigger than VIDEO_MAX_FRAME. This is assured by:
  num_buffers = min_t(unsigned int, req->count, VIDEO_MAX_FRAME);

However, this value is overriden by:
  num_buffers = max_t(unsigned int, req->count, q->min_buffers_needed);

It should, instead, use the previously calculated value as an input
to max_t:
  num_buffers = max_t(unsigned int, num_buffers, q->min_buffers_needed);

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: vb2: Avoid double WARN_ON when stopping streaming
Laurent Pinchart [Sun, 20 Apr 2014 23:55:41 +0000 (20:55 -0300)]
upstream: [media] v4l: vb2: Avoid double WARN_ON when stopping streaming

The __vb2_queue_cancel function marks the queue as not streaming and
then WARNs when buffers are still owned by the driver. It proceeds to
complete all active buffers by calling vb2_buffer_done with the new
buffer state set to VB2_BUF_STATE_ERROR in that case. This triggers
another WARN_ON due to as new state not being VB2_BUF_STATE_QUEUED while
the queue is not streaming.

Check buffer ownership and complete all active buffers before marking
the queue as not streaming to avoid the double WARN_on.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move fields wq_trigger and streaming_started from struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:25 +0000 (16:33 -0300)]
upstream: [media] em28xx: move fields wq_trigger and streaming_started from struct em28xx to struct em28xx_audio

Both wq_trigger and stream_started are used only to control the em28xx
alsa streaming. They don't belong to em28xx common struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: remove field tuner_addr from struct em28xx
Frank Schaefer [Mon, 24 Mar 2014 19:33:24 +0000 (16:33 -0300)]
upstream: [media] em28xx: remove field tuner_addr from struct em28xx

The tuner address is only used by the v4l submodule and at tuner setup and
can be obtained from the board data directly (if specified).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: remove field tda9887_conf from struct em28xx
Frank Schaefer [Mon, 24 Mar 2014 19:33:23 +0000 (16:33 -0300)]
upstream: [media] em28xx: remove field tda9887_conf from struct em28xx

The tda9887 chipset is part of the analog tuner. Move it out of
em28xx-cards.

Also, it is used only one time by the v4l2 sub-module at tuner setup.

With that, we can get rid of an additional data inside the em28xx
common structure.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move tuner frequency field from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:22 +0000 (16:33 -0300)]
upstream: [media] em28xx: move tuner frequency field from struct em28xx to struct v4l2

Move V4L2-specific frequency cache to struct em28xx_v4l2.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move v4l2 user counting fields from struct em28xx to struct...
Frank Schaefer [Sun, 11 May 2014 20:59:04 +0000 (17:59 -0300)]
upstream: [media] em28xx: move v4l2 user counting fields from struct em28xx to struct v4l2

Despite being at the common em28xx struct, those two fields are
actually taking into account only the usage inside em28xx v4l2
submodule. So, move them out of the common struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move capture state tracking fields from struct em28xx to...
Frank Schaefer [Mon, 24 Mar 2014 19:33:20 +0000 (16:33 -0300)]
upstream: [media] em28xx: move capture state tracking fields from struct em28xx to struct v4l2

Move some temporary capture tracking date to the em28xx_v4l2 struct,
as those info are used only by em28xx v4l2 submodule.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move sensor parameter fields from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:19 +0000 (16:33 -0300)]
upstream: [media] em28xx: move sensor parameter fields from struct em28xx to struct v4l2

Move camera sensor resolution and xtal out of em28xx common struct,
as thore are used only by the em28xx v4l2 submodule.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move progressive/interlaced fields from struct em28xx to...
Frank Schaefer [Mon, 24 Mar 2014 19:33:18 +0000 (16:33 -0300)]
upstream: [media] em28xx: move progressive/interlaced fields from struct em28xx to struct v4l2

The video progressive data fields belong to analog TV. Move them out
of the common em28xx struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move struct em28xx_fmt *format from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:17 +0000 (16:33 -0300)]
upstream: [media] em28xx: move struct em28xx_fmt *format from struct em28xx to struct v4l2

The analog format struct belongs to analog TV. Move it out of the
common em28xx struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move TV norm from struct em28xx to struct v4l2
Frank Schaefer [Mon, 24 Mar 2014 19:33:16 +0000 (16:33 -0300)]
upstream: [media] em28xx: move TV norm from struct em28xx to struct v4l2

TV norm is specific to analog TV reception. move it out of the common
em28xx struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move vinmode and vinctrl data from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:15 +0000 (16:33 -0300)]
upstream: [media] em28xx: move vinmode and vinctrl data from struct em28xx to struct v4l2

The video input mode and control data also belong only to the
analog side. move them to struct em28xx_v4l.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move v4l2 frame resolutions and scale data from struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:14 +0000 (16:33 -0300)]
upstream: [media] em28xx: move v4l2 frame resolutions and scale data from struct em28xx to struct v4l2

The em28xx scaler data are used only for analog video. Move them to
struct em28xx_v4l2.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move videobuf2 related data from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:13 +0000 (16:33 -0300)]
upstream: [media] em28xx: move videobuf2 related data from struct em28xx to struct v4l2

The video and VBI-specific VB2 queue and mutexes are used only by
the v4l2 sub-driver. Move them to the V4L2 struct, preventing
wasting memory if this sub-driver is not used.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move video_device structs from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:12 +0000 (16:33 -0300)]
upstream: [media] em28xx: move video_device structs from struct em28xx to struct v4l2

There are 3 struct video_device at the em28xx common struct,
for video, VBI and radio. They all are used only by the V4L2 driver.
So, move them to the v4l2-specific struct.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move struct v4l2_clk *clk from struct em28xx to struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:11 +0000 (16:33 -0300)]
upstream: [media] em28xx: move struct v4l2_clk *clk from struct em28xx to struct v4l2

The current clock definition applies only to the V4L2 side of the
driver. Move its struct pointer to the v4l2_dev, where it belongs.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move struct v4l2_ctrl_handler ctrl_handler from struct...
Frank Schaefer [Mon, 24 Mar 2014 19:33:10 +0000 (16:33 -0300)]
upstream: [media] em28xx: move struct v4l2_ctrl_handler ctrl_handler from struct em28xx to struct v4l2

Controls are only applicable to V4L2 module. Move the corresponding
data structs to the proper place.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: start moving em28xx-v4l specific data to its own struct
Frank Schaefer [Mon, 24 Mar 2014 19:33:09 +0000 (16:33 -0300)]
upstream: [media] em28xx: start moving em28xx-v4l specific data to its own struct

That reduces a little bit the memory footprint when em28xx-video
is not loaded.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx-video: simplify usage of the pointer to struct v4l2_ctrl_han...
Frank Schaefer [Mon, 24 Mar 2014 19:33:08 +0000 (16:33 -0300)]
upstream: [media] em28xx-video: simplify usage of the pointer to struct v4l2_ctrl_handler in em28xx_v4l2_init()

The local var hdl is already pointing to &dev->ctrl_handler.
Use it, instead of dereferencing it all the time.

Code cleanup. No functional changes.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move sub-module data structs to a common place in the main...
Frank Schaefer [Mon, 24 Mar 2014 19:33:07 +0000 (16:33 -0300)]
upstream: [media] em28xx: move sub-module data structs to a common place in the main struct

Just a cleanup. No functional changes.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: remove the i2c_set_adapdata() call in em28xx_i2c_register()
Frank Schaefer [Sun, 11 May 2014 20:29:07 +0000 (17:29 -0300)]
upstream: [media] em28xx: remove the i2c_set_adapdata() call in em28xx_i2c_register()

It is no longer needed since nobody is calling i2c_get_adapdata() anymore.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] saa7134: add vidioc_querystd
Mikhail Domrachev [Tue, 1 Apr 2014 12:28:17 +0000 (09:28 -0300)]
upstream: [media] saa7134: add vidioc_querystd

Signed-off-by: Mikhail Domrachev <mihail.domrychev@comexp.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l2-ioctl: drop spurious newline in string
Hans Verkuil [Fri, 9 May 2014 12:26:04 +0000 (09:26 -0300)]
upstream: [media] v4l2-ioctl: drop spurious newline in string

The message logged by v4l_print_cropcap should be a single line withouti
linebreaks, just like all the other v4l_print_<ioctl> functions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] staging: media: omap24xx: use pr_info() instead of KERN_INFO
Vitaly Osipov [Thu, 10 Apr 2014 09:02:38 +0000 (06:02 -0300)]
upstream: [media] staging: media: omap24xx: use pr_info() instead of KERN_INFO

tcm825x.c:

changed printk to pr_info

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] staging: media: omap24xx: fix up checkpatch error message
Vitaly Osipov [Thu, 10 Apr 2014 09:01:50 +0000 (06:01 -0300)]
upstream: [media] staging: media: omap24xx: fix up checkpatch error message

tcm825x.c:

fixing ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf-dma-contig: fix incorrect argument to vm_iomap_memory...
Ma Haijun [Thu, 27 Mar 2014 11:07:06 +0000 (08:07 -0300)]
upstream: [media] videobuf-dma-contig: fix incorrect argument to vm_iomap_memory() call

The second argument should be physical address rather than virtual address.

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: coda: Use full device name for request_irq()
Alexander Shiyan [Sat, 26 Apr 2014 09:14:46 +0000 (06:14 -0300)]
upstream: [media] media: coda: Use full device name for request_irq()

This will help to debug driver, allows us to see the full name of
the device through /proc/interrupts.

           CPU0
...
 69:          0  mxc-avic  53  10023000.coda
...

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpbe: release buffers in case start_streaming call...
Lad, Prabhakar [Mon, 14 Apr 2014 14:52:31 +0000 (11:52 -0300)]
upstream: [media] media: davinci: vpbe: release buffers in case start_streaming call back fails

this patch adds support to release the buffer by calling
vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED
if start_streaming() call back fails.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] s2255drv: fix memory leak s2255_probe()
Daeseok Youn [Thu, 8 May 2014 22:57:18 +0000 (19:57 -0300)]
upstream: [media] s2255drv: fix memory leak s2255_probe()

smatch says:
 drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
possible memory leak of 'dev'

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] timblogiw: Introduce the use of the managed version of kzalloc
Himangi Saraogi [Wed, 7 May 2014 04:44:18 +0000 (01:44 -0300)]
upstream: [media] timblogiw: Introduce the use of the managed version of kzalloc

This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions.The label err_register is removed as it is no longer required.

The following Coccinelle semantic patch was used for making the change:

@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
  <+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
  ...
?-kfree(e);
  ...+>
}

@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
  <...
- kfree(e);
  ...>
}

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: parport: Fix format string mismatch in bw-qcam.c
Masanari Iida [Wed, 30 Apr 2014 15:57:50 +0000 (12:57 -0300)]
upstream: [media] media: parport: Fix format string mismatch in bw-qcam.c

Fix format string mismatch in bw-qcam.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf2-dma-sg: Fix NULL pointer dereference BUG
Ricardo Ribalda [Fri, 25 Apr 2014 16:11:29 +0000 (13:11 -0300)]
upstream: [media] videobuf2-dma-sg: Fix NULL pointer dereference BUG

vb2_get_vma() copy the content of the vma to a new structure but set
some of its pointers to NULL.

One of this pointer is used by follow_pte() called by follow_pfn()
on io memory.

This can lead to a NULL pointer derreference.

The version of vma that has not been cleared must be used.

[  406.143320] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[  406.143427] IP: [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[  406.143491] PGD 6c3f0067 PUD 6c3ef067 PMD 0
[  406.143546] Oops: 0000 [#1] SMP
[  406.143587] Modules linked in: qtec_mem qt5023_video qtec_testgen qtec_xform videobuf2_core gpio_xilinx videobuf2_vmalloc videobuf2_dma_sg qtec_cmosis videobuf2_memops qtec_pcie qtec_white fglrx(PO) qt5023 spi_xilinx spi_bitbang
[  406.143852] CPU: 0 PID: 299 Comm: tracker Tainted: P           O 3.13.0-qtec-standard #10
[  406.143927] Hardware name: QTechnology QT5022/QT5022, BIOS PM_2.1.0.309 X64 04/04/2013
[  406.144000] task: ffff880085c82d60 ti: ffff880085abe000 task.ti: ffff880085abe000
[  406.144067] RIP: 0010:[<ffffffff8115204c>]  [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[  406.144145] RSP: 0018:ffff880085abf888  EFLAGS: 00010296
[  406.144195] RAX: 0000000000000000 RBX: ffff880085abf8e0 RCX: ffff880085abf888
[  406.144260] RDX: ffff880085abf890 RSI: 00007fc52e173000 RDI: ffff8800863cbe40
[  406.144325] RBP: ffff880085abf8a8 R08: 0000000000000018 R09: ffff8800863cbf00
[  406.144388] R10: ffff880086703b80 R11: 00000000000001e0 R12: 0000000000018000
[  406.144452] R13: 0000000000000000 R14: ffffea0000000000 R15: ffff88015922fea0
[  406.144517] FS:  00007fc536e7c740(0000) GS:ffff88015ec00000(0000) knlGS:0000000000000000
[  406.144591] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  406.144644] CR2: 0000000000000040 CR3: 0000000066c9d000 CR4: 00000000000007f0
[  406.144708] Stack:
[  406.144731]  0000000000018000 00007fc52e18b000 0000000000000000 00007fc52e173000
[  406.144813]  ffff880085abf918 ffffffffa083b2fd ffff880085ab1ba8 0000000000000000
[  406.144894]  0000000000000000 0000000100000000 ffff880085abf928 ffff880159a20800
[  406.144976] Call Trace:
[  406.145011]  [<ffffffffa083b2fd>] vb2_dma_sg_get_userptr+0x14d/0x310 [videobuf2_dma_sg]
[  406.145089]  [<ffffffffa08507df>] __qbuf_userptr+0xbf/0x3e0 [videobuf2_core]
[  406.147229]  [<ffffffffa0041454>] ? mc_heap_lock_memory+0x1f4/0x490 [fglrx]
[  406.149234]  [<ffffffff813428f3>] ? cpumask_next_and+0x23/0x50
[  406.151223]  [<ffffffff810b2e38>] ? enqueue_task_fair+0x658/0xde0
[  406.153199]  [<ffffffff81061888>] ? native_smp_send_reschedule+0x48/0x60
[  406.155184]  [<ffffffff815836b9>] ? get_ctrl+0xa9/0xd0
[  406.157161]  [<ffffffff8116f4e4>] ? __kmalloc+0x1a4/0x1b0
[  406.159135]  [<ffffffffa0850b9c>] ? __vb2_queue_alloc+0x9c/0x4a0 [videobuf2_core]
[  406.161130]  [<ffffffffa0852d08>] __buf_prepare+0x1a8/0x210 [videobuf2_core]
[  406.163171]  [<ffffffffa0854c57>] __vb2_qbuf+0x27/0xcc [videobuf2_core]
[  406.165229]  [<ffffffffa0851dfd>] vb2_queue_or_prepare_buf+0x1ed/0x270 [videobuf2_core]
[  406.167325]  [<ffffffffa0854c30>] ? vb2_ioctl_querybuf+0x30/0x30 [videobuf2_core]
[  406.169419]  [<ffffffffa0851e9c>] vb2_qbuf+0x1c/0x20 [videobuf2_core]
[  406.171508]  [<ffffffffa0851ef8>] vb2_ioctl_qbuf+0x58/0x70 [videobuf2_core]
[  406.173604]  [<ffffffff8157d3a8>] v4l_qbuf+0x48/0x60
[  406.175681]  [<ffffffff8157b29c>] __video_do_ioctl+0x2bc/0x340
[  406.177779]  [<ffffffff8116f43c>] ? __kmalloc+0xfc/0x1b0
[  406.179883]  [<ffffffff8157cd0e>] ? video_usercopy+0x7e/0x470
[  406.181961]  [<ffffffff8157ce81>] video_usercopy+0x1f1/0x470
[  406.184021]  [<ffffffff8157afe0>] ? v4l_printk_ioctl+0xb0/0xb0
[  406.186085]  [<ffffffff810ae1ed>] ? account_system_time+0x8d/0x190
[  406.188149]  [<ffffffff8157d115>] video_ioctl2+0x15/0x20
[  406.190216]  [<ffffffff815781b3>] v4l2_ioctl+0x123/0x160
[  406.192251]  [<ffffffff810ce415>] ? rcu_eqs_enter+0x65/0xa0
[  406.194256]  [<ffffffff81186b28>] do_vfs_ioctl+0x88/0x560
[  406.196258]  [<ffffffff810ae145>] ? account_user_time+0x95/0xb0
[  406.198262]  [<ffffffff810ae6a4>] ? vtime_account_user+0x44/0x70
[  406.200215]  [<ffffffff81187091>] SyS_ioctl+0x91/0xb0
[  406.202107]  [<ffffffff817be109>] tracesys+0xd0/0xd5
[  406.203946] Code: 66 66 66 90 48 f7 47 50 00 44 00 00 b8 ea ff ff ff 74 52 55 48 89 e5 53 48 89 d3 48 8d 4d e0 48 8d 55 e8 48 83 ec 18 48 8b 47 40 <48> 8b 78 40 e8 8b fe ff ff 85 c0 75 27 48 8b 55 e8 48 b9 00 f0
[  406.208011] RIP  [<ffffffff8115204c>] follow_pfn+0x2c/0x70
[  406.209908]  RSP <ffff880085abf888>
[  406.211760] CR2: 0000000000000040
[  406.213676] ---[ end trace 996d9f64e6739a04 ]---

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] radio-bcm2048: fix wrong overflow check
Pali Rohár [Tue, 22 Apr 2014 15:02:39 +0000 (12:02 -0300)]
upstream: [media] radio-bcm2048: fix wrong overflow check

This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] s2255: Do not free fw_data until timer handler has actually stopped...
Kirill Tkhai [Thu, 17 Apr 2014 20:47:04 +0000 (17:47 -0300)]
upstream: [media] s2255: Do not free fw_data until timer handler has actually stopped using it

Function del_timer() does not guarantee that timer was really deleted.
If the timer handler is beeing executed at the moment, the function
does nothing. So, we have a race between del_timer() and kfree(), and
it's possible to use already freed memory in the handler.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] fix the code style errors in sn9c102
Jinqiang Zeng [Sat, 19 Apr 2014 03:09:47 +0000 (00:09 -0300)]
upstream: [media] fix the code style errors in sn9c102

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] av7110: fix confusing indenting
Dan Carpenter [Fri, 28 Mar 2014 08:26:03 +0000 (05:26 -0300)]
upstream: [media] av7110: fix confusing indenting

The else statement here is not aligned with the correct if statement.
I think the code works as intended and it's just the indenting which is
wrong.  Also kernel style says we should use curly braces here so I have
added those.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: fix devm_ioremap_resource() return value checking
Bartlomiej Zolnierkiewicz [Tue, 18 Mar 2014 10:41:42 +0000 (07:41 -0300)]
upstream: [media] v4l: ti-vpe: fix devm_ioremap_resource() return value checking

devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure.  Fix the checks inside
csc_create() and sc_create() accordingly.

Cc: Archit Taneja <archit@ti.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tested-by: Archit Taneja<archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: move norm_maxw() and norm_maxh() from em28xx.h to em28xx...
Frank Schaefer [Sat, 22 Mar 2014 13:01:03 +0000 (10:01 -0300)]
upstream: [media] em28xx: move norm_maxw() and norm_maxh() from em28xx.h to em28xx-video.c

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: remove function em28xx_compression_disable() and its call
Frank Schaefer [Mon, 24 Mar 2014 19:28:36 +0000 (16:28 -0300)]
upstream: [media] em28xx: remove function em28xx_compression_disable() and its call

em28xx_compression_disable() is a single line function which is called only one
time and this call also isn't needed.
Register 0x26 is always configured as part of the scaler configuration, which
in turn is always done when the resolution changes. And the initial resolution
setting is applied at first device open.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: remove some unused fields from struct em28xx
Frank Schaefer [Sat, 22 Mar 2014 13:01:01 +0000 (10:01 -0300)]
upstream: [media] em28xx: remove some unused fields from struct em28xx

Just driver cleanup. No functional changes.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: fix indenting in em28xx_usb_probe()
Frank Schaefer [Sat, 22 Mar 2014 13:00:59 +0000 (10:00 -0300)]
upstream: [media] em28xx: fix indenting in em28xx_usb_probe()

No functional changes.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap4iss: Relax usleep ranges
Laurent Pinchart [Mon, 21 Apr 2014 13:44:55 +0000 (10:44 -0300)]
upstream: [media] omap4iss: Relax usleep ranges

Allow the system to merge CPU wakeups by specifying different minimum
and maximum usleep values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap4iss: Use a common macro for all sleep-based poll loops
Laurent Pinchart [Fri, 28 Mar 2014 18:27:32 +0000 (15:27 -0300)]
upstream: [media] omap4iss: Use a common macro for all sleep-based poll loops

Instead of implementing usleep_range-based poll loops manually (and
slightly differently), create a generic iss_poll_wait_timeout() macro
and use it through the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap4iss: Add missing white space
Laurent Pinchart [Fri, 28 Mar 2014 17:39:54 +0000 (14:39 -0300)]
upstream: [media] omap4iss: Add missing white space

The error was reported by checkpatch.pl. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap4iss: Don't check for DEBUG when printing IRQ debugging messages
Laurent Pinchart [Fri, 28 Mar 2014 17:38:17 +0000 (14:38 -0300)]
upstream: [media] omap4iss: Don't check for DEBUG when printing IRQ debugging messages

Now that the VIDEO_OMAP4_DEBUG Kconfig option has been removed in favour
of dynamic printk, the DEBUG macro isn't defined anymore. Don't check
for it to guard IRQ debugging messages compilation, as they're already
guarded by the ISS_ISR_DEBUG macro.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap4iss: Remove VIDEO_OMAP4_DEBUG Kconfig option
Paul Bolle [Sun, 9 Feb 2014 15:09:37 +0000 (12:09 -0300)]
upstream: [media] omap4iss: Remove VIDEO_OMAP4_DEBUG Kconfig option

The option was supposed to control the definition of the DEBUG macro in
the Makefile but has been left unused by mistake. Given that debugging
should be enabled using dynamic printk, remote the Kconfig option.

[Reworked the commit message]

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Return correct return value in smiapp_registered()
Sakari Ailus [Sun, 4 May 2014 00:31:57 +0000 (21:31 -0300)]
upstream: [media] smiapp: Return correct return value in smiapp_registered()

Prepare for supporting systems using the Device tree. Should the resources
not be available at the time of driver probe(), the EPROBE_DEFER error code
must be also returned from its probe function.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Check for GPIO validity using gpio_is_valid()
Sakari Ailus [Sun, 4 May 2014 00:31:56 +0000 (21:31 -0300)]
upstream: [media] smiapp: Check for GPIO validity using gpio_is_valid()

Do not use our special value, SMIAPP_NO_XSHUTDOWN.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Use better regulator name for the Device tree
Sakari Ailus [Sun, 4 May 2014 00:31:55 +0000 (21:31 -0300)]
upstream: [media] smiapp: Use better regulator name for the Device tree

Rename "VANA" regulator as "vana".

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Scaling goodness is signed
Sakari Ailus [Tue, 15 Apr 2014 18:22:11 +0000 (15:22 -0300)]
upstream: [media] smiapp: Scaling goodness is signed

The "best" value was unsigned however, leading to signed-to-unsigned
comparison and wrong results. Possibly only on a newer GCC. Fix this by
making the best value signed as well.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Call limits quirk immediately after retrieving the limits
Sakari Ailus [Tue, 15 Apr 2014 17:59:42 +0000 (14:59 -0300)]
upstream: [media] smiapp: Call limits quirk immediately after retrieving the limits

Some of the limits are used before the limits quirk is called. Move the call
immediately after obtaining the limits.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] smiapp: Print the index of the format descriptor
Sakari Ailus [Tue, 15 Apr 2014 17:06:50 +0000 (14:06 -0300)]
upstream: [media] smiapp: Print the index of the format descriptor

This makes constructing quirks easier.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] uvcvideo: Fix marking buffer erroneous in case of FID toggling
Anton Leontiev [Tue, 25 Mar 2014 04:40:57 +0000 (01:40 -0300)]
upstream: [media] uvcvideo: Fix marking buffer erroneous in case of FID toggling

Set error bit for incomplete buffers when end of buffer is detected by
FID toggling (for example when last transaction with EOF is lost).
This prevents passing incomplete buffers to the userspace.

Signed-off-by: Anton Leontiev <bunder@t-25.ru>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] mem2mem_testdev: fix field, sequence and time copying
Hans Verkuil [Mon, 10 Mar 2014 13:58:28 +0000 (10:58 -0300)]
upstream: [media] mem2mem_testdev: fix field, sequence and time copying

- Set the sequence counters correctly.
- Copy timestamps, timecode, relevant buffer flags and field from
  the received buffer to the outgoing buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/platform/mem2mem_testdev.c

[m.chehab@samsung.com: also solve other random conflicts while
 backporting this patch]

9 years agoupstream: [media] mt9p031: Add support for PLL bypass
Laurent Pinchart [Sun, 9 Feb 2014 20:31:47 +0000 (17:31 -0300)]
upstream: [media] mt9p031: Add support for PLL bypass

When the input clock frequency is out of bounds for the PLL, bypass the
PLL and just divide the input clock to achieve the requested output
frequency.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: add [2013:025f] PCTV tripleStick (292e)
Antti Palosaari [Fri, 11 Apr 2014 01:11:27 +0000 (22:11 -0300)]
upstream: [media] em28xx: add [2013:025f] PCTV tripleStick (292e)

Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/usb/em28xx/em28xx-dvb.c

9 years agoupstream: [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
Antti Palosaari [Wed, 12 Feb 2014 17:59:37 +0000 (14:59 -0300)]
upstream: [media] em28xx-dvb: fix PCTV 461e tuner I2C binding

Add missing m88ts2022 module reference counts as removing that module
is not allowed when it is used by em28xx-dvb module. That same module
was not unregistered correctly, fix it too.

Error cases validated by returning errors from m88ds3103, m88ts2022
and a8293 probe().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: only enable PCTV 80e led when streaming
Mauro Carvalho Chehab [Tue, 4 Mar 2014 23:49:07 +0000 (20:49 -0300)]
upstream: [media] em28xx: only enable PCTV 80e led when streaming

Instead of keeping the led always on, use it to indicate
when DVB is streaming.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: Add LED support for Kworld UB435-Q v3
Mauro Carvalho Chehab [Tue, 4 Mar 2014 15:34:34 +0000 (12:34 -0300)]
upstream: [media] em28xx: Add LED support for Kworld UB435-Q v3

This device has a led at bit 7 of GPIO reg. 0x80 to indicate
when a DVB capture is happening.

Add support for it.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: PCTV tripleStick (292e) LNA support
Antti Palosaari [Wed, 23 Apr 2014 01:56:54 +0000 (22:56 -0300)]
upstream: [media] em28xx: PCTV tripleStick (292e) LNA support

External LNA between antenna connector and RF tuner is controlled
by EM28178 GPIO 0. GPIO value 1 is LNA active and value 0 is LNA
disabled.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: add [2013:025f] PCTV tripleStick (292e)
Antti Palosaari [Fri, 11 Apr 2014 01:11:27 +0000 (22:11 -0300)]
upstream: [media] em28xx: add [2013:025f] PCTV tripleStick (292e)

Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/usb/em28xx/em28xx-dvb.c

9 years agoupstream: [media] em28xx: add support for Kworld UB435-Q version 3
Mauro Carvalho Chehab [Mon, 3 Mar 2014 19:28:39 +0000 (16:28 -0300)]
upstream: [media] em28xx: add support for Kworld UB435-Q version 3

This device is close to Kworld UB435-Q, but it uses a different
tuner. Add support for it.

Tested with both 8VSB and 256QAM modulations.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
Documentation/video4linux/CARDLIST.em28xx

9 years agoupstream: [media] tef6862: fix warning on avr32 arch
Mauro Carvalho Chehab [Fri, 1 Nov 2013 16:19:05 +0000 (13:19 -0300)]
upstream: [media] tef6862: fix warning on avr32 arch

On avr32 arch, we get those warnings:
drivers/media/radio/tef6862.c:59:1: warning: "MODE_SHIFT" redefined
In file included from /devel/v4l/ktest-build/arch/avr32/include/asm/ptrace.h:11,
arch/avr32/include/uapi/asm/ptrace.h:41:1: warning: this is the location of the previous definition
Prefix MSA_ to the MSA register bitmap macros, to avoid reusing the same symbol.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] bfin_capture: drop unnecessary vb2_is_streaming check
Hans Verkuil [Thu, 17 Apr 2014 05:52:16 +0000 (02:52 -0300)]
upstream: [media] bfin_capture: drop unnecessary vb2_is_streaming check

The stop_streaming op is only called if streaming is in progress,
so drop the unnecessary 'if (!vb2_is_streaming(vq))' check.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: Fix initial configuration queue data
Archit Taneja [Mon, 10 Mar 2014 06:57:40 +0000 (03:57 -0300)]
upstream: [media] v4l: ti-vpe: Fix initial configuration queue data

The vpe output and capture queues are initially configured to default values in
vpe_open(). A G_FMT before any S_FMTs will result in these values being
populated.

The colorspace and bytesperline parameter of this initial configuration are
incorrect. This breaks compliance when as we get 'TRY_FMT(G_FMT) != G_FMT'.

Fix the initial queue configuration such that it wouldn't need to be fixed by
try_fmt.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap3isp: Don't try to locate external subdev for mem-to-mem pipelines
Laurent Pinchart [Sat, 15 Feb 2014 00:40:48 +0000 (21:40 -0300)]
upstream: [media] omap3isp: Don't try to locate external subdev for mem-to-mem pipelines

Memory-to-memory pipelines have no external subdev, we shouldn't try to
locate one and validate its configuration. The driver currently works by
chance due to another bug that results in failure to locate the external
subdev being ignored.

This gets rid of the "omap3isp omap3isp: can't find source, failing now"
error message in the kernel log when operating on a memory-to-memory
pipeline.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Tested-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: enable CSC support for VPE
Archit Taneja [Thu, 12 Dec 2013 08:36:03 +0000 (05:36 -0300)]
upstream: [media] v4l: ti-vpe: enable CSC support for VPE

Use the csc library functions to configure the CSC block in VPE.

Some changes are required in try_fmt to handle the pix->colorspace parameter
more correctly. Previously, we copied the source queue colorspace to the
destination queue colorspace as we didn't support RGB formats. Now, we configure
pix->colorspace based on the color format set(and the height of the image if
it's a YUV format).

Add basic RGB color formats to the list of supported vpe formats.

If the destination format is RGB colorspace, we also need to use the RGB output
port instead of the Luma and Chroma output ports. This requires configuring the
output data descriptors differently.

Also, make the default colorspace V4L2_COLORSPACE_SMPTE170M as that resembles
the Standard Definition colorspace more closely.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: Add helper to perform color conversion
Archit Taneja [Thu, 12 Dec 2013 08:36:02 +0000 (05:36 -0300)]
upstream: [media] v4l: ti-vpe: Add helper to perform color conversion

The CSC block can be used for color space conversion between YUV and RGB
formats.

It is configurable via a programmable set of coefficients. Add functionality to
choose the appropriate CSC coefficients and program them in the CSC registers.
We take the source and destination colorspace formats as the arguments, and
choose the coefficient table accordingly.

YUV to RGB coefficients are provided for standard and high definition
colorspaces. The coefficients can also be limited or full range. For now, only
full range coefficients are chosen. We would need some sort of control ioctl for
the user to specify the range needed. Not sure if there is a generic control
ioctl for this already?

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: create a color space converter block library
Archit Taneja [Thu, 12 Dec 2013 08:36:01 +0000 (05:36 -0300)]
upstream: [media] v4l: ti-vpe: create a color space converter block library

VPE and VIP IPs in DAR7x contain a color space converter(CSC) sub block. Create
a library which will perform CSC related configurations and hold CSC register
definitions. The functions provided by this library will be called by the vpe
and vip drivers using a csc_data handle.

The vpe_dev holds the csc_data handle. The handle represents an instance of the
CSC hardware, and the vpe driver uses it to access the CSC register offsets or
helper functions to configure these registers.

The CSC register offsets are now relative to the CSC block itself, so we need
to use the macro GET_OFFSET_TOP to get the CSC register offset relative to the
VPE IP in the vpe driver.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: enable basic scaler support
Archit Taneja [Thu, 12 Dec 2013 08:36:00 +0000 (05:36 -0300)]
upstream: [media] v4l: ti-vpe: enable basic scaler support

Add the required SC register configurations which lets us perform linear scaling
for the supported range of horizontal and vertical scaling ratios.

The horizontal scaler performs polyphase scaling using it's 8 tap 32 phase
filter, decimation is performed when downscaling passes beyond 2x or 4x.

The vertical scaler performs polyphase scaling using it's 5 tap 32 phase filter,
it switches to a simpler form of scaling using the running average filter when
the downscale ratio is more than 4x.

Many of the SC features like peaking, trimming and non-linear scaling aren't
implemented for now. Only the minimal register fields required for basic scaling
operation are configured.

The function to configure SC registers takes the sc_data handle, the source and
destination widths and heights, and the scaler address data block offsets for
the current context so that they can be configured.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: ti-vpe: support loading of scaler coefficients
Archit Taneja [Thu, 12 Dec 2013 08:35:58 +0000 (05:35 -0300)]
upstream: [media] v4l: ti-vpe: support loading of scaler coefficients

The SC block in VPE/VIP contains a SRAM within it. This internal memory
requires to be loaded with appropriate scaler coefficients from a contiguous
block of memory through VPDMA.

The horizontal and vertical scaler each require 2 sets of scaler coefficients
for luma and chroma scaling. The horizontal polyphase scaler requires
coefficients for a 32 phase and 8 tap filter. Similarly, the vertical scaler
requires coefficients for a 5 tap filter.

The choice of the scaler coefficients depends on the scaling ratio. Add
coefficient tables for different scaling ratios in sc_coeffs.h. In the case of
horizontal downscaling, we need to consider the change in ratio caused by
decimation performed by the horizontal scaler.

In order to load the scaler coefficients via VPDMA, a configuration descriptor
is used in block mode. The payload for the descriptor is the scaler coefficients
copied to memory. Coefficients for each phase have to be placed in memory in a
particular order understood by the scaler hardware.

The choice of the scaler coefficients, and the loading of the coefficients from
our tables to a contiguous buffer is managed by the functions
sc_set_hs_coefficients and sc_set_vs_coefficients.

The sc_data handle is now added with some parameters to describe the state of
the coefficients loaded in the SC block. 'loaded_coeff_h' and 'loaded_coeff_v'
hold the address of the last dma buffer which was used by VPDMA to copy
coefficients. This information can be used by a vpe mem-to-mem context to decide
whether it should load coefficients or not. 'hs_index' and 'vs_index' provide
some optimization by preventing loading of coefficients if the scaling ratio
didn't change between 2 contexts. 'load_coeff_h' and 'load_coeff_v' tell the
vpe/vip driver whether we need to load the coefficients through VPDMA or not.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] omap3isp: Fix buffer flags handling when querying buffer
Laurent Pinchart [Tue, 10 Dec 2013 01:46:17 +0000 (22:46 -0300)]
upstream: [media] omap3isp: Fix buffer flags handling when querying buffer

A missing break resulted in all done buffers being flagged with
V4L2_BUF_FLAG_QUEUED. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev
Laurent Pinchart [Mon, 4 Nov 2013 09:52:10 +0000 (06:52 -0300)]
upstream: [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev

The remote subdev of any video node in the OMAP3 ISP is an internal
subdev that is guaranteed to implement get_fmt. Don't check the return
value for -ENOIOCTLCMD, as this can't happen.
While at it, move non-critical code out of the mutex-protected section.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: marvell-ccic: use devm to release clk
Libin Yang [Tue, 5 Nov 2013 08:29:07 +0000 (05:29 -0300)]
upstream: [media] media: marvell-ccic: use devm to release clk

This patch uses devm to release the clks instead of releasing
manually.
And it adds enable/disable mipi_clk when getting its rate.

Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] platform drivers: Fix build on frv arch
Mauro Carvalho Chehab [Fri, 1 Nov 2013 16:59:04 +0000 (13:59 -0300)]
upstream: [media] platform drivers: Fix build on frv arch

On frv, the following errors happen:
drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_setup':
drivers/media/platform/soc_camera/rcar_vin.c:284:3: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_request_capture_stop':
drivers/media/platform/soc_camera/rcar_vin.c:353:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
This is because this driver forgot to include linux/io.h.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] sh_mobile_ceu_camera: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 06:01:46 +0000 (03:01 -0300)]
upstream: [media] sh_mobile_ceu_camera: remove deprecated IRQF_DISABLED

This patch proposes to remove the use of the IRQF_DISABLED flag
It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] mx3-camera: locking cleanup in mx3_videobuf_queue()
Dan Carpenter [Thu, 29 Aug 2013 08:23:36 +0000 (05:23 -0300)]
upstream: [media] mx3-camera: locking cleanup in mx3_videobuf_queue()

Smatch complains about the locking here because we mix spin_lock_irq()
with spin_lock_irqsave() in an unusual way.  According to Smatch, it's
not always clear if the IRQs are enabled or disabled when we return.  It
turns out this function is always called with IRQs enabled and we can
just use spin_lock_irq().
It's called from __enqueue_in_driver().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: vsp1: Initialize media device bus_info field
Laurent Pinchart [Thu, 22 Aug 2013 17:11:47 +0000 (14:11 -0300)]
upstream: [media] v4l: vsp1: Initialize media device bus_info field

Fill bus_info with the VSP1 platform device name

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource
Julia Lawall [Wed, 14 Aug 2013 08:11:15 +0000 (05:11 -0300)]
upstream: [media] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource

Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] s3c-camif: Remove redundant NULL check
Sachin Kamat [Tue, 30 Apr 2013 05:16:18 +0000 (02:16 -0300)]
upstream: [media] s3c-camif: Remove redundant NULL check

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: added initialisation of the clock array to ERR_PTR() value]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: treewide: Fix typo in printk
Masanari Iida [Tue, 21 May 2013 14:13:12 +0000 (23:13 +0900)]
upstream: treewide: Fix typo in printk

Correct spelling typo in various part of drivers

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9 years agoupstream: [media] bfin_capture: add query_dv_timings/enum_dv_timings support
Scott Jiang [Fri, 12 Apr 2013 22:52:59 +0000 (19:52 -0300)]
upstream: [media] bfin_capture: add query_dv_timings/enum_dv_timings support

More dv_timings ioctl ops are introduced in video core.
Add query_dv_timings/enum_dv_timings accordingly.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: dynamic IRAM setup for decoder
Philipp Zabel [Fri, 21 Jun 2013 06:55:32 +0000 (03:55 -0300)]
upstream: [media] coda: dynamic IRAM setup for decoder

This sets up IRAM areas used as temporary memory for the different
hardware units depending on the frame size.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] coda: use vb2_set_plane_payload instead of setting v4l2_planes...
Philipp Zabel [Fri, 21 Jun 2013 06:55:27 +0000 (03:55 -0300)]
upstream: [media] coda: use vb2_set_plane_payload instead of setting v4l2_planes[0].bytesused directly

As stated in the vb2_buffer documentation, drivers should not directly fill
in v4l2_planes[0].bytesused, but should use the vb2_set_plane_payload()
function instead. No functional changes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: treewide: Fix typo in printk
Masanari Iida [Mon, 30 Sep 2013 14:19:09 +0000 (23:19 +0900)]
upstream: treewide: Fix typo in printk

Correct spelling typo within various part of the kernel

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Conflicts:
drivers/media/i2c/s5c73m3/s5c73m3-core.c
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
drivers/net/wireless/ath/ath10k/pci.c

9 years agoupstream: media: v4l2-mem2mem: sync with upstream
Mauro Carvalho Chehab [Fri, 16 May 2014 19:45:43 +0000 (16:45 -0300)]
upstream: media: v4l2-mem2mem: sync with upstream

Upstream has some linespace differences. Make this one equal,
to make easier to backport future patches if needed.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf2-dma-sg: Fix typo on debug message
Ricardo Ribalda [Wed, 6 Nov 2013 18:48:38 +0000 (15:48 -0300)]
upstream: [media] videobuf2-dma-sg: Fix typo on debug message

num_pages_from_user and buf->num_pages were swapped.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
drivers/media/v4l2-core/videobuf2-dma-sg.c

9 years agoupstream: [media] vb2: stop_streaming should return void
Hans Verkuil [Thu, 17 Apr 2014 05:47:21 +0000 (02:47 -0300)]
upstream: [media] vb2: stop_streaming should return void

The vb2 core ignores any return code from the stop_streaming op.
And there really isn't anything it can do anyway in case of an error.
So change the return type to void and update any drivers that implement it.

The int return gave drivers the idea that this operation could actually
fail, but that's really not the case.

The pwc amd sdr-msi3101 drivers both had this construction:

        if (mutex_lock_interruptible(&s->v4l2_lock))
                return -ERESTARTSYS;

This has been updated to just call mutex_lock(). The stop_streaming op
expects this to really stop streaming and I very much doubt this will
work reliably if stop_streaming just returns without really stopping the
DMA.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
Documentation/video4linux/v4l2-pci-skeleton.c
drivers/staging/media/msi3101/sdr-msi3101.c

9 years agoupstream: [media] vb2: Add videobuf2-dvb support
Hans Verkuil [Wed, 9 Oct 2013 11:01:05 +0000 (08:01 -0300)]
upstream: [media] vb2: Add videobuf2-dvb support

With the new vb2_thread_start/stop core code it is very easy to implement
videobuf2-dvb. This should simplify converting existing videobuf drivers to
vb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] DocBook media: update bytesused field description
Hans Verkuil [Mon, 7 Apr 2014 13:01:28 +0000 (10:01 -0300)]
upstream: [media] DocBook media: update bytesused field description

For output buffers the application has to set the bytesused field.
In reality applications often do not set this since drivers that
deal with fix image sizes just override it anyway.

The vb2 framework will replace this field with the length field if
bytesused was set to 0 by the application, which is what happens
in practice. Document this behavior.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: add thread support
Hans Verkuil [Mon, 14 Apr 2014 10:33:00 +0000 (07:33 -0300)]
upstream: [media] vb2: add thread support

In order to implement vb2 DVB support you need to be able to start
a kernel thread that queues and dequeues buffers, calling a callback
function for every buffer. This patch adds support for that.

It's based on drivers/media/v4l2-core/videobuf-dvb.c, but with all the DVB
specific stuff stripped out, thus making it much more generic.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: start messages with a lower-case for consistency
Hans Verkuil [Mon, 7 Apr 2014 12:13:22 +0000 (09:13 -0300)]
upstream: [media] vb2: start messages with a lower-case for consistency

The kernel debug messages produced by vb2 started either with a
lower or an upper case character. Switched all to use lower-case
which seemed to be what was used in the majority of the messages.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: allow read/write as long as the format is single planar
Hans Verkuil [Fri, 11 Apr 2014 07:40:03 +0000 (04:40 -0300)]
upstream: [media] vb2: allow read/write as long as the format is single planar

It was impossible to read() or write() a frame if the queue type was multiplanar.
Even if the current format is single planar. Change this to just check whether
the number of planes is 1 or more.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: add vb2_fileio_is_active and check it more often
Hans Verkuil [Mon, 7 Apr 2014 12:23:50 +0000 (09:23 -0300)]
upstream: [media] vb2: add vb2_fileio_is_active and check it more often

Added a vb2_fileio_is_active inline function that returns true if fileio
is in progress. Check for this too in mmap() (you don't want apps mmap()ing
buffers used by fileio) and expbuf() (same reason).

In addition drivers should be able to check for this in queue_setup() to
return an error if an attempt is made to read() or write() with
V4L2_FIELD_ALTERNATE being configured. This is illegal (there is no way
to pass the TOP/BOTTOM information around using file I/O).

However, in order to be able to check for this the init_fileio function
needs to set q->fileio early on, before the buffers are allocated. So switch
to using internal functions (__reqbufs, vb2_internal_qbuf and
vb2_internal_streamon) to skip the fileio check. Well, that's why the internal
functions were created...

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: set timestamp when using write()
Hans Verkuil [Fri, 11 Apr 2014 07:36:57 +0000 (04:36 -0300)]
upstream: [media] vb2: set timestamp when using write()

When using write() to write data to an output video node the vb2 core
should set timestamps if V4L2_BUF_FLAG_TIMESTAMP_COPY is set. Nobody
else is able to provide this information with the write() operation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: use correct prefix
Hans Verkuil [Mon, 7 Apr 2014 12:08:47 +0000 (09:08 -0300)]
upstream: [media] vb2: use correct prefix

Many dprintk's in vb2 use a hardcoded prefix with the function name. In
many cases that is now outdated. To keep things consistent the dprintk
macro has been changed to print the function name in addition to the "vb2:"
prefix. Superfluous prefixes elsewhere in the code have been removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: Handle buffer timestamp flags correctly
Sakari Ailus [Tue, 25 Feb 2014 22:08:52 +0000 (19:08 -0300)]
upstream: [media] v4l: Handle buffer timestamp flags correctly

For COPY timestamps, buffer timestamp source flags will traverse the queue
untouched.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: Timestamp flags will soon contain timestamp source, not just...
Sakari Ailus [Sat, 1 Mar 2014 13:28:02 +0000 (10:28 -0300)]
upstream: [media] v4l: Timestamp flags will soon contain timestamp source, not just type

Mask out other bits when comparing timestamp types.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] vb2: simplify a confusing condition
Hans Verkuil [Mon, 24 Feb 2014 18:52:04 +0000 (15:52 -0300)]
upstream: [media] vb2: simplify a confusing condition

q->start_streaming_called is always true, so the WARN_ON check against
it being false can be dropped.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>