]> Pileus Git - ~andy/linux/log
~andy/linux
11 years ago[media] gspca_stv06xx: Disable flip controls for vv6410 sensor
Erik Andrén [Mon, 10 Dec 2012 19:35:19 +0000 (16:35 -0300)]
[media] gspca_stv06xx: Disable flip controls for vv6410 sensor

Disable the hardware VFLIP and HFLIP controls for now as we lack a
mechanism to adjust the frame offset, thus rending a bayerimage not
compliant with the announced format.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca: Use module_usb_driver macro
Sachin Kamat [Wed, 12 Dec 2012 08:58:12 +0000 (05:58 -0300)]
[media] gspca: Use module_usb_driver macro

module_usb_driver eliminates a lot of boilerplate by replacing
module_init() and module_exit() calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca_kinect: add Kinect for Windows USB id
Jacob Schloss [Sun, 9 Dec 2012 23:18:25 +0000 (20:18 -0300)]
[media] gspca_kinect: add Kinect for Windows USB id

Add the USB ID for the Kinect for Windows RGB camera so it can be used
with the gspca_kinect driver.

Signed-off-by: Jacob Schloss <jacob.schloss@unlimitedautomata.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation/media: Remove docs for obsoleted and removed v4l1 drivers
Hans de Goede [Thu, 29 Nov 2012 10:06:22 +0000 (07:06 -0300)]
[media] Documentation/media: Remove docs for obsoleted and removed v4l1 drivers

When the v4l1 drivers were removed, there docs were forgotten.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stk-webcam: Add an upside down dmi table, and add the Asus G1 to it
Hans de Goede [Thu, 29 Nov 2012 09:56:45 +0000 (06:56 -0300)]
[media] stk-webcam: Add an upside down dmi table, and add the Asus G1 to it

The stk-webcam module is inserted upside-down in some webcams, so we
need to de hflip and vflip by default on some models.
Note that this patch inverts the value of the controls as reported by
the control API in this case so that for the user they still make sense
(iow not doing any flipping from the ctrl API pov results in an upright
image).

Reported-by: Jose Gómez <adler@dreamcoder.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca-pac207: Add a led_invert module parameter
Hans de Goede [Thu, 29 Nov 2012 09:39:49 +0000 (06:39 -0300)]
[media] gspca-pac207: Add a led_invert module parameter

Some cams have their led connected in such a way that on = off and visa versa
unfortunately we cannot tell this from the driver in any way, so add a module
parameter for this.

Reported-by: Yuri Glushkov <yglushkov@yahoo.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca - stv06xx: Fix a regression with the bridge/sensor vv6410
Jean-François Moine [Thu, 22 Nov 2012 11:59:06 +0000 (08:59 -0300)]
[media] gspca - stv06xx: Fix a regression with the bridge/sensor vv6410

Setting the H and V flip controls at webcam connection time prevents
the webcam to work correctly.
This patch checks if the webcam is streaming before setting the flips.
It does not set the flips (nor other controls) at webcam start time.

Tested-by: Philippe ROUBACH <philippe.roubach@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Add support for sensors with multiple pads
Andrzej Hajda [Thu, 22 Nov 2012 15:13:27 +0000 (12:13 -0300)]
[media] s5p-fimc: Add support for sensors with multiple pads

Some sensors can have more than one pad (case of S5C73M3).
In such cases FIMC assumes the last pad of the sensor is
the source pad.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] fimc-lite: Add ISP FIFO output support
Sylwester Nawrocki [Wed, 28 Nov 2012 18:41:01 +0000 (15:41 -0300)]
[media] fimc-lite: Add ISP FIFO output support

Add second source media pad for the FIFO data output to FIMC-IS
and implement subdev s_stream op for configurations where FIMC-LITE
is used as a glue logic between FIMC-IS and MIPI-CSIS or an image
sensor. The second source media pad will be linked to the FIMC-LITE
video node.
For proper configuration the attached image sensor/video encoder
properties are needed, like video bus type, signal polarities, etc.
For this purpose there is a small routine added that walks the
pipeline and returns the sensor subdev.

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>
11 years ago[media] s5p-fimc: Add sensor group ids for fimc-is
Sylwester Nawrocki [Tue, 27 Nov 2012 14:57:42 +0000 (11:57 -0300)]
[media] s5p-fimc: Add sensor group ids for fimc-is

Add subdev group id definition for FIMC-IS ISP and sensor subdev.
While at it rename all group id definitions to start with GRP_ID.

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>
11 years ago[media] s5p-csis: Add registers logging for debugging
Sylwester Nawrocki [Fri, 28 Sep 2012 14:05:53 +0000 (11:05 -0300)]
[media] s5p-csis: Add registers logging for debugging

Dump registers contents together with the event counters state
in VIDIOC_LOG_STATUS ioctl.

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>
11 years ago[media] s5p-csis: Enable only data lanes that are actively used
Sylwester Nawrocki [Fri, 2 Nov 2012 17:20:27 +0000 (14:20 -0300)]
[media] s5p-csis: Enable only data lanes that are actively used

Enable only MIPI CSI-2 data lanes at the DPHY that are actively
used, rather than unmasking all unconditionally.

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>
11 years ago[media] s5p-csis: Add support for raw Bayer pixel formats
Sylwester Nawrocki [Wed, 29 Aug 2012 17:35:21 +0000 (14:35 -0300)]
[media] s5p-csis: Add support for raw Bayer pixel formats

The MIPI CSIS device supports MIPI CSI-2 RAW8, RAW10, RAW12 data
types. Add related media bus pixel format definitions. This
doesn't cover all possible supported media bus pixel formats.

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>
11 years ago[media] s5p-fimc: Add variant data structure for Exynos4x12
Sylwester Nawrocki [Thu, 2 Aug 2012 13:27:46 +0000 (10:27 -0300)]
[media] s5p-fimc: Add variant data structure for Exynos4x12

Add variant data structures for Exynos4212 and Exynos4412 SoC.
Add 'const' qualifier for the variant description structures.
Also remove has_cam_if flags from FIMC3 on Exynos4210 SoC is
it has no interconnections the camera ports.

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>
11 years ago[media] s5p-fimc: Clean up capture enable/disable helpers
Sylwester Nawrocki [Thu, 22 Nov 2012 17:01:39 +0000 (14:01 -0300)]
[media] s5p-fimc: Clean up capture enable/disable helpers

The FIMC FIFO output is not supported in the driver due to
some hardware issues thus we can remove some code as out_path
is always FIMC_IO_DMA.

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>
11 years ago[media] fimc-lite: Register dump function cleanup
Sylwester Nawrocki [Fri, 16 Nov 2012 19:52:57 +0000 (16:52 -0300)]
[media] fimc-lite: Register dump function cleanup

Use v4l2_info() to make it possible to identify which FIMC-LITE
device instance the logs refer to.

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>
11 years ago[media] V4L: DocBook: Add V4L2_MBUS_FMT_YUV10_1X30 media bus pixel code
Sylwester Nawrocki [Wed, 28 Nov 2012 17:40:32 +0000 (14:40 -0300)]
[media] V4L: DocBook: Add V4L2_MBUS_FMT_YUV10_1X30 media bus pixel code

This patch adds definition of media bus code for YUV pixel format
transferred in 30-bit samples where each component has 10 bits width.

[mchehab@redhat.com: fix a merge conflict at v4l2-mediabus.h]
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>
11 years ago[media] s5p-csis: Correct the event counters logging
Sylwester Nawrocki [Fri, 23 Nov 2012 18:17:40 +0000 (15:17 -0300)]
[media] s5p-csis: Correct the event counters logging

The counter field is unsigned so >= 0 condition always evaluates
to true. Fix this to log events for which counter is > 0 or for
all when in debug mode.

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>
11 years ago[media] s5p-fimc: Fix horizontal/vertical image flip
Sylwester Nawrocki [Mon, 26 Nov 2012 14:08:26 +0000 (11:08 -0300)]
[media] s5p-fimc: Fix horizontal/vertical image flip

Setting FIMC_REG_CITRGFMT_FLIP_X_MIRROR bit causes X-axis image
flip (vertical flip) and thus it corresponds to V4L2_CID_VFLIP.
Likewise, setting FIMC_REG_CITRGFMT_FLIP_Y_MIRROR bit causes Y-axis
image flip (horizontal flip) and thus it corresponds to V4L2_CID_HFLIP.
Currently the driver does X-axis flip when V4L2_CID_HFLIP is set and
Y-axis flip for V4L2_CID_VFLIP. Fix this incorrect assignment by setting
proper FIMC_REG_CITRGFMT register bits for ctx->hflip and ctx->vflip.

Reported-by: Kyungmin Park <kyungmin.park@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>
11 years ago[media] v4l: There's no __unsigned
Sakari Ailus [Fri, 16 Nov 2012 20:42:12 +0000 (17:42 -0300)]
[media] v4l: There's no __unsigned

Correct a typo. v4l2_plane.m.userptr is unsigned long, not __unsigned long.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Tell user space we're using monotonic timestamps
Sakari Ailus [Mon, 22 Oct 2012 20:10:16 +0000 (17:10 -0300)]
[media] v4l: Tell user space we're using monotonic timestamps

Set buffer timestamp flags for videobuf, videobuf2 and drivers that use
neither.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Convert drivers to use monotonic timestamps
Sakari Ailus [Sat, 15 Sep 2012 18:14:42 +0000 (15:14 -0300)]
[media] v4l: Convert drivers to use monotonic timestamps

Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Helper function for obtaining timestamps
Sakari Ailus [Sat, 15 Sep 2012 10:51:47 +0000 (07:51 -0300)]
[media] v4l: Helper function for obtaining timestamps

v4l2_get_timestamp() produces a monotonic timestamp but unlike
ktime_get_ts(), it uses struct timeval instead of struct timespec, saving
the drivers the conversion job when getting timestamps for v4l2_buffer's
timestamp field.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Define video buffer flags for timestamp types
Sakari Ailus [Sun, 21 Oct 2012 19:02:47 +0000 (16:02 -0300)]
[media] v4l: Define video buffer flags for timestamp types

Define video buffer flags for different timestamp types. Everything up to
now have used either realtime clock or monotonic clock, without a way to
tell which clock the timestamp was taken from.
Also document that the clock source of the timestamp in the timestamp field
depends on buffer flags.

[mchehab@redhat.com: fix a few wrong references to Kernel 3.8 - as this patch
 is meant for 3.9]
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos-gsc: modify number of output/capture buffers
Shaik Ameer Basha [Tue, 27 Nov 2012 12:48:58 +0000 (09:48 -0300)]
[media] exynos-gsc: modify number of output/capture buffers

G-Scaler src buffer count as well as destination buffer
count is increased to 32. This is required for G-Scaler to
interface with MFC, as MFC demands 32 capture buffers for
some H264 streams.

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>
11 years ago[media] exynos-gsc: Use devm_clk_get()
Sachin Kamat [Mon, 26 Nov 2012 06:20:21 +0000 (03:20 -0300)]
[media] exynos-gsc: Use devm_clk_get()

devm_clk_get() is a device managed function and makes error handling
a bit simpler.

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>
11 years ago[media] exynos-gsc: Correct the clock handling
Sylwester Nawrocki [Mon, 26 Nov 2012 06:20:20 +0000 (03:20 -0300)]
[media] exynos-gsc: Correct the clock handling

Make sure there is no unbalanced clk_unprepare call and add missing
clock release in the driver's remove() callback.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
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>
11 years ago[media] exynos-gsc: Rearrange error messages for valid prints
Sachin Kamat [Mon, 26 Nov 2012 06:20:19 +0000 (03:20 -0300)]
[media] exynos-gsc: Rearrange error messages for valid prints

In case of clk_prepare failure, the function gsc_clk_get also prints
"failed to get clock" which is not correct. Hence move the error
messages to their respective blocks. While at it, also renamed the labels
meaningfully.

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>
11 years ago[media] exynos-gsc: Fix checkpatch warning in gsc-m2m.c
Sachin Kamat [Fri, 23 Nov 2012 11:04:42 +0000 (08:04 -0300)]
[media] exynos-gsc: Fix checkpatch warning in gsc-m2m.c

Fixes the following warning:
WARNING: space prohibited between function name and open parenthesis '('
FILE: media/platform/exynos-gsc/gsc-m2m.c:606:
ctx = kzalloc(sizeof (*ctx), GFP_KERNEL);

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>
11 years ago[media] exynos-gsc: propagate timestamps from src to dst buffers
Shaik Ameer Basha [Thu, 22 Nov 2012 05:25:06 +0000 (02:25 -0300)]
[media] exynos-gsc: propagate timestamps from src to dst buffers

Make gsc-m2m propagate the timestamp field from source to destination
buffers.

Signed-off-by: John Sheu <sheu@google.com>
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>
11 years ago[media] exynos-gsc: Adding tiled multi-planar format to G-Scaler
Shaik Ameer Basha [Wed, 7 Nov 2012 06:37:07 +0000 (03:37 -0300)]
[media] exynos-gsc: Adding tiled multi-planar format to G-Scaler

Adding V4L2_PIX_FMT_NV12MT_16X16 to G-Scaler supported formats.
If the output or input format is V4L2_PIX_FMT_NV12MT_16X16, configure
G-Scaler to use GSC_IN_TILE_MODE.

[s.nawrocki: shortened the pixel format description]

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>
11 years ago[media] ivtv: ivtv-driver: Replace 'flush_work_sync()'
Fabio Estevam [Wed, 24 Oct 2012 11:14:16 +0000 (08:14 -0300)]
[media] ivtv: ivtv-driver: Replace 'flush_work_sync()'

Since commit 43829731d (workqueue: deprecate flush[_delayed]_work_sync()),
flush_work() should be used instead of flush_work_sync().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000-video.c: warning fix
Mauro Carvalho Chehab [Thu, 20 Dec 2012 17:21:23 +0000 (15:21 -0200)]
[media] tm6000-video.c: warning fix

drivers/media/usb/tm6000/tm6000-video.c: In function '__check_keep_urb':
drivers/media/usb/tm6000/tm6000-video.c:1926:1: warning: return from incompatible pointer type [enabled by default]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sh_veu.c: fix two compilation warnings
Mauro Carvalho Chehab [Thu, 20 Dec 2012 16:53:26 +0000 (14:53 -0200)]
[media] sh_veu.c: fix two compilation warnings

drivers/media/platform/sh_veu.c:269:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat]
drivers/media/platform/sh_veu.c:276:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat]

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mx2_camera: Add image size HW limits
Javier Martin [Tue, 30 Oct 2012 14:29:00 +0000 (11:29 -0300)]
[media] media: mx2_camera: Add image size HW limits

The CSI on i.MX27 has some constraints regarding image width.
This patch makes sure those requirements are met in try_fmt().

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: make constraint i.MX27-specific]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add entries for sh_veu and sh_vou V4L2 drivers
Guennadi Liakhovetski [Thu, 29 Nov 2012 09:57:30 +0000 (06:57 -0300)]
[media] MAINTAINERS: add entries for sh_veu and sh_vou V4L2 drivers

sh_vou might be better described by "Odd Fixes," but mark it "Maintained"
for now. sh_veu is a new driver and might see some development in the
future.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sh_mobile_ceu_camera: use managed memory and resource allocations
Guennadi Liakhovetski [Wed, 10 Oct 2012 08:18:51 +0000 (05:18 -0300)]
[media] sh_mobile_ceu_camera: use managed memory and resource allocations

Use managed allocations to simplify error handling and clean up paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: sh_mobile_csi2: use managed memory and resource allocations
Guennadi Liakhovetski [Wed, 10 Oct 2012 08:02:30 +0000 (05:02 -0300)]
[media] media: sh_mobile_csi2: use managed memory and resource allocations

Use managed allocations to simplify error handling and clean up paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: soc-camera: remove superfluous JPEG checking
Guennadi Liakhovetski [Mon, 8 Oct 2012 13:02:55 +0000 (10:02 -0300)]
[media] media: soc-camera: remove superfluous JPEG checking

Explicit checks for the JPEG pixel format in soc_mbus_bytes_per_line() and
soc_mbus_image_size() are superfluous, because also without them these
functions will perform correctly. The former will return 0 based on
packing == SOC_MBUS_PACKING_VARIABLE and the latter will simply multiply
the user-provided line length by the image height to obtain a frame buffer
size estimate. The original version of the "media: soc_camera: don't clear
pix->sizeimage in JPEG mode" patch was correct and my amendment, adding
these two checks was superfluous.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: soc-camera: update documentation
Guennadi Liakhovetski [Fri, 5 Oct 2012 15:33:45 +0000 (12:33 -0300)]
[media] media: soc-camera: update documentation

Update soc-camera documentation to reflect the current camera host API and
the use of the common V4L2 subdev API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: sh-mobile-ceu-camera: runtime PM suspending doesn't have to be synchronous
Guennadi Liakhovetski [Fri, 14 Sep 2012 15:00:24 +0000 (12:00 -0300)]
[media] media: sh-mobile-ceu-camera: runtime PM suspending doesn't have to be synchronous

In both error and clean up cases there is no need to wait for runtime PM
to finish suspending the device.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: soc-camera: use managed devm_regulator_bulk_get()
Guennadi Liakhovetski [Thu, 27 Sep 2012 09:40:30 +0000 (06:40 -0300)]
[media] media: soc-camera: use managed devm_regulator_bulk_get()

Using device-managed devm_regulator_bulk_get() eliminates the need to
release regulators explicitly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: add a VEU MEM2MEM format conversion and scaling driver
Guennadi Liakhovetski [Fri, 5 Oct 2012 10:43:41 +0000 (07:43 -0300)]
[media] media: add a VEU MEM2MEM format conversion and scaling driver

Video Engine Unit (VEU) is an IP block, found in multiple SuperH and ARM-
based sh-mobile and r-mobile SoCs, capable of processing video data. It
can perform colour-space conversion, scaling and several filtering
transformations. This patch adds an initial implementation of a mem2mem
V4L2 driver for VEU. So far only conversion from NV12 to RGB565 is
supported. Further functionality shall be added in the future.
This driver is based on a VEU vidix driver by Magnus Damm.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mem2mem: make reference to struct m2m_ops in the core const
Guennadi Liakhovetski [Tue, 11 Sep 2012 09:32:17 +0000 (06:32 -0300)]
[media] media: mem2mem: make reference to struct m2m_ops in the core const

The mem2mem core doesn't change struct m2m_ops, provided by the driver,
make references to it const.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap_vout: Use the output overlay ioctl operations
Laurent Pinchart [Tue, 13 Nov 2012 13:00:22 +0000 (10:00 -0300)]
[media] omap_vout: Use the output overlay ioctl operations

The omap_vout device implements the output overlay API, use the
corresponding ioctl operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap_vout: Drop overlay format enumeration
Laurent Pinchart [Tue, 13 Nov 2012 13:35:38 +0000 (10:35 -0300)]
[media] omap_vout: Drop overlay format enumeration

Enumerating formats for output overlays doesn't make sense, as the pixel
format is defined by the display API, not the V4L2 API. Drop the
vidioc_enum_fmt_vid_overlay ioctl operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: add new pixel formats supported on dm365
Manjunath Hadli [Thu, 18 Oct 2012 10:58:02 +0000 (07:58 -0300)]
[media] v4l2: add new pixel formats supported on dm365

add new macro V4L2_PIX_FMT_SGRBG10ALAW8 and associated formats
to represent Bayer format frames compressed by A-LAW algorithm,
add V4L2_PIX_FMT_UV8 to represent storage of CbCr data (UV interleaved)
only.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: fix an index reference
Mauro Carvalho Chehab [Wed, 19 Dec 2012 15:00:27 +0000 (13:00 -0200)]
[media] DocBook: fix an index reference

Error: no ID for constraint linkend: V4L2-PIX-FMT-NV12MT-16X16.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: add new mediabus format enums for dm365
Manjunath Hadli [Thu, 18 Oct 2012 10:54:59 +0000 (07:54 -0300)]
[media] media: add new mediabus format enums for dm365

add new enum entries for supporting the media-bus formats on dm365.
These include some bayer and some non-bayer formats.
V4L2_MBUS_FMT_YDYUYDYV8_1X16 and V4L2_MBUS_FMT_UV8_1X8 are used
internal to the hardware by the resizer.
V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8 represents the bayer ALAW format
that is supported by dm365 hardware.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation: fix outdated statement re. v4l2
Nicolas THERY [Fri, 26 Oct 2012 12:01:55 +0000 (09:01 -0300)]
[media] Documentation: fix outdated statement re. v4l2

Fix tense used for describing struct v4l2_fh as it has been added a
while ago.

Signed-off-by: Nicolas Thery <nicolas.thery@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: fix drivers/media/usb/dvb-usb/cxusb*
Cesar Eduardo Barros [Fri, 23 Nov 2012 23:26:32 +0000 (20:26 -0300)]
[media] MAINTAINERS: fix drivers/media/usb/dvb-usb/cxusb*

This driver was never at dvb-usb-v2, as far as I could see.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: fix drivers/media/platform/atmel-isi.c
Cesar Eduardo Barros [Tue, 11 Dec 2012 20:49:48 +0000 (17:49 -0300)]
[media] MAINTAINERS: fix drivers/media/platform/atmel-isi.c

This file was moved to drivers/media/platform/soc_camera/atmel-isi.c by
commit b47ff4a ([media] move soc_camera to its own directory).

Cc: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add entry for dsbr100 usb radio driver
Alexey Klimov [Wed, 28 Nov 2012 20:16:32 +0000 (17:16 -0300)]
[media] MAINTAINERS: add entry for dsbr100 usb radio driver

This patch adds MAINTAINERS entry for dsbr100 usb radio driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add g2d entry
Kamil Debski [Wed, 28 Nov 2012 09:14:22 +0000 (06:14 -0300)]
[media] MAINTAINERS: add g2d entry

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add entry for radio-ma901 driver
Alexey Klimov [Mon, 12 Nov 2012 05:57:32 +0000 (02:57 -0300)]
[media] MAINTAINERS: add entry for radio-ma901 driver

This patch adds MAINTAINERS entry for radio-ma901 usb radio driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tda18271: add missing entries for qam_7 to tda18271_update_std_map() and...
Frank Schäfer [Tue, 4 Dec 2012 19:13:33 +0000 (16:13 -0300)]
[media] tda18271: add missing entries for qam_7 to tda18271_update_std_map() and tda18271_dump_std_map()

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx23885: add basic DVB-S2 support for Hauppauge HVR-4400
Michael Krufky [Sun, 16 Dec 2012 02:34:09 +0000 (23:34 -0300)]
[media] cx23885: add basic DVB-S2 support for Hauppauge HVR-4400

Add basic DVB-S2 support for the Hauppauge HVR-4400 PCIe board.
Thanks to Antti Palosaari and Devin Heitmueller for their
suggestions and testing.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tda10071: add tuner_i2c_addr to struct tda10071_config
Michael Krufky [Sun, 16 Dec 2012 16:24:59 +0000 (13:24 -0300)]
[media] tda10071: add tuner_i2c_addr to struct tda10071_config

The default i2c address for the tuner is 0x14,
allow this to be overridden with a configuration parameter

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au0828: break au0828_card_setup() down into smaller functions
Michael Krufky [Tue, 4 Dec 2012 15:46:38 +0000 (12:46 -0300)]
[media] au0828: break au0828_card_setup() down into smaller functions

Pull the analog frontend setup code out of au0828_card_setup into its
own seperate function, au0828_card_analog_fe_setup().

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2
Michael Krufky [Tue, 4 Dec 2012 14:30:00 +0000 (11:30 -0300)]
[media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2

This patch removes the dependendency of VIDEO_AU0828 on VIDEO_V4L2 by
creating a new Kconfig option, VIDEO_AU0828_V4L2, which enables analog
video capture support and depends on VIDEO_V4L2 itself.
With VIDEO_AU0828_V4L2 disabled, the driver will only support digital
television and will not depend on the v4l2-core. With VIDEO_AU0828_V4L2
enabled, the driver will be built with the analog v4l2 support included.
By default, the VIDEO_AU0828_V4L2 option will be set to Y, so as to
preserve the original behavior.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au0828: update model matrix entries for 72261, 72271 & 72281
Michael Krufky [Wed, 28 Nov 2012 14:46:24 +0000 (11:46 -0300)]
[media] au0828: update model matrix entries for 72261, 72271 & 72281

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au0828: add missing model 72281, usb id 2040:7270 to the model matrix
Michael Krufky [Wed, 28 Nov 2012 04:17:50 +0000 (01:17 -0300)]
[media] au0828: add missing model 72281, usb id 2040:7270 to the model matrix

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add si470x-usb+common and si470x-i2c entries
Hans Verkuil [Fri, 30 Nov 2012 10:13:29 +0000 (07:13 -0300)]
[media] MAINTAINERS: add si470x-usb+common and si470x-i2c entries

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add tda9840, tea6415c and tea6420 entries
Hans Verkuil [Fri, 23 Nov 2012 13:02:05 +0000 (10:02 -0300)]
[media] MAINTAINERS: add tda9840, tea6415c and tea6420 entries

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Michael Hunold <michael@mihu.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Taking over saa7146 maintainership from Michael Hunold
Hans Verkuil [Fri, 23 Nov 2012 12:58:12 +0000 (09:58 -0300)]
[media] MAINTAINERS: Taking over saa7146 maintainership from Michael Hunold

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Michael Hunold <michael@mihu.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add vivi entry
Hans Verkuil [Fri, 23 Nov 2012 11:21:50 +0000 (08:21 -0300)]
[media] MAINTAINERS: add vivi entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add usbvision entry
Hans Verkuil [Fri, 23 Nov 2012 10:54:42 +0000 (07:54 -0300)]
[media] MAINTAINERS: add usbvision entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add saa6588 entry
Hans Verkuil [Fri, 23 Nov 2012 10:45:29 +0000 (07:45 -0300)]
[media] MAINTAINERS: add saa6588 entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add pms entry
Hans Verkuil [Fri, 23 Nov 2012 10:21:19 +0000 (07:21 -0300)]
[media] MAINTAINERS: add pms entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-miropcm20 entry
Hans Verkuil [Fri, 23 Nov 2012 10:15:42 +0000 (07:15 -0300)]
[media] MAINTAINERS: add radio-miropcm20 entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-maxiradio entry
Hans Verkuil [Fri, 23 Nov 2012 10:12:43 +0000 (07:12 -0300)]
[media] MAINTAINERS: add radio-maxiradio entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-gemtek entry
Hans Verkuil [Fri, 23 Nov 2012 10:11:58 +0000 (07:11 -0300)]
[media] MAINTAINERS: add radio-gemtek entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-aimslab entry
Hans Verkuil [Fri, 23 Nov 2012 10:11:33 +0000 (07:11 -0300)]
[media] MAINTAINERS: add radio-aimslab entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-aztech entry
Hans Verkuil [Fri, 23 Nov 2012 10:09:23 +0000 (07:09 -0300)]
[media] MAINTAINERS: add radio-aztech entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-isa entry
Hans Verkuil [Fri, 23 Nov 2012 10:07:02 +0000 (07:07 -0300)]
[media] MAINTAINERS: add radio-isa entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-cadet entry
Hans Verkuil [Fri, 23 Nov 2012 10:05:54 +0000 (07:05 -0300)]
[media] MAINTAINERS: add radio-cadet entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add radio-keene entry
Hans Verkuil [Fri, 23 Nov 2012 10:04:36 +0000 (07:04 -0300)]
[media] MAINTAINERS: add radio-keene entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add entry for the quickcam parallel port webcams
Hans Verkuil [Fri, 23 Nov 2012 10:02:29 +0000 (07:02 -0300)]
[media] MAINTAINERS: add entry for the quickcam parallel port webcams

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add cx2341x entry
Hans Verkuil [Fri, 23 Nov 2012 10:00:02 +0000 (07:00 -0300)]
[media] MAINTAINERS: add cx2341x entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add adv7604/ad9389b entries
Hans Verkuil [Fri, 23 Nov 2012 09:53:24 +0000 (06:53 -0300)]
[media] MAINTAINERS: add adv7604/ad9389b entries

Cisco maintains these drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mx2_camera: use GFP_ATOMIC under spin lock
Cyril Roelandt [Mon, 19 Nov 2012 21:36:09 +0000 (18:36 -0300)]
[media] mx2_camera: use GFP_ATOMIC under spin lock

Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: sh-vou: fix compiler warnings
Guennadi Liakhovetski [Mon, 26 Nov 2012 17:32:48 +0000 (14:32 -0300)]
[media] media: sh-vou: fix compiler warnings

sh-vou causes several "may be used uninitialized" warnings. Even though
they all are purely theoretical, it is better to fix them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] soc_camera: fix VIDIOC_S_CROP ioctl
Anatolij Gustschin [Wed, 28 Nov 2012 20:15:51 +0000 (17:15 -0300)]
[media] soc_camera: fix VIDIOC_S_CROP ioctl

Sometimes VIDIOC_S_CROP ioctl doesn't work, soc-camera driver reports:
soc-camera-pdrv soc-camera-pdrv.0: S_CROP denied: getting current crop failed
The VIDIOC_G_CROP documentation states that the type field needs to be
set to the respective buffer type when querying, so the check in .g_crop()
of the subdevices returns -EINVAL if the type is not set properly. Here the
uninitialized local variable 'current_crop' is passed to the .g_crop() and
this leads to the observed error. Initialize the type field of the local
'current_crop' before get_crop call.

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>
11 years ago[media] tm6000: Add parameter to keep urb bufs allocated
Julian Scheel [Thu, 4 Oct 2012 13:04:28 +0000 (10:04 -0300)]
[media] tm6000: Add parameter to keep urb bufs allocated

On systems where it cannot be assured that enough continous memory is available
all the time it can be very useful to only allocate the memory once when it is
needed the first time. Afterwards the initially allocated memory will be
reused, so it is ensured that the memory will stay available until the driver
is unloaded.

[mchehab@redhat.com: Codingstyle fixups]
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dw2102: Declare MODULE_FIRMWARE usage
Rémi Cardona [Fri, 28 Sep 2012 11:59:32 +0000 (08:59 -0300)]
[media] dw2102: Declare MODULE_FIRMWARE usage

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>
11 years agoMerge tag 'v3.7-rc8' into staging/for_v3.8
Mauro Carvalho Chehab [Tue, 4 Dec 2012 12:46:21 +0000 (10:46 -0200)]
Merge tag 'v3.7-rc8' into staging/for_v3.8

Linux 3.7-rc8

* tag 'v3.7-rc8': (112 commits)
  Linux 3.7-rc8
  [parisc] open(2) compat bug
  Revert "sched, autogroup: Stop going ahead if autogroup is disabled"
  open*(2) compat fixes (s390, arm64)
  8139cp: fix coherent mapping leak in error path.
  tcp: fix crashes in do_tcp_sendpages()
  workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay
  workqueue: exit rescuer_thread() as TASK_RUNNING
  x86, fpu: Avoid FPU lazy restore after suspend
  drivers/rtc/rtc-tps65910.c: fix invalid pointer access on _remove()
  mm: soft offline: split thp at the beginning of soft_offline_page()
  mm: avoid waking kswapd for THP allocations when compaction is deferred or contended
  revert "Revert "mm: remove __GFP_NO_KSWAPD""
  mm: vmscan: fix endless loop in kswapd balancing
  mm/vmemmap: fix wrong use of virt_to_page
  mm: compaction: fix return value of capture_free_page()
  fix off-by-one in argument passed by iterate_fd() to callbacks
  lookup_one_len: don't accept . and ..
  cifs: get rid of blind d_drop() in readdir
  nfs_lookup_revalidate(): fix a leak
  ...

11 years agoLinux 3.7-rc8 v3.7-rc8
Linus Torvalds [Mon, 3 Dec 2012 19:22:37 +0000 (11:22 -0800)]
Linux 3.7-rc8

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac
Linus Torvalds [Mon, 3 Dec 2012 19:16:37 +0000 (11:16 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac

Pull EDAC fixes from Mauro Carvalho Chehab:
 "One EDAC core fix, and a few driver fixes (i7300, i9275x, i7core)."

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac:
  i7core_edac: fix panic when accessing sysfs files
  i7300_edac: Fix error flag testing
  edac: Fix the dimm filling for csrows-based layouts
  i82975x_edac: Fix dimm label initialization

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 3 Dec 2012 19:13:32 +0000 (11:13 -0800)]
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:
 "Some driver fixes for s5p/exynos (mostly race fixes)"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] s5p-mfc: Handle multi-frame input buffer
  [media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
  [media] exynos-gsc: Add missing video device vfl_dir flag initialization
  [media] exynos-gsc: Fix settings for input and output image RGB type
  [media] exynos-gsc: Don't use mutex_lock_interruptible() in device release()
  [media] fimc-lite: Don't use mutex_lock_interruptible() in device release()
  [media] s5p-fimc: Don't use mutex_lock_interruptible() in device release()
  [media] s5p-fimc: Prevent race conditions during subdevs registration

11 years ago[parisc] open(2) compat bug
Al Viro [Mon, 3 Dec 2012 18:15:30 +0000 (18:15 +0000)]
[parisc] open(2) compat bug

In commit 9d73fc2d641f ("open*(2) compat fixes (s390, arm64)") I said:
>
>  The usual rules for open()/openat()/open_by_handle_at() are
> 1) native 32bit - don't force O_LARGEFILE in flags
> 2) native 64bit - force O_LARGEFILE in flags
> 3) compat on 64bit host - as for native 32bit
> 4) native 32bit ABI for 64bit system (mips/n32, x86/x32) - as for native 64bit
>
> There are only two exceptions - s390 compat has open() forcing O_LARGEFILE and
> arm64 compat has open_by_handle_at() doing the same thing.  The same binaries
> on native host (s390/31 and arm resp.) will *not* force O_LARGEFILE, so IMO
> both are emulation bugs.

Three exceptions, actually - parisc open() is another case like that.
Native 32bit won't force O_LARGEFILE, the same binary on parisc64 will.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRevert "sched, autogroup: Stop going ahead if autogroup is disabled"
Mike Galbraith [Mon, 3 Dec 2012 05:25:25 +0000 (06:25 +0100)]
Revert "sched, autogroup: Stop going ahead if autogroup is disabled"

This reverts commit 800d4d30c8f20bd728e5741a3b77c4859a613f7c.

Between commits 8323f26ce342 ("sched: Fix race in task_group()") and
800d4d30c8f2 ("sched, autogroup: Stop going ahead if autogroup is
disabled"), autogroup is a wreck.

With both applied, all you have to do to crash a box is disable
autogroup during boot up, then reboot..  boom, NULL pointer dereference
due to commit 800d4d30c8f2 not allowing autogroup to move things, and
commit 8323f26ce342 making that the only way to switch runqueues:

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [<ffffffff81063ac0>] effective_load.isra.43+0x50/0x90
  Pid: 7047, comm: systemd-user-se Not tainted 3.6.8-smp #7 MEDIONPC MS-7502/MS-7502
  RIP: effective_load.isra.43+0x50/0x90
  Process systemd-user-se (pid: 7047, threadinfo ffff880221dde000, task ffff88022618b3a0)
  Call Trace:
    select_task_rq_fair+0x255/0x780
    try_to_wake_up+0x156/0x2c0
    wake_up_state+0xb/0x10
    signal_wake_up+0x28/0x40
    complete_signal+0x1d6/0x250
    __send_signal+0x170/0x310
    send_signal+0x40/0x80
    do_send_sig_info+0x47/0x90
    group_send_sig_info+0x4a/0x70
    kill_pid_info+0x3a/0x60
    sys_kill+0x97/0x1a0
    ? vfs_read+0x120/0x160
    ? sys_read+0x45/0x90
    system_call_fastpath+0x16/0x1b
  Code: 49 0f af 41 50 31 d2 49 f7 f0 48 83 f8 01 48 0f 46 c6 48 2b 07 48 8b bf 40 01 00 00 48 85 ff 74 3a 45 31 c0 48 8b 8f 50 01 00 00 <48> 8b 11 4c 8b 89 80 00 00 00 49 89 d2 48 01 d0 45 8b 59 58 4c
  RIP  [<ffffffff81063ac0>] effective_load.isra.43+0x50/0x90
   RSP <ffff880221ddfbd8>
  CR2: 0000000000000000

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Yong Zhang <yong.zhang0@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@vger.kernel.org # 2.6.39+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'block-dev'
Linus Torvalds [Mon, 3 Dec 2012 18:53:25 +0000 (10:53 -0800)]
Merge branch 'block-dev'

Merge 'block-dev' branch.

I was going to just mark everything here for stable and leave it to the
3.8 merge window, but having decided on doing another -rc, I migth as
well merge it now.

This removes the bd_block_size_semaphore semaphore that was added in
this release to fix a race condition between block size changes and
block IO, and replaces it with atomicity guaratees in fs/buffer.c
instead, along with simplifying fs/block-dev.c.

This removes more lines than it adds, makes the code generally simpler,
and avoids the latency/rt issues that the block size semaphore
introduced for mount.

I'm not happy with the timing, but it wouldn't be much better doing this
during the merge window and then having some delayed back-port of it
into stable.

* block-dev:
  blkdev_max_block: make private to fs/buffer.c
  direct-io: don't read inode->i_blkbits multiple times
  blockdev: remove bd_block_size_semaphore again
  fs/buffer.c: make block-size be per-page and protected by the page lock

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 3 Dec 2012 00:39:00 +0000 (16:39 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) 8139cp leaks memory in error paths, from Francois Romieu.

 2) do_tcp_sendpages() cannot handle order > 0 pages, but they can
    certainly arrive there now, fix from Eric Dumazet.

 3) Race condition and sysfs fixes in bonding from Nikolay Aleksandrov.

 4) Remain-on-Channel fix in mac80211 from Felix Liao.

 5) CCK rate calculation fix in iwlwifi, from Emmanuel Grumbach.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  8139cp: fix coherent mapping leak in error path.
  tcp: fix crashes in do_tcp_sendpages()
  bonding: fix race condition in bonding_store_slaves_active
  bonding: make arp_ip_target parameter checks consistent with sysfs
  bonding: fix miimon and arp_interval delayed work race conditions
  mac80211: fix remain-on-channel (non-)cancelling
  iwlwifi: fix the basic CCK rates calculation

11 years agoMerge tag 'md-3.7-fixes' of git://neil.brown.name/md
Linus Torvalds [Mon, 3 Dec 2012 00:24:31 +0000 (16:24 -0800)]
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md

Pull md bugfix from NeilBrown:
 "Single bugfix for raid1/raid10.

  Fixes a recently introduced deadlock."

* tag 'md-3.7-fixes' of git://neil.brown.name/md:
  md/raid1{,0}: fix deadlock in bitmap_unplug.

11 years agoopen*(2) compat fixes (s390, arm64)
Al Viro [Sun, 2 Dec 2012 17:55:07 +0000 (17:55 +0000)]
open*(2) compat fixes (s390, arm64)

The usual rules for open()/openat()/open_by_handle_at() are
 1) native 32bit - don't force O_LARGEFILE in flags
 2) native 64bit - force O_LARGEFILE in flags
 3) compat on 64bit host - as for native 32bit
 4) native 32bit ABI for 64bit system (mips/n32, x86/x32) - as for
    native 64bit

There are only two exceptions - s390 compat has open() forcing
O_LARGEFILE and arm64 compat has open_by_handle_at() doing the same
thing.  The same binaries on native host (s390/31 and arm resp.) will
*not* force O_LARGEFILE, so IMO both are emulation bugs.

Objections? The fix is obvious...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Sun, 2 Dec 2012 01:55:13 +0000 (17:55 -0800)]
Merge branch 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull  late workqueue fixes from Tejun Heo:
 "Unfortunately, I have two really late fixes.  One was for a
  long-standing bug and queued for 3.8 but I found out about a
  regression introduced during 3.7-rc1 two days ago, so I'm sending out
  the two fixes together.

  The first (long-standing) one is rescuer_thread() entering exit path
  w/ TASK_INTERRUPTIBLE.  It only triggers on workqueue destructions
  which isn't very frequent and the exit path can usually survive being
  called with TASK_INTERRUPT, so it was hidden pretty well.  Apparently,
  if you're reiserfs, this could lead to the exiting kthread sleeping
  indefinitely holding a mutex, which is never good.

  The fix is simple - restoring TASK_RUNNING before returning from the
  kthread function.

  The second one is introduced by the new mod_delayed_work().
  mod_delayed_work() was missing special case handling for 0 delay.
  Instead of queueing the work item immediately, it queued the timer
  which expires on the closest next tick.  Some users of the new
  function converted from "[__]cancel_delayed_work() +
  queue_delayed_work()" combination became unhappy with the extra delay.

  Block unplugging led to noticeably higher number of context switches
  and intel 6250 wireless failed to associate with WPA-Enterprise
  network.  The fix, again, is fairly simple.  The 0 delay special case
  logic from queue_delayed_work_on() should be moved to
  __queue_delayed_work() which is shared by both queue_delayed_work_on()
  and mod_delayed_work_on().

  The first one is difficult to trigger and the failure mode for the
  latter isn't completely catastrophic, so missing these two for 3.7
  wouldn't make it a disastrous release, but both bugs are nasty and the
  fixes are fairly safe"

* 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay
  workqueue: exit rescuer_thread() as TASK_RUNNING

11 years ago8139cp: fix coherent mapping leak in error path.
françois romieu [Sat, 1 Dec 2012 13:08:50 +0000 (13:08 +0000)]
8139cp: fix coherent mapping leak in error path.

cp_open
[...]
        rc = cp_alloc_rings(cp);
        if (rc)
                return rc;

cp_alloc_rings
[...]
        mem = dma_alloc_coherent(&cp->pdev->dev, CP_RING_BYTES,
                                 &cp->ring_dma, GFP_KERNEL);

- cp_alloc_rings never frees the coherent mapping it allocates
- neither do cp_open when cp_alloc_rings fails

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: fix crashes in do_tcp_sendpages()
Eric Dumazet [Sat, 1 Dec 2012 13:07:02 +0000 (13:07 +0000)]
tcp: fix crashes in do_tcp_sendpages()

Recent network changes allowed high order pages being used
for skb fragments.

This uncovered a bug in do_tcp_sendpages() which was assuming its caller
provided an array of order-0 page pointers.

We only have to deal with a single page in this function, and its order
is irrelevant.

Reported-by: Willy Tarreau <w@1wt.eu>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoworkqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay
Tejun Heo [Sun, 2 Dec 2012 00:23:42 +0000 (16:23 -0800)]
workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay

8376fe22c7 ("workqueue: implement mod_delayed_work[_on]()")
implemented mod_delayed_work[_on]() using the improved
try_to_grab_pending().  The function is later used, among others, to
replace [__]candel_delayed_work() + queue_delayed_work() combinations.

Unfortunately, a delayed_work item w/ zero @delay is handled slightly
differently by mod_delayed_work_on() compared to
queue_delayed_work_on().  The latter skips timer altogether and
directly queues it using queue_work_on() while the former schedules
timer which will expire on the closest tick.  This means, when @delay
is zero, that [__]cancel_delayed_work() + queue_delayed_work_on()
makes the target item immediately executable while
mod_delayed_work_on() may induce delay of upto a full tick.

This somewhat subtle difference breaks some of the converted users.
e.g. block queue plugging uses delayed_work for deferred processing
and uses mod_delayed_work_on() when the queue needs to be immediately
unplugged.  The above problem manifested as noticeably higher number
of context switches under certain circumstances.

The difference in behavior was caused by missing special case handling
for 0 delay in mod_delayed_work_on() compared to
queue_delayed_work_on().  Joonsoo Kim posted a patch to add it -
("workqueue: optimize mod_delayed_work_on() when @delay == 0")[1].
The patch was queued for 3.8 but it was described as optimization and
I missed that it was a correctness issue.

As both queue_delayed_work_on() and mod_delayed_work_on() use
__queue_delayed_work() for queueing, it seems that the better approach
is to move the 0 delay special handling to the function instead of
duplicating it in mod_delayed_work_on().

Fix the problem by moving 0 delay special case handling from
queue_delayed_work_on() to __queue_delayed_work().  This replaces
Joonsoo's patch.

[1] http://thread.gmane.org/gmane.linux.kernel/1379011/focus=1379012

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-tested-by: Anders Kaseorg <andersk@MIT.EDU>
Reported-and-tested-by: Zlatko Calusic <zlatko.calusic@iskon.hr>
LKML-Reference: <alpine.DEB.2.00.1211280953350.26602@dr-wily.mit.edu>
LKML-Reference: <50A78AA9.5040904@iskon.hr>
Cc: Joonsoo Kim <js1304@gmail.com>
11 years agoworkqueue: exit rescuer_thread() as TASK_RUNNING
Mike Galbraith [Wed, 28 Nov 2012 06:17:18 +0000 (07:17 +0100)]
workqueue: exit rescuer_thread() as TASK_RUNNING

A rescue thread exiting TASK_INTERRUPTIBLE can lead to a task scheduling
off, never to be seen again.  In the case where this occurred, an exiting
thread hit reiserfs homebrew conditional resched while holding a mutex,
bringing the box to its knees.

PID: 18105  TASK: ffff8807fd412180  CPU: 5   COMMAND: "kdmflush"
 #0 [ffff8808157e7670] schedule at ffffffff8143f489
 #1 [ffff8808157e77b8] reiserfs_get_block at ffffffffa038ab2d [reiserfs]
 #2 [ffff8808157e79a8] __block_write_begin at ffffffff8117fb14
 #3 [ffff8808157e7a98] reiserfs_write_begin at ffffffffa0388695 [reiserfs]
 #4 [ffff8808157e7ad8] generic_perform_write at ffffffff810ee9e2
 #5 [ffff8808157e7b58] generic_file_buffered_write at ffffffff810eeb41
 #6 [ffff8808157e7ba8] __generic_file_aio_write at ffffffff810f1a3a
 #7 [ffff8808157e7c58] generic_file_aio_write at ffffffff810f1c88
 #8 [ffff8808157e7cc8] do_sync_write at ffffffff8114f850
 #9 [ffff8808157e7dd8] do_acct_process at ffffffff810a268f
    [exception RIP: kernel_thread_helper]
    RIP: ffffffff8144a5c0  RSP: ffff8808157e7f58  RFLAGS: 00000202
    RAX: 0000000000000000  RBX: 0000000000000000  RCX: 0000000000000000
    RDX: 0000000000000000  RSI: ffffffff8107af60  RDI: ffff8803ee491d18
    RBP: 0000000000000000   R8: 0000000000000000   R9: 0000000000000000
    R10: 0000000000000000  R11: 0000000000000000  R12: 0000000000000000
    R13: 0000000000000000  R14: 0000000000000000  R15: 0000000000000000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018

Signed-off-by: Mike Galbraith <mgalbraith@suse.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org