platform/adaptation/renesas_rcar/renesas_kernel.git
11 years ago[media] s5p-tv: Don't ignore return value of regulator_bulk_enable() in hdmi_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:48 +0000 (08:54 -0300)]
[media] s5p-tv: Don't ignore return value of regulator_bulk_enable() in hdmi_drv.c

This patch fixes following compilation warning:
 CC [M]  drivers/media/platform/s5p-tv/hdmi_drv.o
drivers/media/platform/s5p-tv/hdmi_drv.c: In function ‘hdmi_resource_poweron’:
drivers/media/platform/s5p-tv/hdmi_drv.c:583:23: warning: ignoring return value
 of ‘regulator_bulk_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Do not ignore regulator/clk API return values in sdo_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:30 +0000 (08:54 -0300)]
[media] s5p-tv: Do not ignore regulator/clk API return values in sdo_drv.c

This patch fixes following compilation warning:
drivers/media/platform/s5p-tv/sdo_drv.c: In function ‘sdo_runtime_resume’:
drivers/media/platform/s5p-tv/sdo_drv.c:268:18: warning: ignoring return value of ‘regulator_enable’,
  declared with attribute warn_unused_result
drivers/media/platform/s5p-tv/sdo_drv.c:269:18: warning: ignoring return value of ‘regulator_enable’,
  declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Don't ignore return value of regulator_enable() in sii9234_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:15 +0000 (08:54 -0300)]
[media] s5p-tv: Don't ignore return value of regulator_enable() in sii9234_drv.c

This patch fixes following compilation warning:
  CC [M]  drivers/media/platform/s5p-tv/sii9234_drv.o
drivers/media/platform/s5p-tv/sii9234_drv.c: In function ‘sii9234_runtime_resume’:
drivers/media/platform/s5p-tv/sii9234_drv.c:252:18: warning: ignoring return
  value of ‘regulator_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines
Sylwester Nawrocki [Fri, 31 May 2013 13:37:27 +0000 (10:37 -0300)]
[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines

This patch corrects the link_notify handler to support more complex
pipelines, including fimc-lite and fimc-is entities.
After the FIMC-IS driver addition the assumptions made in the link_notify
callback are no longer valid, e.g. the link between fimc-lite subdev and
its video node is not immutable any more and there is more subdevs than
just sensor, MIPI-CSIS and FIMC(-LITE).
The graph is now walked and for each video node found a media pipeline
which ends at this node is disabled/enabled (the subdevs are powered
on/off).

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] media: Change media device link_notify behaviour
Sylwester Nawrocki [Fri, 31 May 2013 13:37:26 +0000 (10:37 -0300)]
[media] media: Change media device link_notify behaviour

Currently the media device link_notify callback is invoked before the
actual change of state of a link when the link is being enabled, and
after the actual change of state when the link is being disabled.
This doesn't allow a media device driver to perform any operations
on a full graph before a link is disabled, as well as performing
any tasks on a modified graph right after a link's state is changed.
This patch modifies signature of the link_notify callback. This
callback is now called always before and after a link's state change.
To distinguish the notifications a 'notification' argument is added
to the link_notify callback: MEDIA_DEV_NOTIFY_PRE_LINK_CH indicates
notification before link's state change and
MEDIA_DEV_NOTIFY_POST_LINK_CH corresponds to a notification after
link flags change.

[mchehab@redhat.com: whitespace cleanups]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Add isp_dbg() macro
Sylwester Nawrocki [Fri, 31 May 2013 16:47:04 +0000 (13:47 -0300)]
[media] exynos4-is: Add isp_dbg() macro

Add a debug trace macro for the FIMC-IS ISP subdev and the ISP video
node drivers which are going to be added in subsequent patches.

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] exynos4-is: Move __fimc_videoc_querycap() function to the common module
Sylwester Nawrocki [Fri, 31 May 2013 16:47:03 +0000 (13:47 -0300)]
[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module

Move __fimc_videoc_querycap() function to the common exynos4-is-common.ko
module so it don't need to be reimplemented in multiple video node drivers
of the exynos4-is.

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] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers
Sylwester Nawrocki [Fri, 31 May 2013 16:47:02 +0000 (13:47 -0300)]
[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers

Remove duplicated code in the vidioc_try_fmt and vidioc_s_fmt handlers.
This is a pre-requsite to allow successful fimc.capture video open even
if its corresponding media entities are not linked into a complete
pipeline.

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] exynos4-is: Remove unused code
Sylwester Nawrocki [Fri, 31 May 2013 16:47:01 +0000 (13:47 -0300)]
[media] exynos4-is: Remove unused code

Remove unused macros and fields of struct fimc_is_video.

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] exynos4-is: Simplify bitmask usage
Phil Carmody [Fri, 31 May 2013 16:47:00 +0000 (13:47 -0300)]
[media] exynos4-is: Simplify bitmask usage

Merge the two sets of flags into one array to simplify accessing
arbitrary bits from them.

Signed-off-by: Phil Carmody <phil.carmody@partner.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support
Sylwester Nawrocki [Fri, 31 May 2013 16:46:59 +0000 (13:46 -0300)]
[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support

FIMC-LITE devices are never looked up by iterating over all platform
devices with bus_for_each_device() as these IP blocks are available
only on dt-only Exynos SoC platforms.

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] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler
Sylwester Nawrocki [Fri, 31 May 2013 14:37:25 +0000 (11:37 -0300)]
[media] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler

Protect the fimc/fimc-lite video nodes unregistration with their video
lock. This prevents a kernel crash when e.g. udev opens a video node
right after the driver registers it and then the driver tries to
unregister it and defers its probing. Using video_is_unregistered()
together with the video mutex allows safe unregistration of the video
nodes at any time.

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] exynos4-is: Fix sensor subdev -> FIMC notification setup
Sylwester Nawrocki [Fri, 31 May 2013 14:37:24 +0000 (11:37 -0300)]
[media] exynos4-is: Fix sensor subdev -> FIMC notification setup

Ensure the v4l2_device notifications from sensor subdev works
also after the media links reconfiguration.

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] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()
Sylwester Nawrocki [Fri, 31 May 2013 14:37:23 +0000 (11:37 -0300)]
[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()

It's not a critical error to call __fimc_pipeline_close() with missing
sensor subdev entity. Replace WARN_ON() with pr_warn() and return 0
instead of -EINVAL to fix control flow in some conditions.

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] exynos4-is: Use common exynos_media_pipeline data structure
Sylwester Nawrocki [Fri, 31 May 2013 14:37:22 +0000 (11:37 -0300)]
[media] exynos4-is: Use common exynos_media_pipeline data structure

This enumeration is now private to exynos4-is and the exynos5 camera
subsystem driver may have the subdevs handling designed differently.

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] exynos4-is: Do not use asynchronous runtime PM in release fop
Sylwester Nawrocki [Fri, 31 May 2013 14:37:21 +0000 (11:37 -0300)]
[media] exynos4-is: Do not use asynchronous runtime PM in release fop

Use pm_runtime_put_sync() instead of pm_runtime_put() to avoid races
in handling the 'state' bit flags when the fimc-capture drivers'
runtime_resume callback is called from the PM workqueue.

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] exynos4-is: Media graph/video device locking rework
Sylwester Nawrocki [Fri, 31 May 2013 14:37:20 +0000 (11:37 -0300)]
[media] exynos4-is: Media graph/video device locking rework

Remove driver private video node reference counters and use entity->use_count
instead. This makes the video pipelines power handling more similar to the
method used in omap3isp driver.
Now the graph mutex is taken always after the video mutex, as it is not
possible to ensure apposite order at the all modules.

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] exynos4-is: Preserve state of controls between /dev/video open/close
Sylwester Nawrocki [Fri, 31 May 2013 14:37:19 +0000 (11:37 -0300)]
[media] exynos4-is: Preserve state of controls between /dev/video open/close

This patch moves the code for inheriting subdev v4l2 controls on the
FIMC video capture nodes from open()/close() fops to the link setup
notification callback. This allows for the state of the FIMC controls
to be always kept, in opposite to the current situation when it is
lost when last process closes video device.
There is no visible change for the original V4L2 compliant interface.
For the MC aware applications (user_subdev_api == true) inheriting
of the controls is dropped, since there can be same controls on the
subdevs withing single pipeline, now when the ISP (FIMC-IS) is also
used.
This patch is a prerequisite to allow /dev/video device to be opened
without errors even if there is no media links connecting it to an
image source (sensor) subdev. This is required for a libv4l2 plugin
to be initialized while a video node is opened and it also should be
possible to always open the device to query the capabilities.

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] exynos4-is: Add struct exynos_video_entity
Sylwester Nawrocki [Fri, 31 May 2013 14:37:18 +0000 (11:37 -0300)]
[media] exynos4-is: Add struct exynos_video_entity

This patch introduces common structure for the video entities
to handle all video nodes and media pipelines associated with
them in more generic way.

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] exynos4-is: Move common functions to a separate module
Sylwester Nawrocki [Mon, 10 Jun 2013 11:51:44 +0000 (08:51 -0300)]
[media] exynos4-is: Move common functions to a separate module

Create a common module (exynos4-is-common.ko) for common functions
used across the exynos4-is video device and subdev drivers.

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] s5c73m3: Do not ignore errors from regulator_enable()
Sylwester Nawrocki [Fri, 31 May 2013 22:43:35 +0000 (19:43 -0300)]
[media] s5c73m3: Do not ignore errors from regulator_enable()

This fixes following compilation warning:
drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘__s5c73m3_power_off’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:1389:19: warning: ignoring return value
of ‘regulator_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Staticize local symbols
Sachin Kamat [Tue, 16 Apr 2013 05:02:21 +0000 (02:02 -0300)]
[media] exynos4-is: Staticize local symbols

These symbols are used only in their respective files and hence
should be made static.
[s.nawrocki@samsung.com: dropped the __fimc_is_hw_update_param()
 function change]

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] s5p-mfc: Remove redundant use of of_match_ptr macro
Sachin Kamat [Thu, 23 May 2013 03:51:19 +0000 (00:51 -0300)]
[media] s5p-mfc: Remove redundant use of of_match_ptr macro

'exynos_mfc_match' is always compiled in. Hence of_match_ptr
is unnecessary.

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: Remove redundant use of of_match_ptr macro
Sachin Kamat [Thu, 23 May 2013 03:51:18 +0000 (00:51 -0300)]
[media] exynos-gsc: Remove redundant use of of_match_ptr macro

This is a DT only driver and exynos_gsc_match is always compiled
in. Hence of_match_ptr is unnecessary.

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] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in mixer_drv.c
Sachin Kamat [Fri, 17 May 2013 03:31:02 +0000 (00:31 -0300)]
[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in mixer_drv.c

NULL check on clocks obtained using common clock APIs should not
be done. Use IS_ERR only.
[s.nawrocki: removed unrelated whitespace change]

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] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in hdmi_drv.c
Sachin Kamat [Fri, 17 May 2013 03:31:01 +0000 (00:31 -0300)]
[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in hdmi_drv.c

NULL check on clocks obtained using common clock APIs should not
be done. Use IS_ERR only.

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] exynos4-is: Correct querycap ioctl handling at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:53 +0000 (09:27 -0300)]
[media] exynos4-is: Correct querycap ioctl handling at fimc-lite driver

Fill in properly bus_info and card fields and set device_caps.
The querycap ioctl handler is renamed for consistency with the
other ioctls.

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] exynos4-is: Remove platform_device_id table at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:08 +0000 (09:27 -0300)]
[media] exynos4-is: Remove platform_device_id table at fimc-lite driver

The driver id_table is unused since all SoCs containing the FIMC-LITE
IP block have been dt-only. Just remove it.

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] exynos4-is: Fix example dts in .../bindings/samsung-fimc.txt
Sylwester Nawrocki [Wed, 8 May 2013 17:24:14 +0000 (14:24 -0300)]
[media] exynos4-is: Fix example dts in .../bindings/samsung-fimc.txt

The s5c73m3 sensor node should be off an I2C bus controller node.

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-tv: fix error return code in mxr_acquire_video()
Wei Yongjun [Mon, 13 May 2013 04:49:13 +0000 (01:49 -0300)]
[media] s5p-tv: fix error return code in mxr_acquire_video()

Fix to return a negative error code in the vb2_dma_contig_init_ctx()
error handling case instead of 0, as done elsewhere in this function.
Also vb2_dma_contig_init_ctx() return ERR_PTR() in case of error and
never return NULL, so use IS_ERR() replace IS_ERR_OR_NULL().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s3c-camif: Remove redundant NULL check
Sachin Kamat [Tue, 30 Apr 2013 05:16:18 +0000 (02:16 -0300)]
[media] s3c-camif: Remove redundant NULL check

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

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove redundant NULL check in fimc-lite.c
Sachin Kamat [Tue, 30 Apr 2013 03:51:33 +0000 (00:51 -0300)]
[media] exynos4-is: Remove redundant NULL check in fimc-lite.c

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: replaced initialisations to NULL with ERR_PTR() value]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Fix whitespace related warnings
Sachin Kamat [Tue, 30 Apr 2013 08:04:09 +0000 (05:04 -0300)]
[media] s5c73m3: Fix whitespace related warnings

Silences the following type of warning:
WARNING: space prohibited before semicolon

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] s3c-camif: Use dev_info instead of printk
Sachin Kamat [Tue, 30 Apr 2013 05:16:21 +0000 (02:16 -0300)]
[media] s3c-camif: Use dev_info instead of printk

dev_info is preferred to printk. Silences the related checkpatch
warning.
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ...
then pr_info(...  to printk(KERN_INFO ...

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] s3c-camif: Staticize local symbols
Sachin Kamat [Tue, 30 Apr 2013 05:16:20 +0000 (02:16 -0300)]
[media] s3c-camif: Staticize local symbols

These symbols are local to the file and should be static.

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] media: info leak in __media_device_enum_links()
Dan Carpenter [Sat, 13 Apr 2013 09:32:15 +0000 (06:32 -0300)]
[media] media: info leak in __media_device_enum_links()

These structs have holes and reserved struct members which aren't
cleared.  I've added a memset() so we don't leak stack information.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: ccp2: Don't ignore the regulator_enable() return value
Laurent Pinchart [Wed, 29 May 2013 03:47:41 +0000 (00:47 -0300)]
[media] omap3isp: ccp2: Don't ignore the regulator_enable() return value

Check the return value and catch errors correctly.

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>
11 years ago[media] omap3isp: Defer probe when the IOMMU is not available
Laurent Pinchart [Mon, 11 Mar 2013 15:02:13 +0000 (12:02 -0300)]
[media] omap3isp: Defer probe when the IOMMU is not available

When the OMAP3 ISP driver is compiled in the kernel the device can be
probed before the corresponding IOMMU is available. Defer the probe in
that case, and fix a crash in the error path.

Reported-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: include linux/mm_types.h
Arnd Bergmann [Fri, 31 May 2013 22:22:50 +0000 (19:22 -0300)]
[media] omap3isp: include linux/mm_types.h

The ispqueue.h file uses vm_flags_t, which is defined in
linux/mm_types.h, so we must include that header in order
to build in all configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 09:17:54 +0000 (06:17 -0300)]
[media] omap3isp: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: Remove most 80-cols checkpatch warnings
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:51 +0000 (11:47 -0300)]
[media] drxk_hard: Remove most 80-cols checkpatch warnings

X-Patchwork-Delegate: mchehab@redhat.com
There are a few cases where breaking the code into separate
lines make it worse to read. However, on several places,
breaking it to make checkpatch.pl happier is OK and improves
code readability.
So, break longer lines where that won't cause harm.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: remove needless parenthesis
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:50 +0000 (11:47 -0300)]
[media] drxk_hard: remove needless parenthesis

X-Patchwork-Delegate: mchehab@redhat.com
There are several places where: state->var = (some_var)
The parenthesis there are doing nothing but making it
harder to read and breaking the 80 columns soft limits.
Just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: don't use more than 80 columns
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:49 +0000 (11:47 -0300)]
[media] drxk_hard.h: don't use more than 80 columns

X-Patchwork-Delegate: mchehab@redhat.com
Almost all 80-col warnings are related to comments. There's
one, however, that it is due to a one-line enum declaration
for enum agc_ctrl_mode.
Break it into one line per enumered data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: Remove some alien comment markups
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:48 +0000 (11:47 -0300)]
[media] drxk_hard.h: Remove some alien comment markups

X-Patchwork-Delegate: mchehab@redhat.com
The comments markup language used on Kernel is defined at:
Documentation/kernel-doc-nano-HOWTO.txt
Remove invalid markups from the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use usleep_range()
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:47 +0000 (11:47 -0300)]
[media] drxk_hard: use usleep_range()

X-Patchwork-Delegate: mchehab@redhat.com
Fixes the following checkpatch.pl warnings:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(10);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't split strings across lines
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:46 +0000 (11:47 -0300)]
[media] drxk_hard: don't split strings across lines

X-Patchwork-Delegate: mchehab@redhat.com
WARNING: quoted string split across lines
#5416: FILE: media/dvb-frontends/drxk_hard.c:5416:
+ dprintk(1, "Could not set demodulator parameters. Make "
+ "sure qam_demod_parameter_count (%d) is correct for "
WARNING: quoted string split across lines
#5423: FILE: media/dvb-frontends/drxk_hard.c:5423:
+ dprintk(1, "Auto-probing the correct QAM demodulator command "
+ "parameters was successful - using %d parameters.\n",

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:45 +0000 (11:47 -0300)]
[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros

X-Patchwork-Delegate: mchehab@redhat.com
replace all occurrences of  printk(KERN_* by
pr_info/pr_warn/pr_err/pr_debug/pr_cont macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: Don't use CamelCase
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:44 +0000 (11:47 -0300)]
[media] drxk_hard: Don't use CamelCase

X-Patchwork-Delegate: mchehab@redhat.com
Thare are lots of CamelCase warnings produced by checkpatch.pl.
This weren't fixed at the time the driver got submitted due
to the lack of manpower do to such cleanup.
Now that I have one script that automates this task, cleans
it. That makes the driver almost checkpatch-compliant,
except for 80 column warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't re-implement log10
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:43 +0000 (11:47 -0300)]
[media] drxk_hard: don't re-implement log10

X-Patchwork-Delegate: mchehab@redhat.com
Log10 routine is already defined at dvb_math.h and provides a good
enough approximation for 100 x log10(). So, instead of reinventing
the wheel, use the already existing function.
While here, don't use CamelCase on the function name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct latest device name
Antti Palosaari [Tue, 4 Jun 2013 22:43:30 +0000 (19:43 -0300)]
[media] rtl28xxu: correct latest device name

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)
Alessandro Miceli [Tue, 4 Jun 2013 19:10:34 +0000 (16:10 -0300)]
[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)

The device has been tested on a MIPSel box with kernel 3.1.1 and backported media_tree drivers
The kernel detects the device with the following output:
usbcore: registered new interface driver dvb_usb_rtl28xxu
usb 1-2: dvb_usb_v2: found a 'Crypto Redi PC50A' in warm state
usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Crypto Redi PC50A)
usb 1-2: DVB: registering adapter 1 frontend 0 (Realtek RTL2832 (DVB-T))...
i2c i2c-4: fc0012: Fitipower FC0012 successfully identified
usb 1-2: dvb_usb_v2: 'Crypto Redi PC50A' successfully initialized and connected

[crope@iki.fi: fix trivial merge conflict]
Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: use masked reg write where possible
Antti Palosaari [Tue, 4 Jun 2013 21:26:54 +0000 (18:26 -0300)]
[media] rtl28xxu: use masked reg write where possible

Use masked register write inside rtl2832u_power_ctrl().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black
Antti Palosaari [Tue, 4 Jun 2013 20:24:06 +0000 (17:24 -0300)]
[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct some device names
Antti Palosaari [Tue, 4 Jun 2013 20:01:25 +0000 (17:01 -0300)]
[media] rtl28xxu: correct some device names

... just because I want to be perfect ;)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini
Miroslav Šustek [Tue, 14 May 2013 22:42:11 +0000 (19:42 -0300)]
[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini

USB ID 0413:6a03 is Leadtek WinFast DTV Dongle mini.
Decoder Realtek RTL2832U and tuner Infineon TUA9001.

Signed-off-by: Miroslav Šustek <sustmidown@centrum.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: remove redundant IS_ENABLED macro
Antti Palosaari [Tue, 4 Jun 2013 19:50:54 +0000 (16:50 -0300)]
[media] rtl28xxu: remove redundant IS_ENABLED macro

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: reimplement rtl2832u remote controller
Antti Palosaari [Tue, 4 Jun 2013 12:17:03 +0000 (09:17 -0300)]
[media] rtl28xxu: reimplement rtl2832u remote controller

Thanks to Rodrigo for original implementation!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl2832u: restore ir remote control support
Rodrigo Tartajo [Sat, 20 Apr 2013 23:02:12 +0000 (20:02 -0300)]
[media] rtl2832u: restore ir remote control support

Hi,
This patch uses the driver from openpli[1] as a template to restore the remote control support.
I had to divert from the original to use the in kernel rc protocol decoder. The key repetition does,
not seem to work but I cant find the problem in the driver. As a raw rc provider, no key table is
hardcoded.
Rodrigo.
[1]: https://aur.archlinux.org/packages/dvb-usb-rtl2832u-openpli/?comments=all

Signed-off-by: Rodrigo Tartajo <rtarty@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Rename media_entity_remote_source to media_entity_remote_pad
Andrzej Hajda [Mon, 3 Jun 2013 08:16:13 +0000 (05:16 -0300)]
[media] media: Rename media_entity_remote_source to media_entity_remote_pad

Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: correct TS mode handling
Antti Palosaari [Mon, 3 Jun 2013 22:39:51 +0000 (19:39 -0300)]
[media] af9035: correct TS mode handling

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: minor log writing changes
Antti Palosaari [Mon, 3 Jun 2013 21:50:43 +0000 (18:50 -0300)]
[media] af9035: minor log writing changes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: make checkpatch.pl happy!
Antti Palosaari [Mon, 3 Jun 2013 21:42:14 +0000 (18:42 -0300)]
[media] af9035: make checkpatch.pl happy!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: implement I2C adapter read operation
Antti Palosaari [Mon, 11 Mar 2013 22:05:39 +0000 (19:05 -0300)]
[media] af9035: implement I2C adapter read operation

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2
Alessandro Miceli [Fri, 3 May 2013 18:58:21 +0000 (15:58 -0300)]
[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2

Tested on a MIPSel box with 3.3.6 kernel
The kernel output when the device will be detected follows:
usbcore: registered new interface driver dvb_usb_it913x
it913x: Chip Version=01 Chip Type=9135
it913x: Remote propriety (raw) mode
it913x: Dual mode=3 Tuner Type=38
it913x: Chip Version=01 Chip Type=9135
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in cold state
usb 2-1: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9137-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204147968
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in warm state
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 1 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_1)...
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 2 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_2)...
usb 2-1: dvb_usb_v2: 'Digital Dual TV Receiver CTVDIGDUAL_V2' successfully initialized and connected
RC part not tested

Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign of CRL_FREQ doesn't depend on inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:03:13 +0000 (15:03 -0300)]
[media] stb0899: sign of CRL_FREQ doesn't depend on inversion

Contrary to CFR (derotator frequency), which changes signedness
depending on inversion, CRL_FREQ does not.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: use autodetected inversion instead of configured inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:02:05 +0000 (15:02 -0300)]
[media] stb0899: use autodetected inversion instead of configured inversion

For consistency, it is necessary to use the autodetected inversion
instead of the configured one.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store autodetected inversion while tuning in non S2 mode
Reinhard Nißl [Sun, 2 Jun 2013 18:01:18 +0000 (15:01 -0300)]
[media] stb0899: store autodetected inversion while tuning in non S2 mode

In non S2 mode, the device is able to autodetect inversion. So
let's store it for tuning to S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store successful inversion for next run
Reinhard Nißl [Sun, 2 Jun 2013 17:59:00 +0000 (14:59 -0300)]
[media] stb0899: store successful inversion for next run

Usually, inversion doesn't change in a system. Storing the last
successful inversion value speeds up tuning of DVB-S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 2000000
Zoran Turalija [Sun, 2 Jun 2013 17:56:33 +0000 (14:56 -0300)]
[media] stb0899: allow minimum symbol rate of 2000000

Looks like product datasheets for tuners containing STB0899 are
suggesting specification for min. symbol rate of 2MS/s.
Some specs found here, all suggesting 2MS/s for min. symbol rate:
    Comtech DVBS2-6899
      http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
    TechniSat SkyStar HD2
      http://www.scaistar.com/skystar2/skystarhd2.htm
    Azurewave AD-SP400
      http://www.pulsat.com/products/AzureWave-AD%252dSP400-High-Definition-PC-Card.html
New patch:
This makes minimum symbol rate driver capabilities on par with some
accessible datasheet specifications*, and allows tuning on linux to
transponders that have symbol rate between 2000000-5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (2000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4
(*) Datasheet: http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
        Maximum Symbol Rate
        QPSK/LDPC/PCH: 20-30Mbps
        8PSK/LDPC/BCH: 10-30Mbps
        DVB: 2-45Mbps
             ^--------- min. symbol rate

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: fix inversion enum values to match usage with CFR
Reinhard Nißl [Sun, 2 Jun 2013 17:52:43 +0000 (14:52 -0300)]
[media] stb0899: fix inversion enum values to match usage with CFR

Throughout the zig-zag-implementations, inversion is taken into
account when reading and writing the CFR register, which contains
the derotator frequency. As swapping IQ signals changes the sign
of that register for example, the idea is to compensate that sign
change by multiplying the register value with the inversion enum
value.
The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON
don't work in the case IQ_SWAP_OFF, due to the multiplication by
zero (I've only found a single device which actually uses
IQ_SWAP_OFF in it's config).
I've changed the enum values to +1 and -1 to accommodate to the
intended usage.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: enable auto inversion handling unconditionally
Reinhard Nißl [Sun, 2 Jun 2013 17:52:02 +0000 (14:52 -0300)]
[media] stb0899: enable auto inversion handling unconditionally

It seems that current inversion handling addresses only the signal
routing on the PCB, i. e. IQ signals are either swapped or not.
But when the device is operated in a Satellite Channel Router (SCR)
environment, an additional inversion is required due to the way how
the SCR works. Therefore it makes sense to me to always enable auto
inversion handling and drop the enum value IQ_SWAP_AUTO.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 1000000
Zoran Turalija [Sun, 2 Jun 2013 17:40:51 +0000 (14:40 -0300)]
[media] stb0899: allow minimum symbol rate of 1000000

This makes minimum symbol rate driver capabilities on par with
windows driver, and allows tuning on linux to transponders that
have symbol rate below 5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (1000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign extend raw CRL_FREQ value
Reinhard Nißl [Sun, 2 Jun 2013 17:37:06 +0000 (14:37 -0300)]
[media] stb0899: sign extend raw CRL_FREQ value

Contrary to the chip's specs, the register's value is signed, so we
need to sign extend the value before using it in calculations like
when determining the offset frequency.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dma-buf: Cocci spatch "ptr_ret.spatch"
Thomas Meyer [Sat, 1 Jun 2013 08:53:10 +0000 (05:53 -0300)]
[media] dma-buf: Cocci spatch "ptr_ret.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] r820t: do not double-free fe->tuner_priv in r820t_release()
Gianluca Gennari [Sun, 2 Jun 2013 17:26:15 +0000 (14:26 -0300)]
[media] r820t: do not double-free fe->tuner_priv in r820t_release()

fe->tuner_priv is already freed by hybrid_tuner_release_state().

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dib8000: Fix dib8000_set_frontend() never setting ret
Geert Uytterhoeven [Sun, 2 Jun 2013 16:52:17 +0000 (13:52 -0300)]
[media] dib8000: Fix dib8000_set_frontend() never setting ret

drivers/media/dvb-frontends/dib8000.c: In function ‘dib8000_set_frontend’:
drivers/media/dvb-frontends/dib8000.c:3556: warning: ‘ret’ is used uninitialized in this function
Remove the variable and return zero instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: Fix open/close race condition
Laurent Pinchart [Fri, 26 Apr 2013 01:28:51 +0000 (22:28 -0300)]
[media] uvcvideo: Fix open/close race condition

Maintaining the users count using an atomic variable makes sure that
access to the counter won't be racy, but doesn't serialize access to the
operations protected by the counter. This creates a race condition that
could result in the status URB being submitted multiple times.
Use a mutex to protect the users count and serialize access to the
status start and stop operations.

Reported-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam
Joseph Salisbury [Wed, 15 May 2013 20:38:48 +0000 (17:38 -0300)]
[media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam

BugLink: http://bugs.launchpad.net/bugs/1180409
OminiVision webcam 0x05a9:0x2643 needs the same UVC_QUIRK_PROBE_DEF
as other OmniVision models to work properly.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam
Kamal Mostafa [Mon, 15 Apr 2013 19:01:51 +0000 (16:01 -0300)]
[media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam

BugLink: https://bugs.launchpad.net/bugs/1168430
OminiVision webcam 0x05a9:0x264a (in Dell Studio Hybrid 140g) needs the
same UVC_QUIRK_PROBE_DEF as other OmniVision model to be recognized
consistently.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: do not call v4l2_m2m_job_finish from .job_abort
Philipp Zabel [Thu, 23 May 2013 13:43:01 +0000 (10:43 -0300)]
[media] coda: do not call v4l2_m2m_job_finish from .job_abort

If we just declare the job finished here while the CODA is still
running, the call to v4l2_m2m_ctx_release in coda_release, which
is supposed to wait for a running job to finish, will return
immediately and free memory that the CODA is still using.
Just set the 'aborting' flag and let coda_irq_handler deal with it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: replace completion with mutex
Philipp Zabel [Thu, 23 May 2013 13:43:00 +0000 (10:43 -0300)]
[media] coda: replace completion with mutex

Not only do we need to wait for job completion when we want to
call a command on the CODA in start/stop_streaming, we also need
to make sure that a new job doesn't start before the command
finished.
Use a mutex to lock the coda command handling. On timeout, the
device_run job must be marked as finished and the mutex released,
as otherwise coda_release will block.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: add coda_encode_header helper function
Philipp Zabel [Thu, 23 May 2013 13:42:59 +0000 (10:42 -0300)]
[media] coda: add coda_encode_header helper function

In preparation for CODA7541 and CODA960 multi-stream support and for
replacement of the completion with a mutex lock, consolidate the
header encoding in a helper function.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: per-product list of codecs instead of list of formats
Philipp Zabel [Thu, 23 May 2013 13:42:58 +0000 (10:42 -0300)]
[media] coda: per-product list of codecs instead of list of formats

This patch adds a list of supported codecs per device type which is used to
determine the allowed pixel formats and maximum frame sizes depending on the
possible codecs. It allows frame sizes larger than 720 x 576 on CODA7 and adds
support for the YVU420 (planar YUV 4:2:0 with switched Cb and Cr) format.
Other uncompressed formats that could be added in the future are the chroma
interleaved NV12 and NV21 formats and the multiplanar variants YUV420M,
YVU420M, NV12M, and NV21M.
Further, rawstreamon is renamed to streamon_out and compstreamon is renamed
to streamon_cap in preparation for decoding support. The maximum encoded
frame buffer size is increased to 1 MiB.
Instead of tracking inst_type and codec across S_FMT calls, set the codec
and inst_type in start_streaming.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: simplify parameter buffer setup code
Philipp Zabel [Thu, 23 May 2013 13:42:57 +0000 (10:42 -0300)]
[media] coda: simplify parameter buffer setup code

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: clear registers in coda_hw_init
Philipp Zabel [Thu, 23 May 2013 13:42:56 +0000 (10:42 -0300)]
[media] coda: clear registers in coda_hw_init

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: stop setting bytesused in buf_prepare
Philipp Zabel [Thu, 23 May 2013 13:42:55 +0000 (10:42 -0300)]
[media] coda: stop setting bytesused in buf_prepare

The application must have filled the bytesused field,
don't overwrite it here.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: frame stride must be a multiple of 8
Philipp Zabel [Thu, 23 May 2013 13:42:54 +0000 (10:42 -0300)]
[media] coda: frame stride must be a multiple of 8

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: fix ENC_SEQ_OPTION for CODA7
Philipp Zabel [Thu, 23 May 2013 13:42:53 +0000 (10:42 -0300)]
[media] coda: fix ENC_SEQ_OPTION for CODA7

GAMMA_OFFSET is different between CodaDx6 and CODA7.
Also, this is a bitfield.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: pci: remove duplicate checks for EPERM
Lad, Prabhakar [Tue, 14 May 2013 04:45:17 +0000 (01:45 -0300)]
[media] media: pci: remove duplicate checks for EPERM

This patch removes check for EPERM in dbg_g/s_register and
vidioc_g/s_register as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:16 +0000 (01:45 -0300)]
[media] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register

This patch removes check for EPERM in vidioc_g/s_register
as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:15 +0000 (01:45 -0300)]
[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register
as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:14 +0000 (01:45 -0300)]
[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register of subdevice
drivers as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: do not use v4l2_dev in coda_timeout
Philipp Zabel [Tue, 21 May 2013 13:32:42 +0000 (10:32 -0300)]
[media] coda: do not use v4l2_dev in coda_timeout

The timeout delayed work might be scheduled even after the v4l2 device is
released.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: fix error return value if v4l2_m2m_ctx_init fails
Philipp Zabel [Tue, 21 May 2013 13:31:25 +0000 (10:31 -0300)]
[media] coda: fix error return value if v4l2_m2m_ctx_init fails

Use ret from the outer scope, instead of redefining it in the
conditional clause. That way the error value reaches the end of
the function as intended.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: set umask 0644 on debug module param
Philipp Zabel [Tue, 21 May 2013 07:24:16 +0000 (04:24 -0300)]
[media] coda: set umask 0644 on debug module param

Otherwise module/coda/parameters/coda_debug won't show up in sysfs.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: enable dmabuf support
Philipp Zabel [Thu, 23 May 2013 10:06:30 +0000 (07:06 -0300)]
[media] coda: enable dmabuf support

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: use devm_ioremap_resource
Philipp Zabel [Tue, 21 May 2013 07:19:27 +0000 (04:19 -0300)]
[media] coda: use devm_ioremap_resource

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: v4l2-compliance fix: add bus_info prefix 'platform'
Philipp Zabel [Tue, 21 May 2013 07:18:22 +0000 (04:18 -0300)]
[media] coda: v4l2-compliance fix: add bus_info prefix 'platform'

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc: gpio-ir-recv: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:08 +0000 (05:24 -0300)]
[media] rc: gpio-ir-recv: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] timblogiw: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:07 +0000 (05:24 -0300)]
[media] timblogiw: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>