Commit graph

560565 commits

Author SHA1 Message Date
Ricardo Ribalda 5d273c7513 [media] Docbook: media: Document changes on struct v4l2_ext_controls
Vidioc-g-ext-ctrls can now be used to get the default value of the
controls.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:48:14 -02:00
Ricardo Ribalda 082afb7c4e [media] media/usb/pvrusb2: Support for V4L2_CTRL_WHICH_DEF_VAL
This driver does not use the control infrastructure.
Add support for the new field which on structure
 v4l2_ext_controls

Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:46:44 -02:00
Ricardo Ribalda 91739838a5 [media] usb/uvc: Support for V4L2_CTRL_WHICH_DEF_VAL
This driver does not use the control infrastructure.
Add support for the new field which on structure
 v4l2_ext_controls

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:46:21 -02:00
Ricardo Ribalda 953eae5d8d [media] media/v4l2-core: struct struct v4l2_ext_controls param which
Support for new field which on v4l2_ext_controls, used to get the
default value of one or more controls.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:44:49 -02:00
Ricardo Ribalda 0f8017bebf [media] media/core: Replace ctrl_class with which
Replace the obsolete field ctrl_class with "which".

Make sure it not used in future modules by commenting out the field with
ifndef __KERNEL_ .

The field cannot be simply removed because that would be change on the
kenel API to the userspace (and we don't like that).

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:44:03 -02:00
Ricardo Ribalda 35ec2a2fa5 [media] videodev2.h: Extend struct v4l2_ext_controls
So it can be used to get the default value of a control.

Without this change it is not possible to get the
default value of array controls.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:42:42 -02:00
Hans Verkuil dc5e02050b [media] adv7511: fix incorrect bit offset
The quantization bits are in bits 7-6, not 7-4, so shift by 6 instead of 4.

This bug is caused by a typo in the adv7511 datasheet.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:39:54 -02:00
Mats Randgaard 74c9c0febb [media] v4l2-dv-timings: Compare horizontal blanking
hsync and hbackporch must also be compared

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:39:34 -02:00
Ricardo Ribalda 95ad7ff389 [media] v4l2-core/v4l2-ctrls: Filter NOOP CH_RANGE events
If modify_range is called but no range is changed, do not send the
CH_RANGE event.

Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:39:10 -02:00
Dan Carpenter 0dac45f0e5 [media] av7110: potential divide by zero
"len" comes from dvb_video_ioctl() and there is a possibility that it is
zero.  We do a divide by len later in the function so that's not ok.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:38:18 -02:00
Dan Carpenter 75d63a40a5 [media] av7110: don't allow negative volumes
The issue here is that we there is a static checker warning because we
have a user controlled volume setting and we cap the upper bound but we
allow negative numbers.  Negative volumes don't make sense, so let's
make these variables unsigned.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:36:39 -02:00
Hans Verkuil 4623e59674 [media] vb2: fix a regression in poll() behavior for output,streams
In the 3.17 kernel the poll() behavior changed for output streams:
as long as not all buffers were queued up poll() would return that
userspace can write. This is fine for the write() call, but when
using stream I/O this changed the behavior since the expectation
was that it would wait for buffers to become available for dequeuing.

This patch only enables the check whether you can queue buffers
for file I/O only, and skips it for stream I/O.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: <stable@vger.kernel.org>      # for v3.17 and up
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:35:39 -02:00
Hans Verkuil f6de9f6085 [media] vivid: fix compliance error
If vivid is loaded with the no_error_inj=1 option, then v4l2-compliance will
fail for the video and vbi output nodes because the vivid control class has no
controls.

Don't add the control class for video and vbi output if no_error_inj is true.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:34:23 -02:00
Hans Verkuil ba463988a0 [media] go7007: fix broken test
The wrong flags field was tested for the GO7007_BOARD_HAS_AUDIO flag: that
flag is in board->main_info.flags, not in board->flags.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:33:41 -02:00
Hans Verkuil f18e16239f [media] DocBook media: s/input stream/capture stream/
The term "input stream" is confusing since it is not clear whether this is an
input stream from the point of view of the application or from the point of
view of the hardware. So replace it with the more standard term "capture stream".

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:33:07 -02:00
Andrzej Hajda a5c36fa6ee [media] staging: media: davinci_vpfe: fix ipipe_mode type
The variable can take negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:27:28 -02:00
Junsu Shin cbb6f1f9c7 [media] staging: media: davinci_vpfe: Fix over 80 characters coding style issue
This is a patch to the dm365_ipipe.c that fixes over 80 characters
warning detected.

Signed-off-by: Junsu Shin <jjunes0@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:27:08 -02:00
Arnd Bergmann 3148543da6 [media] staging/davinci/vpfe/dm365: add missing dependencies
This driver can only be built when VIDEO_V4L2_SUBDEV_API
and VIDEO_DAVINCI_VPBE_DISPLAY are also provided by the
kernel.

drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format':
drivers/staging/media/davinci_vpfe/dm365_isif.c:1410:3: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration]
   return v4l2_subdev_get_try_format(fh, pad);
   ^

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:26:52 -02:00
Nicholas Mc Guire d9f4844af8 [media] staging: media: davinci_vpfe: drop condition with no effect
As the if and else branch body are identical the condition has no effect and
can be dropped.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:26:17 -02:00
Julia Lawall 80a7f727b0 [media] drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c: use correct structure type name in sizeof
Correct typo in the name of the type given to sizeof.  Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).  The
semantic patch used can be found in message 0 of this patch series.

[Replace sizeof(type) by sizeof(variable)]]

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:25:34 -02:00
Mauro Carvalho Chehab eb4b0ec75e [media] include/media: move platform_data to linux/platform_data/media
Let's not mix platform_data headers with the core headers. Instead, let's
create a subdir at linux/platform_data and move the headers to that
common place, adding it to MAINTAINERS.

The headers were moved with:
	mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/

And the references fixed with this script:
    MAIN_DIR="linux/platform_data/"
    PREV_DIR="media/"
    DIRS="media/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
		 n=`basename $j`
		git grep -l $n
	done
    done|sort|uniq >files && (
	echo "Handling files..." >&2;
	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done";
	);
	echo "Handling documentation..." >&2;
	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done"
	);
    ) >script && . ./script

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-11-17 06:58:42 -02:00
Mauro Carvalho Chehab d647f0b70c [media] include/media: move driver interface headers to a separate dir
Let's not mix headers used by the core with those headers that
are needed by some driver-specific interface header.

The headers used on drivers were manually moved using:
    mkdir include/media/drv-intf/
    git mv include/media/cx2341x.h include/media/cx25840.h \
	include/media/exynos-fimc.h include/media/msp3400.h \
	include/media/s3c_camif.h include/media/saa7146.h \
	include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
	include/media/sh_mobile_csi2.h include/media/sh_vou.h \
	include/media/si476x.h include/media/soc_mediabus.h \
	include/media/tea575x.h include/media/drv-intf/

And the references for those headers were corrected using:

    MAIN_DIR="media/"
    PREV_DIR="media/"
    DIRS="drv-intf/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
		 n=`basename $j`
		git grep -l $n
	done
    done|sort|uniq >files && (
	echo "Handling files..." >&2;
	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done";
	);
	echo "Handling documentation..." >&2;
	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done"
	);
    ) >script && . ./script

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-11-17 06:57:29 -02:00
Mauro Carvalho Chehab b5dcee225c [media] include/media: split I2C headers from V4L2 core
Currently, include/media is messy, as it contains both the V4L2 core
headers and some driver-specific headers on the same place. That makes
harder to identify what core headers should be documented and what
headers belong to I2C drivers that are included only by bridge/main
drivers that would require the functions provided by them.

Let's move those i2c specific files to its own subdirectory.

The files to move were produced via the following script:
	mkdir include/media/i2c
	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
	for i in include/media/*.h; do n=`basename $i`;  (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done

And the references corrected via this script:
    MAIN_DIR="media/"
    PREV_DIR="media/"
    DIRS="i2c/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
		 n=`basename $j`
		git grep -l $n
	done
    done|sort|uniq >files && (
	echo "Handling files..." >&2;
	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done";
	);
	echo "Handling documentation..." >&2;
	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
	(
		cd include/$MAIN_DIR;
		for j in $DIRS; do
			for i in $(ls $j); do
				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
			done;
		done;
		echo "cat > a && mv a \$i; done"
	);
    ) >script && . ./script

Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-11-17 06:57:11 -02:00
Alec Leamas b7be755733 [media] bz#75751: Move internal header file lirc.h to uapi/
The file include/media/lirc.h describes a public interface and
should thus be a public header. See kernel bug
https://bugzilla.kernel.org/show_bug.cgi?id=75751 which has
a manpage describing the interface + an acknowledgment that this
info belongs to uapi.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:47:43 -02:00
Graham Whaley f82a9ece92 [media] DocBook/media/Makefile: Do not fail mkdir if dir already exists
Commit 5240f4e68d ("[media] DocBook/media/Makefile: Avoid make htmldocs
to fail") introduced a mkdir which is always called through
install_media_images from the Documentation/DocBook/Makefile htmldocs rule.
If you run 'make htmldocs' more than once you get:

 mkdir: cannot create directory ‘./Documentation/DocBook//media_api’:
  File exists

Add -p to the mkdir to continue no matter if the dir already exists.

Signed-off-by: Graham Whaley <graham.whaley@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:47:19 -02:00
Mauro Carvalho Chehab bef0e549d1 [media] dvb_frontend.h: improve documentation for struct dvb_tuner_ops
Improve the comments at the header, removing kernel-doc
tag from where it doesn't belong, grouping the legacy tuner
functions, and improving the text.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:46:42 -02:00
Mauro Carvalho Chehab 45346e0e83 [media] dvb_frontend: get rid of set_state ops & related data
The get_state()/set_state and the corresponding data types
(struct tuner_state and enum tuner_param) are old DVB interfaces
that came from the DVBv3 time.

Nowadays, set_params() provide a better way to set the tuner
and demod parameters. So, no need to keep those legacy stuff,
as all drivers that were using it got converted.

With this patch, all kABI elements at dvb_frontend.h are now
documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:46:02 -02:00
Mauro Carvalho Chehab 65f0f686de [media] stb6100: get rid of get_state()/set_state()
It is tricky to get rid of those ops here, as the stv0299 driver
wants to set frequency in separate from setting the bandwidth.

So, we use a small trick: we temporarely fill the cache with
0 for either frequency or bandwidth and add some logic at
set_params to only change the property(ies) that aren't zero.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:45:05 -02:00
Mauro Carvalho Chehab b2d3afcfbd [media] tda6655: get rid of get_state()/set_state()
Those ops aren't used by any driver, with is weird. I suspect
that mantis_vb3030 driver were not working properly...

Anyway, now that the driver uses the set_parms, the DVB
frontend core should do the right thing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:44:31 -02:00
Mauro Carvalho Chehab e417668d40 [media] tda8261: don't use set_state/get_state callbacks
Those callbacks are meant to be used only on some very specific
cases. There's absolutely no need to do that at tda8261, as
the only parameter that it allows to be set/get is the frequency.

So, use the standard get_params() and get_frequency() kABI
ops.

There's no need to touch at any bridge driver, as all interactions
are done via the macros at tda8261_cfg.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:43:59 -02:00
Mauro Carvalho Chehab 8fdc25bf61 [media] tda666x: add support for set_parms() and get_frequency()
Those two callbacks are the ones that should be used by normal
DVB frontend drivers.

Add support for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:43:15 -02:00
Mauro Carvalho Chehab 8e6c4be3f8 [media] tda665x: split set_frequency from set_state
On tda665x, set_state only sets frequency. As the kABI for set_state
is meant to be used only on special cases, split the function
into two, in order to allow it to be latter used by a DVBv5
cache params logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:42:32 -02:00
Mauro Carvalho Chehab cffdbfe7cf [media] stb6100: get rid of tuner_state at struct stb6100_state
The stb6100 driver has a struct tuner_state on its state
struct, that it is used only to store the bandwidth. Even so,
this struct is not really used, as every time the bandwidth
is get or set, it goes through the hardware.

So, get rid of that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:41:53 -02:00
Mauro Carvalho Chehab 2184e2530c [media] dvb_frontend.h: get rid of unused tuner params/states
There are several tuner_param values that aren't by any driver or core:
	DVBFE_TUNER_TUNERSTEP
	DVBFE_TUNER_IFFREQ
	DVBFE_TUNER_REFCLOCK
	DVBFE_TUNER_IQSENSE
	DVBFE_TUNER_DUMMY

Several of those correspond to the values at the tuner_state
struct with is also only initialized by not used anyware:
	u32 tunerstep;
	u32 ifreq;
	u32 refclock;

It doesn't make sense to keep anything at the kABI that it is
not used. So, get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:41:18 -02:00
Mauro Carvalho Chehab 41c0b78e5e [media] dvb_frontend.h: Document suspend/resume functions
Those functions should be implemented on all drivers. So, document
them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:40:54 -02:00
Mauro Carvalho Chehab 3663b31b69 [media] dvb_frontend: resume tone and voltage
As SEC tone and voltage could have changed during
suspend(), restore them to their previous values at
resume().

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:40:31 -02:00
Mauro Carvalho Chehab 03946b2d66 [media] demux.h: Some documentation fixups for the header
The DocBook description of this header has two issues:
- It calls the Kernel ABI as API, instead of kABI;
- It mentions that the DVB frontend kABI is not described
  within the document. As this will actually generate a
  single DocBook, this is actually not true, now that
  the documentation for the frontend was added.

So, fix both issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:39:00 -02:00
Mauro Carvalho Chehab 02f028cfd9 [media] dvb_frontend.h: Add a description for the header
This header file provides the kABI functions used by the
Digital TV Frontend core support. Add a description for
this kABI, to add at the device_drivers Kernel DocBook.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:38:33 -02:00
Mauro Carvalho Chehab 66f4b3cb5c [media] dvb_frontend: document the most used functions
Documents the most used functions at the Digital TV
kABI: dvb_frontend_register(), dvb_frontend_unregister()
and dvb_frontend_detach().

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:38:05 -02:00
Mauro Carvalho Chehab 75f400b0e3 [media] Document the obscure dvb_frontend_reinitialise()
The dvb_frontend_reinitialise() function is a special case
used by just one frontend. Document it, for completeness.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:37:39 -02:00
Mauro Carvalho Chehab 4deea4cb47 [media] dvb: document dvb_frontend_sleep_until()
This function is used mainly at the DVB core, in order to provide
emulation for a legacy ioctl. The only current exception is
the stv0299 driver, with takes more than 8ms to switch voltage,
breaking the emulation for FE_DISHNETWORK_SEND_LEGACY_CMD.

Document that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 06:37:16 -02:00
Mauro Carvalho Chehab 6747b39441 [media] device-drivers.tmpl: better organize DVB function calls
Classify the functions at the DVB core per API. That makes easier
to understand how they're related to the userspace API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-16 07:40:04 -02:00
Mauro Carvalho Chehab 7b6e55b970 [media] demux.h: move documentation overview from device-drivers.tmpl
It is better to keep the documentation overview at the header file,
as this makes easier for developers to remember to fix when needed.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-16 07:39:11 -02:00
Mauro Carvalho Chehab d55ebd07b6 [media] ivtv: avoid going past input/audio array
As reported by smatch:
	drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv->card->video_inputs' 6 <= 6

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-16 07:38:04 -02:00
Mauro Carvalho Chehab 823873481b [media] Revert "[media] ivtv: avoid going past input/audio array"
This patch broke ivtv logic, as reported at
 https://bugzilla.redhat.com/show_bug.cgi?id=1278942

This reverts commit 09290cc885.

Cc: stable@vger.kernel.org # for v4.1 and upper
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-16 07:37:45 -02:00
Mauro Carvalho Chehab 65b7f6d740 Linux 4.4-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWSSq2AAoJEHm+PkMAQRiGIpQH/2Ro7UPwLARfZyd7GKpCRd/D
 y1aJEk9GaEywkGKPd/Hf3XU+/9vxqyTWhkvpKHkGAFqzuYvw2rSE1JZnGfA+dyt/
 1R/WSKM8f3VL2xmNmRJCXH+zn3W2u8Cvk0oj8VN0hseXByQfCT4HfoHiFrNwuo/9
 63f93Dqsai1G3CBy+/HSPEv5CGR+7yeTJFWS0hQK4kc3prmitI93C5PZkyePyAId
 wrgKo320rIcNL/lEAbMFEBimAqluIjGvdrR9FK6w3F+OwSlTV1HdSwTzNjxwdpP5
 aRKNHZMdsGlShsn12Wsp+mjVFpi9OrT8Askq+/GTDsG+9QMia/gUKC21K9b6UxM=
 =byS9
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-rc1' into patchwork

Linux 4.4-rc1

* tag 'v4.4-rc1': (12900 commits)
  Linux 4.4-rc1
  ARC: Fix silly typo in MAINTAINERS file
  ARC: cpu_relax() to be compiler barrier even for UP
  ARC: use ASL assembler mnemonic
  ARC: [arcompact] Handle bus error from userspace as Interrupt not exception
  ARC: remove extraneous header include
  f2fs: xattr simplifications
  squashfs: xattr simplifications
  9p: xattr simplifications
  xattr handlers: Pass handler to operations instead of flags
  jffs2: Add missing capability check for listing trusted xattrs
  hfsplus: Remove unused xattr handler list operations
  ubifs: Remove unused security xattr handler
  vfs: Fix the posix_acl_xattr_list return value
  vfs: Check attribute names in posix acl xattr handers
  mpt3sas: fix inline markers on non inline function declarations
  dax: fix __dax_pmd_fault crash
  Revert "drm/rockchip: Convert the probe function to the generic drm_of_component_probe()"
  drm: Don't oops in drm_calc_timestamping_constants() if drm_vblank_init() wasn't called
  ALSA: pci: depend on ZONE_DMA
  ...
2015-11-16 07:27:01 -02:00
Linus Torvalds 8005c49d9a Linux 4.4-rc1 2015-11-15 17:00:27 -08:00
Linus Torvalds 0ca9b67606 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Thomas Gleixner:
 "Mostly updates to the perf tool plus two fixes to the kernel core code:

   - Handle tracepoint filters correctly for inherited events (Peter
     Zijlstra)

   - Prevent a deadlock in perf_lock_task_context (Paul McKenney)

   - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de
     Melo)

   - Print full source file paths when using 'perf annotate --print-line
     --full-paths' (Michael Petlan)

   - Fix 'perf probe -d' when just one out of uprobes and kprobes is
     enabled (Wang Nan)

   - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
     tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)

   - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by
     the 'perf test' LLVM entries, when running it in-tree, to
     .gitignore (Yunlong Song)

   - libbpf error reporting improvements, using a strerror interface to
     more precisely tell the user about problems with the provided
     scriptlet, be it in C or as a ready made object file (Wang Nan)

   - Do not be case sensitive when searching for matching 'perf test'
     entries (Arnaldo Carvalho de Melo)

   - Inform the user about objdump failures in 'perf annotate' (Andi
     Kleen)

   - Improve the LLVM 'perf test' entry, introduce a new ones for BPF
     and kbuild tests to check the environment used by clang to compile
     .c scriptlets (Wang Nan)"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
  perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro
  tools include: Add compiler.h to list.h
  perf probe: Verify parameters in two functions
  perf session: Add missing newlines to some pr_err() calls
  perf annotate: Support full source file paths for srcline fix
  perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
  perf: Fix inherited events vs. tracepoint filters
  perf: Disable IRQs across RCU RS CS that acquires scheduler lock
  perf test: Do not be case sensitive when searching for matching tests
  perf test: Add 'perf test BPF'
  perf test: Enhance the LLVM tests: add kbuild test
  perf test: Enhance the LLVM test: update basic BPF test program
  perf bpf: Improve BPF related error messages
  perf tools: Make fetch_kernel_version() publicly available
  bpf tools: Add new API bpf_object__get_kversion()
  bpf tools: Improve libbpf error reporting
  perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
  perf annotate: Inform the user about objdump failures in --stdio
  perf stat: Make stat options global
  perf sched latency: Fix thread pid reuse issue
  ...
2015-11-15 09:36:24 -08:00
Linus Torvalds 051b29f279 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Thomas Gleixner:
 "A single fix to prevent math underflow in the numa balancing code"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/numa: Fix math underflow in task_tick_numa()
2015-11-15 09:35:33 -08:00
Linus Torvalds 8f98e292eb Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull liblockdep fixes from Thomas Gleixner:
 "Three small patches to synchronize liblockdep with the latest core
  changes"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tools/liblockdep: explicitly declare lockdep API we call from liblockdep
  tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER
  tools/liblockdep: remove task argument from debug_check_no_locks_held
2015-11-15 09:34:32 -08:00