dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

15016 Commits

Author SHA1 Message Date
Andrew Karpow 86163adb81 [media] rtl28xxu: 0ccd:00d7 TerraTec Cinergy T Stick+
added usb-id as driver supports the stick

Signed-off-by: Andrew Karpow <andy@mailbox.tu-berlin.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 12:04:53 -02:00
Antti Palosaari 08e5727416 [media] rtl28xxu: 1d19:1102 Dexatek DK mini DVB-T Dongle
Add new USB ID as driver supports it.

Reported-by: Hubert Lin <hubertwslin@gmail.com>
Tested-by: Hubert Lin <hubertwslin@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 12:04:35 -02:00
Anatolij Gustschin 9bb047cd1a [media] mt9v022: fix the V4L2_CID_EXPOSURE control
Since the MT9V022_TOTAL_SHUTTER_WIDTH register is controlled in manual
mode by V4L2_CID_EXPOSURE control, it shouldn't be written directly in
mt9v022_s_crop(). In manual mode this register should be set to the
V4L2_CID_EXPOSURE control value. Changing this register directly and
outside of the actual control function means that the register value
is not in sync with the corresponding control value. Thus, the following
problem is observed:
    - setting this control initially succeeds
    - VIDIOC_S_CROP ioctl() overwrites the MT9V022_TOTAL_SHUTTER_WIDTH
      register
    - setting this control to the same value again doesn't
      result in setting the register since the control value
      was previously cached and doesn't differ
Remove MT9V022_TOTAL_SHUTTER_WIDTH register setting in mt9v022_s_crop()
and add a comment explaining why it is not needed in manual mode.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:59:49 -02:00
Wei Yongjun f1ccccaf23 [media] mx2_camera: fix missing unlock on error in mx2_start_streaming()
Add the missing unlock on the error handle path in function
mx2_start_streaming().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:58:27 -02:00
Guennadi Liakhovetski 6a3082adc8 [media] media: omap1_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in omap1_camera. Fix them by adjusting a function declaration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:45:59 -02:00
Guennadi Liakhovetski 5c11191334 [media] media: mx1_camera: use the default .set_crop() implementation
.set_crop() implementation in mx1_camera is identical with the default.
Remove the copy to switch to using the default stab.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:45:41 -02:00
Guennadi Liakhovetski d63bb2790c [media] media: mx2_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in mx2_camera. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:45:13 -02:00
Guennadi Liakhovetski 60cd1ee17d [media] media: mx3_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in mx3_camera. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:44:56 -02:00
Guennadi Liakhovetski 448a61f09e [media] media: pxa_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in pxa_camera.c. Fix them by adjusting a function declaration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:44:35 -02:00
Guennadi Liakhovetski 3ecb091e88 [media] media: sh_mobile_ceu_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in sh_mobile_ceu_camera. Fix them by cleanly separating writable
and read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:39:10 -02:00
Guennadi Liakhovetski 17803580ac [media] media: sh_vou: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in sh_vou. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 10:37:40 -02:00
Hans Verkuil cf9afb1daf [media] adv7604: restart STDI once if format is not found
The STDI block may measure wrong values, especially for lcvs and lcf. If the
driver can not find any valid timing, the STDI block is restarted to measure
the video timings again. The function will return an error, but the restart of
STDI will generate a new STDI interrupt and the format detection process will
restart.

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 18:12:20 -02:00
Hans Verkuil ccbd5bc448 [media] adv7604: use presets where possible
Use predefined video timings (prim_mode/vid_std) when available as recommended
by Analog Devices (http://ez.analog.com/message/48267#48267).
Also remove 720p30 support since the ADV7604 can't handle that.
(http://ez.analog.com/message/61488#61488)

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 18:11:43 -02:00
Hans Verkuil 6b0d5d344a [media] adv7604: Replace prim_mode by mode
Changes the way the primary mode is handled:
- Remove it from platform_data since it doesn't belong there.
- Add a new mode enum for use with s_routing.
- Collapse the two HDMI modes into one HDMI mode: when setting up the
  timings manually we do not need to select HDMI_COMP mode. That's only
  needed when selecting a preset.
This patch prepares for the next step where we switch to using the presets
where available.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 17:43:49 -02:00
Hans Verkuil 809396474f [media] adv7604: cleanup references
Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 17:42:57 -02:00
Antti Palosaari 41269386b0 [media] dvb_usb_v2: switch interruptible mutex to normal
Fixes error: dvb_usb_v2: pid_filter() failed=-4

error code -4 is EINTR, Interrupted system call

That error blocks I/O in some cases as -EINTR error was returned
by the mutex which was protecting USB control messages. We want
configure hardware to sleep mode on every case after tuning is
stopped. That kind of behavior blocks it, leaving hardware some
unwanted state in worst case.

That error was seen every time when af9015 was plugged to USB1.1
which leads use of hardware PID filters. Stop tuning (tzap) with
ctrl+c failed as driver tries to remove hardware PID filters.

Tested with every hardware which uses routine in question.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-09 15:33:58 +01:00
Antti Palosaari 2d9e7ea690 [media] dvb_usb_v2: fix pid_filter callback error logging
Code block braces were missing which leds broken error logging and compiler warning.

drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usb_ctrl_feed':
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:291:12: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Milan Tuma <milan.olin@seznam.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-08 09:34:33 +01:00
Shaik Ameer Basha 7de5ae739a [media] exynos-gsc: change driver compatible string
As G-Scaler is going to stay unchanged across all exynos5 series
SoCs, changing the driver compatible string name to
"samsung,exynos5-gsc" from "samsung,exynos5250-gsc".
This change is as per the discussion in the devicetree forum.
http://www.mail-archive.com/devicetree-discuss@lists.ozlabs.org/msg16448.html

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 08:18:32 -02:00
Laurent Pinchart 55c8504672 [media] omap3isp: Fix warning caused by bad subdev events operations prototypes
Remove the const keyword from the V4L2 subdev events operations to match
the V4L2 API.

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-10-25 16:30:35 -02:00
Laurent Pinchart 1fa48cd5c4 [media] omap3isp: video: Fix warning caused by bad vidioc_s_crop prototype
Commit 4f996594 ("v4l2: make vidioc_s_crop const") modified the
vidioc_s_crop operation prototype but forgot to update the OMAP3 ISP
driver. Add a const keyword to fix the function prototype.

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-10-25 16:30:06 -02:00
Wei Yongjun b0f9bf369f [media] dvb-frontends: fix potential NULL pointer dereference in stv0900_set_mclk()
The dereference should be moved below the NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25 16:20:26 -02:00
Sachin Kamat 8163ec0b26 [media] s5p-fimc: Fix potential NULL pointer dereference
'fimc' was being dereferenced before the NULL check.
Moved it to after the check.

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>
2012-10-25 14:42:17 -02:00
Sylwester Nawrocki afd7348c60 [media] s5p-fimc: Fix platform entities registration
Make sure the platform sub-devices are registered to the media
device driver only when v4l2_device_register_subdev() succeeds.

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-10-25 14:42:16 -02:00
Sylwester Nawrocki 02924ca458 [media] s5p-csis: Select S5P_SETUP_MIPIPHY
After commit ccbfd1d49d "[media] s5p-csis: Replace phy_enable platform.."
s5p-csis depends now on the commmon MIPI CSIS/MIPI DSIM DPHY control code.
Add select S5P_SETUP_MIPIPHY to make this dependency explicit, until
the code from arch/arm/plat-samsung is moved to drivers/ directory and
converted to a regular phy driver module.

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-10-25 14:42:16 -02:00
Sylwester Nawrocki 41fd087f5d [media] s5p-fimc: Don't ignore return value of vb2_queue_init()
Add missing checks for return value of vb2_queue_init(), after
this function has been modified recently to not throw BUG_ON().
This eliminates related compiler warnings,
drivers/media/platform/s5p-fimc/fimc-lite.c: In function fimc_lite_subdev_registered:
drivers/media/platform/s5p-fimc/fimc-lite.c:1256:16: warning: ignoring return value
of vb2_queue_init, declared with attribute warn_unused_result [-Wunused-result]
drivers/media/platform/s5p-fimc/fimc-capture.c: In function fimc_register_capture_device:
drivers/media/platform/s5p-fimc/fimc-capture.c:1739:16: warning: ignoring return value
of vb2_queue_init, declared with attribute warn_unused_result [-Wunused-result]

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-10-25 14:42:15 -02:00
Mauro Carvalho Chehab 2c76a12ae9 [media] Kconfig: Fix dependencies for driver autoselect options
This option is a merge of both analog TV and DVB CUSTOMISE.

At the merge, the dependencies were not done right: the menu
currently appears only for analog TV. It should also be opened
for digital TV. As there are other I2C devices there (flash
devices, etc) that aren't related to either one, it is better
to make it generic enough to open for all media devices with
video.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-17 16:45:56 -03:00
Linus Torvalds 4f1cd91497 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull second set of media updates from Mauro Carvalho Chehab:
 "Despite its size, most of the stuff here is trivial.  This series
  contains:

   - s5p-mfc: additions at the driver and at the core to support H.264
     hardware codec;
   - Some improvements at s5p and davinci embedded drivers;
   - Some V4L2 compliance fixes applied on a few drivers;
   - Several random trivial patches, including several fixes and a few
     new board support additions;

  Notes:

   1) Some Exynos media patches were dependent on some -arm fixes that
      got merged on changeset 782cd9e.  That's why this pull request is
      based that changeset.

   2) As promised, I reviewed the pending VB2 DMABUF series.

      While setting a test environment, it was noticed that the upstream
      support for Samsung Exynos 4 boards (smdk310 and Origen) are
      broken upstream, likely due to regressions: both defconfigs are
      wrong and regulator settings for both boards are broken.  That,
      allied with some bug at the dummy regulator driver, causes OOPSes
      during boot time.

      Long story short: even fixing the above, the proposed patches
      OOPSed when running the DMABUF test.  Not sure yet if the OOPSes
      are due to some other undetected regressions, or due to some bug
      on the patches.

      Due to the above, DMABUF patches for vb2 got NACKed for 3.7."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...

Conflicts:
	arch/arm/mach-davinci/include/mach/da8xx.h
2012-10-12 12:39:17 +09:00
Linus Torvalds 5f76945a9c fbdev updates for 3.7
It includes:
 - large updates for OMAP
   - basic OMAP5 DSS support for DPI and DSI outputs
   - large cleanups and restructuring
 - some update to Exynos and da8xx-fb
 - removal of the pnx4008 driver (arch removed)
 - various other small patches
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQdz+EAAoJECSVL5KnPj1PyiMP/R84rSfGUbDIh0Cr6g1Snk76
 h2/1i19TuEgJAWH1q0lnwhqMC3yYmkA1Hz3ulT35KS+/L3IEgUosOESrxZIJhxHI
 f55pk3v8dueN0rx3OhCknLT7hGpVsI4vSN+3yf9LetDp3qt8UVwKLFzVij1VF/MS
 b1wA+RBe1IYMR0bB6pK0AgMZZiBkQMta5rKs5IfDDi8kMgMT4+V8l/iFmt2Ue833
 VxdPw+3reKshBXKTkQt1Usv4JRtG7OgwpRmFhxOo+ag0dxPLeUe/3wZG54qfOywF
 7jK+mnxmW8oZxLkGBvygrmzd40MH6H09N7i/IKVQ0GZoHgAqWWe7VvWahpg8LzwB
 ynktwWZ3Va98p5u/BIafBr0ZOU30mPL8N0aqR3HU7H12Wq21HtwcF+ewiT4vnMc8
 CKzt6VL0qY1tOOdzJzmICzvXGkbBGfj9YOUptJALCIa3bLwZodyQ/bKq8V/bHdTg
 2yyUmVhVf/r5qLermjQN8TjFMpRf2SNwTUUYvhUNwZ4yZMVWZgjjhtAlGGFCA/Bs
 qMRuNpbHMedhzNV4py418Xe3Hwg6TLPuWSWGJ67SG8hxsYy2hq7GebSsXXdC7xG9
 N5DMpA88IQR2nLwkr/pslFqjRsUI6ULvIfxibHEoNjQ0GOY9f+hEWbdHBZPI+0Gv
 Ea9d7nyhmYTZgvRcd9U0
 =EJUS
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6

Pull fbdev updates from Florian Tobias Schandinat:
 "This includes:
   - large updates for OMAP
     - basic OMAP5 DSS support for DPI and DSI outputs
     - large cleanups and restructuring
   - some update to Exynos and da8xx-fb
   - removal of the pnx4008 driver (arch removed)
   - various other small patches"

Fix up some trivial conflicts (mostly just include line changes, but
also some due to the renaming of the deferred work functions by Tejun).

* tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits)
  gbefb: fix compile error
  video: mark nuc900fb_map_video_memory as __devinit
  video/mx3fb: set .owner to prevent module unloading while being used
  video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare
  drivers/video/exynos/exynos_mipi_dsi.c: fix error return code
  drivers/video/savage/savagefb_driver.c: fix error return code
  video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
  da8xx-fb: save and restore LCDC context across suspend/resume cycle
  da8xx-fb: add pm_runtime support
  video/udlfb: fix line counting in fb_write
  OMAPDSS: add missing include for string.h
  OMAPDSS: DISPC: Configure color conversion coefficients for writeback
  OMAPDSS: DISPC: Add manager like functions for writeback
  OMAPDSS: DISPC: Configure writeback FIFOs
  OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup()
  OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup
  OMAPDSS: DISPC: Add function to set channel in for writeback
  OMAPDSS: DISPC: Don't set chroma resampling bit for writeback
  OMAPDSS: DISPC: Downscale chroma if plane is writeback
  OMAPDSS: DISPC: Configure input and output sizes for writeback
  ...
2012-10-12 10:21:02 +09:00
Mauro Carvalho Chehab bf3b202b41 Merge branch 'staging/for_v3.7' into v4l_for_linus
Applied on the top of changeset 782cd9e, as some of those patches
depend on some fixes that went via -arm tree.

* staging/for_v3.7: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...
2012-10-11 15:07:19 -03:00
Sylwester Nawrocki 1fdead8ad3 [media] m5mols: Add missing #include <linux/sizes.h>
Include <linux/sizes.h> header that is missing after commit ab7ef22419
"[media] m5mols: Implement .get_frame_desc subdev callback".
It prevents possible build errors due to undefined SZ_1M.

This header is currently included only when m5mols is compiled
on arm; if build on other archs, the compilation will break.

Reported-by: Jan Hoogenraad <jan-conceptronic@hoogenraad.net>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-10 08:17:16 -03:00
Ezequiel Garcia 56a960bf3f [media] stk1160: Add support for S-Video input
In order to fully replace easycap driver with stk1160,
it's also necessary to add S-Video support.
A similar patch backported for v3.2 kernel has been
tested by three different users.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-09 21:54:26 -03:00
Mauro Carvalho Chehab d6d022e738 Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
Reverted, as requested by Laurent:

I don't consider it as being ready yet, as Sakari pointed out we need
to investigate whether the right fix shouldn't be at the OMAP3 clocks
level instead.

This reverts commit 947c480866.

Requested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-09 19:28:00 -03:00
Konstantin Khlebnikov 314e51b985 mm: kill vma flag VM_RESERVED and mm->reserved_vm counter
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
currently it lost original meaning but still has some effects:

 | effect                 | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump      | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

This patch removes reserved_vm counter from mm_struct.  Seems like nobody
cares about it, it does not exported into userspace directly, it only
reduces total_vm showed in proc.

Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

[akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Venkatesh Pallipadi <venki@google.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:19 +09:00
Antti Palosaari 33eebec55c [media] dvb: LNA implementation changes
* use dvb property cache
* implement get (thus API minor++)
* PCTV 290e: 1=LNA ON, all the other values LNA OFF
  Also fix PCTV 290e LNA comment, it is disabled by default
Hans and Mauro proposed use of cache implementation of get as they
were planning to extend LNA usage for analog side too.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 10:27:49 -03:00
Hans Verkuil d92462401d [media] v4l2-ioctl: fix W=1 warnings
Since the prt_names() macro is always called with an unsigned index the
((a) >= 0) condition is always true and gives a compiler warning when
compiling with W=1.
Rewrite the macro to avoid that warning, but cast the index to unsigned
just in case it is ever called with a signed argument.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 10:19:50 -03:00
Hans Verkuil 1b8b10cc7e [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
The maximum size of an EDID is 32768 bytes, which is 32768 / 128 = 256 blocks.
Return -EINVAL if blocks > 256 to ensure that the memory allocation is sane.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 10:19:34 -03:00
Ido Yariv 8a18382c31 [media] omap3isp: Fix compilation error in ispreg.h
Commit c49f34bc ("ARM: OMAP2+ Move SoC specific headers to be local to
mach-omap2") moved omap34xx.h to mach-omap2. This broke omap3isp, as it
includes omap34xx.h.
Instead of moving omap34xx to platform_data, simply add the two
definitions the driver needs and remove the include altogether.

Signed-off-by: Ido Yariv <ido@wizery.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 10:14:13 -03:00
Wolfgang Bail b45681a60e [media] rc-msi-digivox-ii: Add full scan keycodes
The ir-rc from my MSI DigiVox mini II Version 3 (af9015) will not work since
kernel 3.2.x.

sudo ir-keytable -t shows:

	1348890734.303273: event MSC: scancode = 317
	1348890734.303280: event key down: KEY_POWER (0x0074)
	1348890734.303282: event sync
	1348890734.553961: event key up: KEY_POWER (0x0074)
	1348890734.553963: event sync
	1348890741.303451: event MSC: scancode = 30d
	1348890741.303457: event key down: KEY_DOWN (0x006c)
	1348890741.303459: event sync
	1348890741.553956: event key up: KEY_DOWN (0x006c)

So I changed in rc-msi-digivox-ii.c { 0x0002, KEY_2 }, to { 0x0302, KEY_2 },
and so on. And now it works well.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:57:34 -03:00
Dan Carpenter 546196adde [media] cx25821: testing the wrong variable
->input_filename could be NULL here.  The intent was to test
->_filename.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:50:24 -03:00
Mauro Carvalho Chehab 78ef81f6ea [media] tda18271-common: hold the I2C adapter during write transfers
The tda18271 datasheet says:
	"The image rejection calibration and RF tracking filter
	 calibration must be launched exactly as described in the
	 flowchart, otherwise bad calibration or even blocking of the
	 TDA18211HD can result making it impossible to communicate
	 via the I2C-bus."
(yeah, tda18271 refers there to tda18211 - likely a typo at their
 datasheets)
That likely explains why sometimes tda18271 stops answering. That
is now happening more often on designs with drx-k chips, as the
firmware is now loaded asyncrousnly there.
While the above text doesn't explicitly tell that the I2C bus
couldn't be used by other devices during such initialization,
that seems to be a requirement there.
So, let's explicitly use the I2C lock there, avoiding I2C bus
share during those critical moments.
Compile-tested only. Please test.

Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:43:01 -03:00
Rémi Cardona 034351ff63 [media] ds3000: add module parameter to force firmware upload
[mchehab@redhat.com: Fix a merge conflict]
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:31:37 -03:00
Peter Senna Tschudin c2c1b4156a [media] drivers/media: Remove unnecessary semicolon
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p
@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
        cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

[mchehab@redhat.com: some hunks got bitroted; applied only the
 ones that succeeds]
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
[crope@iki.fi: For my drivers a8293, af9013, af9015, af9035]
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:15:18 -03:00
Sean Young 54fd321e13 [media] winbond: remove space from driver name
-snip-
ACTION=add
DEVPATH=/devices/pnp0/00:04/rc/rc0
DRV_NAME=Winbond CIR
NAME=rc-rc6-mce
SUBSYSTEM=rc
UDEV_LOG=6
USEC_INITIALIZED=88135858
run: '/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s rc0'
Having a space makes it impossible to match in /etc/rc_maps.cfg.

[root@pequod ~]# udevadm test /sys/class/rc/rc0
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:04:18 -03:00
Sean Young 48b0fa6afa [media] iguanair: cannot send data from the stack
Note that the firmware already disables the receiver before transmit,
there is no need to do this from the driver.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:03:35 -03:00
Linus Torvalds 0b8e74c6f4 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "The first part of the media updates for Kernel 3.7.

  This series contain:

   - A major tree renaming patch series: now, drivers are organized
     internally by their used bus, instead of by V4L2 and/or DVB API,
     providing a cleaner driver location for hybrid drivers that
     implement both APIs, and allowing to cleanup the Kconfig items and
     make them more intuitive for the end user;

   - Media Kernel developers are typically very lazy with their duties
     of keeping the MAINTAINERS entries for their drivers updated.  As
     now the tree is more organized, we're doing an effort to add/update
     those entries for the drivers that aren't currently orphan;

   - Several DVB USB drivers got moved to a new DVB USB v2 core; the new
     core fixes several bugs (as the existing one that got bitroted).
     Now, suspend/resume finally started to work fine (at least with
     some devices - we should expect more work with regards to it);

   - added multistream support for DVB-T2, and unified the API for
     DVB-S2 and ISDB-S.  Backward binary support is preserved;

   - as usual, a few new drivers, some V4L2 core improvements and lots
     of drivers improvements and fixes.

  There are some points to notice on this series:

   1) you should expect a trivial merge conflict on your tree, with the
      removal of Documentation/feature-removal-schedule.txt: this series
      would be adding two additional entries there.  I opted to not
      rebase it due to this recent change;

   2) With regards to the PCTV 520e udev-related breakage, I opted to
      fix it in a way that the patches can be backported to 3.5 even
      without your firmware fix patch.  This way, Greg doesn't need to
      rush backporting your patch (as there are still the firmware cache
      and firmware path customization issues to be addressed there).

      I'll send later a patch (likely after the end of the merge window)
      reverting the rest of the DRX-K async firmware request, fully
      restoring its original behaviour to allow media drivers to
      initialize everything serialized as before for 3.7 and upper.

   3) I'm planning to work on this weekend to test the DMABUF patches
      for V4L2.  The patches are on my queue for several Kernel cycles,
      but, up to now, there is/was no way to test the series locally.

      I have some concerns about this particular changeset with regards
      to security issues, and with regards to the replacement of the old
      VIDIOC_OVERLAY ioctl's that is broken on modern systems, due to
      GPU drivers change.  The Overlay API allows direct PCI2PCI
      transfers from a media capture card into the GPU framebuffer, but
      its API is crappy.  Also, the only existing X11 driver that
      implements it requires a XV extension that is not available
      anymore on modern drivers.  The DMABUF can do the same thing, but
      with it is promising to be a properly-designed API.  If I can
      successfully test this series and be happy with it, I should be
      asking you to pull them next week."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (717 commits)
  em28xx: regression fix: use DRX-K sync firmware requests on em28xx
  drxk: allow loading firmware synchrousnously
  em28xx: Make all em28xx extensions to be initialized asynchronously
  [media] tda18271: properly report read errors in tda18271_get_id
  [media] tda18271: delay IR & RF calibration until init() if delay_cal is set
  [media] MAINTAINERS: add Michael Krufky as tda827x maintainer
  [media] MAINTAINERS: add Michael Krufky as tda8290 maintainer
  [media] MAINTAINERS: add Michael Krufky as cxusb maintainer
  [media] MAINTAINERS: add Michael Krufky as lg2160 maintainer
  [media] MAINTAINERS: add Michael Krufky as lgdt3305 maintainer
  [media] MAINTAINERS: add Michael Krufky as mxl111sf maintainer
  [media] MAINTAINERS: add Michael Krufky as mxl5007t maintainer
  [media] MAINTAINERS: add Michael Krufky as tda18271 maintainer
  [media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap
  [media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
  [media] exynos-gsc: Add missing static storage class specifiers
  [media] exynos-gsc: Remove <linux/version.h> header file inclusion
  [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
  [media] s5p-tv: Fix potential NULL pointer dereference error
  [media] s5k6aa: Fix possible NULL pointer dereference
  ...
2012-10-07 17:49:05 +09:00
Laurent Pinchart 947c480866 [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
Drivers must not rely on cpu_is_omap* macros (they will soon become
private). Use the ISP revision instead to identify the hardware.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:31:58 -03:00
Andy Shevchenko 5bdb7872cd [media] dvb-usb: print small buffers via %*ph
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:25:49 -03:00
Ezequiel Garcia 5712661d64 [media] uvc: Add return code check at vb2_queue_init()
This function returns an integer and it's mandatory
to check the return code.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:25:21 -03:00
Ezequiel Garcia e0f6e4d6ff [media] em28xx: Replace memcpy with struct assignment
This kind of memcpy() is error-prone and its
replacement with a struct assignment is prefered.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:23:15 -03:00
Guilherme Herrmann Destefani 34e59a7d45 [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
Added V4L2_CID_COLOR_KILLER control to the bt8xx driver.
The control V4L2_CID_PRIVATE_CHROMA_AGC was changed too because
with this change the bttv driver must touch two bits in the
SC Loop Control Registers, for controls V4L2_CID_COLOR_KILLER
and V4L2_CID_PRIVATE_CHROMA_AGC.

Signed-off-by: Guilherme Herrmann Destefani <linuxtv@destefani.eng.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:14:01 -03:00