Commit Graph

8905 Commits (5da6e984805786c4d96498e1c51e971007dea6dc)

Author SHA1 Message Date
Ezequiel García 401a582f86 [media] media: em28xx: Paranoic stack save
This patch saves 255 bytes of stack on usb_probe() by removing
a char array. In some platforms this is represents a substantial save.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:14:22 -03:00
Bhupesh Sharma ee981c6fac [media] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcall
As the V4L2 based UVC webcam gadget (g_webcam) expects the
'videodev' to present when the 'webcam_bind' routine is called,
so 'videodev' should be available as early as possible.

Now, when 'g_webcam' is built as a module (i.e. not a part of
kernel) the late availability of 'videodev' is OK, but if
'g_webcam' is built statically as a part of the kernel,
the kernel crashes (a sample crash dump using Designware 2.0 UDC
is provided below).

To solve the same, this patch makes 'videodev_init' as a subsys initcall.

Kernel Crash Dump:

------------------

designware_udc designware_udc: Device Synopsys UDC probed csr 90810000: plug 90812000
g_webcam gadget: uvc_function_bind
Unable to handle kernel NULL pointer dereference at virtual address 000000e4
pgd = 80004000
[000000e4] *pgd=00000000
Internal error: Oops: 5 [#1] SMP
Modules linked in:
CPU: 0    Not tainted  (3.3.0-rc3-13888-ge774c03-dirty #20)
PC is at do_raw_spin_lock+0x10/0x16c
LR is at _raw_spin_lock+0x10/0x14
pc : [<8019e344>]    lr : [<804095c0>]    psr: 60000013
sp : 8f839d20  ip : 8f839d50  fp : 8f839d4c
r10: 80760a94  r9 : 8042de98  r8 : 00000154
r7 : 80760e94  r6 : 805cfc10  r5 : 8fb6a008  r4 : 8fb6a008
r3 : 805dd0c8  r2 : 8f839d48  r1 : 805cfc08  r0 : 000000e0
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 0000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0x8f8382f0)
Stack: (0x8f839d20 to 0x8f83a000)
9d20: ffffffff ffffffff 8fb6a008 8fb6a008 805cfc10 80760e94 00000154 8042de98
9d40: 8f839d5c 8f839d50 804095c0 8019e340 8f839d7c 8f839d60 80222b28 804095bc
9d60: 8fb12b80 8fb6a008 8fb6a010 805cfc08 8f839dc4 8f839d80 80223db8 80222adc
9d80: 8f839dac 8f839d90 8022baa0 8019e2e8 8fb6a008 8075e7f4 8fb6a008 8fb6a008
9da0: 00000000 8fb6a008 80760e94 00000154 8042de98 80760a94 8f839ddc 8f839dc8
9dc0: 802242a8 80223d1c 8fb12b80 8fb6a000 8f839e1c 8f839de0 8030132c 80224298
9de0: 80223ce8 803f2ee8 00000001 804f7750 8f839e1c 8f824008 805cff20 8f824000
9e00: 8fb6a000 ffffffff 00000000 8f8d4880 8f839e4c 8f839e20 80562e3c 80301100
9e20: 00000000 8fb13140 8f824008 805cff20 8042aa68 8f824000 8042aa8c 805e4d40
9e40: 8f839e64 8f839e50 802d20c4 80562ba8 805d0058 805cff20 8f839e8c 8f839e68
9e60: 80563034 802d206c 8042aa8c 805cff20 8f8d4880 00000000 805cfc08 8fb12a40
9e80: 8f839e9c 8f839e90 805630c4 80562ec4 8f839ebc 8f839ea0 802d2364 805630b0
9ea0: 805cfeac 8f8d4880 805cfbe8 807605e8 8f839ed4 8f839ec0 80562b3c 802d22cc
9ec0: 80562ac4 8f8d4880 8f839f04 8f839ed8 802d0b40 80562ad0 8f839ef4 805cff90
9ee0: 805cff90 805cfb98 00000000 00000000 805cfbe8 805e4d40 8f839f3c 8f839f08
9f00: 802cd078 802d0a18 00000000 802d0a0c 00000000 8fb9ba00 802d0a0c 805cff90
9f20: 00000013 00000000 00000000 805e4d40 8f839f5c 8f839f40 802cf390 802ccff0
9f40: 00000003 00000003 804fb598 00000000 8f839f74 8f839f60 802d2554 802cf2a0
9f60: 8f838000 8057731c 8f839f84 8f839f78 80562b90 802d24d0 8f839fdc 8f839f88
9f80: 800085d4 80562b84 805af2ac 805af2ac 80562b78 00000000 00000013 00000000
9fa0: 00000000 00000000 8f839fc4 8f839fb8 80043dd0 8057706c 8057731c 8002875c
9fc0: 00000013 00000000 00000000 00000000 8f839ff4 8f839fe0 805468d4 800085a0
9fe0: 00000000 80546840 00000000 8f839ff8 8002875c 8054684c 51155555 55545555
Backtrace:
[<8019e334>] (do_raw_spin_lock+0x0/0x16c) from [<804095c0>] (_raw_spin_lock+0x10/0x14)
 r9:8042de98 r8:00000154 r7:80760e94 r6:805cfc10 r5:8fb6a008
r4:8fb6a008
[<804095b0>] (_raw_spin_lock+0x0/0x14) from [<80222b28>] (get_device_parent+0x58/0x1c0)
[<80222ad0>] (get_device_parent+0x0/0x1c0) from [<80223db8>] (device_add+0xa8/0x57c)
 r6:805cfc08 r5:8fb6a010 r4:8fb6a008 r3:8fb12b80
[<80223d10>] (device_add+0x0/0x57c) from [<802242a8>] (device_register+0x1c/0x20)
[<8022428c>] (device_register+0x0/0x20) from [<8030132c>] (__video_register_device+0x238/0x484)
 r4:8fb6a000 r3:8fb12b80
[<803010f4>] (__video_register_device+0x0/0x484) from [<80562e3c>] (uvc_function_bind+0x2a0/0x31c)
[<80562b9c>] (uvc_function_bind+0x0/0x31c) from [<802d20c4>] (usb_add_function+0x64/0x118)
[<802d2060>] (usb_add_function+0x0/0x118) from [<80563034>] (uvc_bind_config+0x17c/0x1ec)
 r5:805cff20 r4:805d0058
[<80562eb8>] (uvc_bind_config+0x0/0x1ec) from [<805630c4>] (webcam_config_bind+0x20/0x28)
 r8:8fb12a40 r7:805cfc08 r6:00000000 r5:8f8d4880 r4:805cff20
r3:8042aa8c
[<805630a4>] (webcam_config_bind+0x0/0x28) from [<802d2364>] (usb_add_config+0xa4/0x124)
[<802d22c0>] (usb_add_config+0x0/0x124) from [<80562b3c>] (webcam_bind+0x78/0xb4)
 r6:807605e8 r5:805cfbe8 r4:8f8d4880 r3:805cfeac
[<80562ac4>] (webcam_bind+0x0/0xb4) from [<802d0b40>] (composite_bind+0x134/0x308)
 r4:8f8d4880 r3:80562ac4
[<802d0a0c>] (composite_bind+0x0/0x308) from [<802cd078>] (dw_udc_start+0x94/0x2bc)
[<802ccfe4>] (dw_udc_start+0x0/0x2bc) from [<802cf390>] (usb_gadget_probe_driver+0xfc/0x180)
[<802cf294>] (usb_gadget_probe_driver+0x0/0x180) from [<802d2554>] (usb_composite_probe+0x90/0xb4)
 r6:00000000 r5:804fb598 r4:00000003 r3:00000003
[<802d24c4>] (usb_composite_probe+0x0/0xb4) from [<80562b90>] (webcam_init+0x18/0x24)
 r5:8057731c r4:8f838000
[<80562b78>] (webcam_init+0x0/0x24) from [<800085d4>] (do_one_initcall+0x40/0x184)
[<80008594>] (do_one_initcall+0x0/0x184) from [<805468d4>] (kernel_init+0x94/0x134)
[<80546840>] (kernel_init+0x0/0x134) from [<8002875c>] (do_exit+0x0/0x6f8)
 r5:80546840 r4:00000000
Code: e1a0c00d e92ddbf0 e24cb004 e24dd008 (e5902004)
---[ end trace 7ecca37f36fbdc06 ]---

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:00:15 -03:00
Martin Hostettler 251cb88e2e [media] v4l: Add driver for Micron MT9M032 camera sensor
The MT9M032 is a parallel 1.6MP sensor from Micron controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports cropping, gain,
exposure and v/h flipping controls in monochrome mode with an
external pixel clock.

[Lots of clean up, fixes and enhancements]

Signed-off-by: Martin Hostettler <martin@neutronstar.dyndns.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 18:56:33 -03:00
Laurent Pinchart 08cd43cc46 [media] mt9p031: Use generic PLL setup code
Compute the PLL parameters at runtime using the generic Aptina PLL
helper.

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>
2012-03-19 18:54:22 -03:00
Laurent Pinchart 0b27c81ba3 [media] v4l: Aptina-style sensor PLL support
Add a generic helper function to compute PLL parameters for PLL found in
several Aptina sensors.

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>
2012-03-19 18:53:39 -03:00
Laurent Pinchart c0f9976662 [media] mt9p031: Remove unused xskip and yskip fields in struct mt9p031
The fields are set but never used, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 18:53:02 -03:00
Ezequiel García 2321acf296 [media] media: em28xx: Remove unused urb arrays from device struct
These arrays were embedded in the struct itself, but they weren't
used by anyone, since urbs are now dinamically allocated
at em28xx_usb_isoc_ctl struct.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:45:49 -03:00
Sylwester Nawrocki 68a6bb5465 [media] s5p-csis: Fix compilation with PM_SLEEP disabled
Fix following compilation error when CONFIG_PM_SLEEP is disabled:

  CC      drivers/media/video/s5p-fimc/mipi-csis.o
drivers/media/video/s5p-fimc/mipi-csis.c: In function ‘s5pcsis_remove’:
drivers/media/video/s5p-fimc/mipi-csis.c:956: error: implicit declaration of function ‘s5pcsis_suspend’

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:42:24 -03:00
Mauro Carvalho Chehab c9e7252c62 [media] /w9966: Fix a build warning
drivers/media/video/w9966.c: In function ‘__check_pardev’:
drivers/media/video/w9966.c:136:1: warning: return from incompatible pointer type [enabled by default]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:37:59 -03:00
Fabio Estevam 0c22affeba [media] video: Kconfig: Select VIDEOBUF2_DMA_CONTIG for VIDEO_MX2
Fix the following build error:

LD      .tmp_vmlinux1
drivers/built-in.o: In function `mx2_camera_init_videobuf':
clkdev.c:(.text+0xcfaf4): undefined reference to `vb2_dma_contig_memops'
drivers/built-in.o: In function `mx2_camera_probe':
clkdev.c:(.devinit.text+0x5734): undefined reference to `vb2_dma_contig_init_ctx'
clkdev.c:(.devinit.text+0x5778): undefined reference to `vb2_dma_contig_cleanup_ctx'
drivers/built-in.o: In function `mx2_camera_remove':
clkdev.c:(.devexit.text+0x89c): undefined reference to `vb2_dma_contig_cleanup_ctx'

commit c6a41e3271 ([media] media i.MX27 camera: migrate driver to videobuf2)
missed to select VIDEOBUF2_DMA_CONTIG in Kconfig.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:34:56 -03:00
Scott Jiang 63b1a90da9 [media] add blackfin capture bridge driver
This is a v4l2 bridge driver for Blackfin video capture device, support ppi and eppi interface.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:08:20 -03:00
Scott Jiang f877ed9780 [media] vs6624: add vs6624 sensor driver
This is a v4l2 sensor-level driver for the ST VS6624 camera.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:04:26 -03:00
Scott Jiang 202ea1f05b [media] adv7183: add adv7183 decoder driver
This driver is a v4l2 subdevice driver to support Analog Devices ADV7183 SDTV video decoder.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:04:10 -03:00
Jesper Juhl 266e8ae37d [media] media, cx231xx: Fix double free on close
In cx231xx_v4l2_close() there are two calls to
cx231xx_release_resources(dev) followed by kfree(dev). That is a
problem since cx231xx_release_resources() already kfree()'s its
argument, so we end up doing a double free.

Easily resolved by just removing the redundant kfree() calls after the
calls to cx231xx_release_resources().

I also changed the 'dev = NULL' assignments (which are rather
pointless since 'dev' is about to go out of scope), to 'fh->dev = NULL'
since it looks to me that that is what was actually intended.
And I removed the 'dev = NULL' assignment at the end of
cx231xx_release_resources() since it is pointless.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:13:51 -03:00
Andrew Morton 66ede038aa [media] uvcvideo: uvc_driver.c: use linux/atomic.h
There's no known problem here, but this is one of only two non-arch files
in the kernel which use asm/atomic.h instead of linux/atomic.h.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:08:34 -03:00
Laurent Pinchart 3efe2f1b12 [media] uvcvideo: Add support for Dell XPS m1530 integrated webcam
The camera requires the PROBE_DEF quirk. Add a corresponding entry in
the device IDs list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:07:41 -03:00
Javier Martin ab86e9e03d [media] uvcvideo: Allow userptr IO mode
Userptr can be very useful if a UVC camera is requested to use video
buffers allocated by another processing device. So that buffers don't
need to be copied.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:07:13 -03:00
Laurent Pinchart 1a5e4c867c [media] uvcvideo: Implement compat_ioctl32 for custom ioctls
Support 32-bit/64-bit compatibility for the the UVCIOC_ ioctls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:07:01 -03:00
Laurent Pinchart a3ec69b707 [media] uvcvideo: Return -ENOTTY in case of unknown ioctl
-EINVAL is the wrong error code in that case, replace it with -ENOTTY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:06:27 -03:00
Laurent Pinchart b9d0aa6e21 [media] v4l: Add custom compat_ioctl32 operation
Drivers implementing custom ioctls need to handle 32-bit/64-bit
compatibility themselves. Provide them with a way to do so.

To avoid circular module dependencies, merge the v4l2-compat-ioctl32
module into videodev. There is no point in keeping them separate, as the
v4l2_compat_ioctl32() function is required by videodev if CONFIG_COMPAT
is set anyway.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:06:12 -03:00
Hans Verkuil f769c26085 [media] Two small string fixes in v4l2-ctrls.c
Fix one typo and use 'Microseconds' instead of 'useconds' in the pre-emphasis
descriptions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:03:35 -03:00
Mauro Carvalho Chehab 9ce28d827f Merge tag 'v3.3' into staging/for_v3.4
* tag 'v3.3': (1646 commits)
  Linux 3.3
  Don't limit non-nested epoll paths
  netfilter: ctnetlink: fix race between delete and timeout expiration
  ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
  nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
  nilfs2: clamp ns_r_segments_percentage to [1, 99]
  afs: Remote abort can cause BUG in rxrpc code
  afs: Read of file returns EBADMSG
  C6X: remove dead code from entry.S
  wimax/i2400m: fix erroneous NETDEV_TX_BUSY use
  net/hyperv: fix erroneous NETDEV_TX_BUSY use
  net/usbnet: reserve headroom on rx skbs
  bnx2x: fix memory leak in bnx2x_init_firmware()
  bnx2x: fix a crash on corrupt firmware file
  sch_sfq: revert dont put new flow at the end of flows
  ipv6: fix icmp6_dst_alloc()
  MAINTAINERS: Add Serge as maintainer of capabilities
  drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode
  MAINTAINERS: add entry for exynos mipi display drivers
  MAINTAINERS: fix link to Gustavo Padovans tree
  ...
2012-03-19 13:41:24 -03:00
Linus Torvalds 72c79bdbda Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 "For 4 fixes for 3.3 (all trivial):
       - uvc video driver: fixes a division by zero;
       - davinci: add module.h to fix compilation;
       - smsusb: fix the delivery system setting;
       - smsdvb: the get_frontend implementation there is broken.

  The smsdvb patch has 127 lines, but it is trivial: instead of
  returning a cache of the set_frontend (with is wrong, as it doesn't
  have the updated values for the data, and the implementation there is
  buggy), it copies the information of the detected DVB parameters from
  the smsdvb private structures into the corresponding DVBv5 struct
  fields."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] smsdvb: fix get_frontend
  [media] smsusb: fix the default delivery system setting
  [media] media: davinci: added module.h to resolve unresolved macros
  [media] [FOR,v3.3] uvcvideo: Avoid division by 0 in timestamp calculation
2012-03-15 17:06:05 -07:00
Sander Eikelenboom 632fba4d01 [media] cx25821: Add a card definition for "No brand" cards that have: subvendor = 0x0000 subdevice = 0x0000
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 12:42:28 -03:00
Javier Martin 0f67a03ff6 [media] media: tvp5150: support g_mbus_fmt callback
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 12:07:14 -03:00
Javier Martin 963ddc63e2 [media] media: tvp5150: Add cropping support
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 12:06:56 -03:00
Santosh Nayak 3907b01997 [media] Driver: video: Use the macro DMA_BIT_MASK()
Use the macro DMA_BIT_MASK instead of the constant  0xffffffff.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:25:41 -03:00
Masanari Iida c5f79f6a0c [media] [trivial] davinci: Fix typo in dm355_ccdvc.c
Correct spelling "thresold" to "threshold" in
drivers/media/video/davinci/dm355_ccdc.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:09:29 -03:00
Danny Kukawka b3f5badaa1 [media] cx18-driver: fix handling of 'radio' module parameter
Reverse cx18-driver part of commit
90ab5ee941 and change
module_param_array() type from bool to int to fix
compiler warning:

In function ‘__check_radio’:
113:1: warning: return from incompatible pointer type [enabled by default]
At top level:
113:1: warning: initialization from incompatible pointer type [enabled by default]
113:1: warning: (near initialization for ‘__param_arr_radio.num’) [enabled by default]

v2: corrected version, don't change to module_param_named(), change
    all to int/uint

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:07:45 -03:00
Larry Finger 0d47bf5585 [media] ivtv: Fix build warning
In driver ivtv, there is a mismatch between the type of the radio module
parameter and the storage variable, which leads to the following
warning:

  CC [M]  drivers/media/video/ivtv/ivtv-driver.o
drivers/media/video/ivtv/ivtv-driver.c: In function ‘__check_radio’:
drivers/media/video/ivtv/ivtv-driver.c:142: warning: return from incompatible pointer type
drivers/media/video/ivtv/ivtv-driver.c: At top level:
drivers/media/video/ivtv/ivtv-driver.c:142: warning: initialization from incompatible pointer type

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:05:20 -03:00
Hans Verkuil eb2ba85547 [media] ivtv: simplify how the decoder controls are set up
The code was unnecessarily complex, introducing a hdl_out handler that was
not needed. Instead just add the controls to the cxhdl.hdl handler directly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:03:51 -03:00
Hans Verkuil 072e660257 [media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs
Currently v4l2_ctrl_add_handler adds only the controls that are owned
by the handler. This is wrong. Instead all controls, whether owned or
not, should be added.

This is also implied by the v4l2-controls.txt documentation and it is
clearly the right thing to do. The only reason this was never noticed
before is because we never did this. Only recent changes in ivtv made
this error visible because there a third handler layer was added (handler
A inherits from handler B which inherits from C, D and E). Without this
change handler A only sees the controls owned by handler B and the controls
from C, D and E are missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:03:26 -03:00
Kyle Strickland 25fa207157 [media] Add support for KWorld PC150-U ATSC hybrid tuner card
[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Kyle Strickland <kyle@kyle.strickland.name>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:01:25 -03:00
Andy Shevchenko 8d834b526a [media] media: gspca: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:42:08 -03:00
Andy Shevchenko d377cfcc42 [media] media: ivtv: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:42:03 -03:00
Andy Shevchenko 30fc78bad1 [media] media: saa7164: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:41:57 -03:00
Andy Shevchenko f0d81f728e [media] media: saa7134: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:41:52 -03:00
Andy Shevchenko d94a2c0341 [media] media: video: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
   CHECK   drivers/media/video/videobuf-vmalloc.c
   CC [M]  drivers/media/video/videobuf-vmalloc.o
 +cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/frontends: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/frontends: No such file or directory [enabled by default]
   LD      drivers/media/built-in.o

Some details could be found in [1] as well.

[1] http://comments.gmane.org/gmane.linux.kbuild.devel/7733

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:40:51 -03:00
Dan Carpenter 3b2a63061e [media] s2255drv: fix some endian bugs
I don't have this hardware and I don't know the subsystem very well.  So
please review this patch carefully.  The original code definitely looks
buggy though.

Sparse complains about some endian bugs where little endian bugs are
treated as cpu endian.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:56 -03:00
Dan Carpenter 6c61ac6355 [media] s2255drv: cleanup vidioc_enum_fmt_cap()
"f" wasn't checked consistently, so static checkers complain.  This
function is always called with a valid "f" pointer, so I have removed
the check.

Also the indenting was messed up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:56 -03:00
Danny Kukawka da0af4788c [media] mt9p031.c included media/v4l2-subdev.h twice
drivers/media/video/mt9p031.c included 'media/v4l2-subdev.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:55 -03:00
Danny Kukawka cf51674000 [media] adp1653: included linux/module.h twice
drivers/media/video/adp1653.c included 'linux/module.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:54 -03:00
Javier Martin 750a6dff6e [media] media: i.MX27 camera: Add resizing support
If the attached video sensor cannot provide the
requested image size, try to use resizing engine
included in the eMMa-PrP IP.

This patch supports both averaging and bilinear
algorithms.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:06:44 -03:00
Fabio Estevam e9de6167fb [media] media: video: mx2_camera.c: Remove unneeded dev_dbg
csi clock frequency is already shown by:

dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n",
		clk_get_rate(pcdev->clk_csi));

,so no need to have the dev_dbg call to present the same information.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:05:51 -03:00
Fabio Estevam d867be1cc4 [media] media: video: mx2_camera.c: Provide error message if clk_get fails
Provide error message if clk_get fails.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:04:39 -03:00
Javier Martin 560fab62fa [media] media: i.MX27 camera: more efficient discard buffer handling
Some elements of 'mx2_buffer' are grouped together in another
auxiliary structure. This way we don't need to have unused
'vb2_buffer' structures for both discard buffers.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:04:10 -03:00
Javier Martin 8886a881e2 [media] media: i.MX27 camera: fix compilation warning
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:46:55 -03:00
Javier Martin 665ad8af8f [media] media: i.MX27 camera: return IRQ_NONE if no IRQ status bit is set
If active_bufs() list is empty and no IRQ status bit is set
we are probably dealing with a share IRQ. Return IRQ_NONE in
this case.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:45:06 -03:00
Javier Martin 8636ead8b2 [media] media: i.MX27 camera: Use spin_lock() inside the IRQ handler
We don't need to use spin_lock_irqsave() since there are not
any other IRQs that can race with this ISR.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:44:00 -03:00
Javier Martin a654ba16fd [media] media: i.MX27 camera: Use list_first_entry() whenever possible
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: fix one list_first_entry() instance]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:43:03 -03:00