platform/kernel/linux-starfive.git
10 years ago[media] media: Use strlcpy instead of custom code
Laurent Pinchart [Thu, 17 Jul 2014 11:52:08 +0000 (08:52 -0300)]
[media] media: Use strlcpy instead of custom code

Replace strncpy + manually setting the terminating '\0' with an strlcpy
call.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: usb: uvc: add a quirk for Dell XPS M1330 webcam
Paul Fertser [Sun, 8 Jun 2014 15:16:48 +0000 (12:16 -0300)]
[media] media: usb: uvc: add a quirk for Dell XPS M1330 webcam

As reported on [1], this device needs this quirk to be able to
reliably initialise the webcam.

[1] http://ubuntuforums.org/showthread.php?t=2145996

Cc: stable@vger.kernel.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] uvcvideo: Work around buggy Logitech C920 firmware
William Manley [Thu, 13 Mar 2014 12:38:48 +0000 (09:38 -0300)]
[media] uvcvideo: Work around buggy Logitech C920 firmware

The uvcvideo webcam driver exposes the v4l2 control "Exposure (Absolute)"
which allows the user to control the exposure time of the webcam,
essentially controlling the brightness of the received image.  By default
the webcam automatically adjusts the exposure time automatically but the
if you set the control "Exposure, Auto"="Manual Mode" the user can fix
the exposure time.

Unfortunately it seems that the Logitech C920 has a firmware bug where
it will forget that it's in manual mode temporarily during initialisation.
This means that the camera doesn't respect the exposure time that the user
requested if they request it before starting to stream video.  They end up
with a video stream which is either too bright or too dark and must reset
the controls after video starts streaming.

This patch introduces the quirk UVC_QUIRK_RESTORE_CTRLS_ON_INIT which
causes the cached controls to be re-uploaded to the camera immediately
after initialising the camera.  This quirk is applied to the C920 to work
around this camera bug.

Signed-off-by: William Manley <will@williammanley.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: uvcvideo: Add support for pan/tilt speed controls
Vincent Palatin [Thu, 4 Sep 2014 00:47:48 +0000 (21:47 -0300)]
[media] v4l: uvcvideo: Add support for pan/tilt speed controls

Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC
CT_PANTILT_RELATIVE_CONTROL terminal control request.

Tested by plugging a Logitech ConferenceCam C3000e USB camera
and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl.
Verified that it can pan and tilt at the same time in both directions.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: Add camera pan/tilt speed controls
Vincent Palatin [Wed, 3 Sep 2014 19:38:39 +0000 (16:38 -0300)]
[media] v4l: Add camera pan/tilt speed controls

The V4L2_CID_PAN_SPEED and V4L2_CID_TILT_SPEED controls allow to move the
camera by setting its rotation speed around its axis.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: remove unneeded dependency ARCH_OMAP3
Prabhakar Lad [Sat, 16 Aug 2014 20:33:18 +0000 (17:33 -0300)]
[media] media: davinci: remove unneeded dependency ARCH_OMAP3

this patch removes unneeded dependency of ARCH_OMAP3
on VIDEO_DM6446_CCDC.
Also the top level platform Makefile descended into
davinci/ without any dependency so just drop the
dependency obj-y, as obj-$(CONFIG_ARCH_DAVINCI)
already exists.

Reported-by: Andreas Ruprecht <rupran@einserver.de>
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@osg.samsung.com>
10 years ago[media] media: davinci: vpif_capture: fix the check on suspend/resume callbacks
Prabhakar Lad [Sat, 6 Sep 2014 15:26:51 +0000 (12:26 -0300)]
[media] media: davinci: vpif_capture: fix the check on suspend/resume callbacks

It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

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@osg.samsung.com>
10 years ago[media] media: davinci: vpif_display: fix the check on suspend/resume callbacks
Prabhakar Lad [Sat, 6 Sep 2014 15:26:50 +0000 (12:26 -0300)]
[media] media: davinci: vpif_display: fix the check on suspend/resume callbacks

It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

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@osg.samsung.com>
10 years ago[media] media: videobuf2-core.h: add a helper to get status of start_streaming()
Prabhakar Lad [Sat, 6 Sep 2014 15:26:49 +0000 (12:26 -0300)]
[media] media: videobuf2-core.h: add a helper to get status of start_streaming()

this patch adds a helper to get the status if start_streaming()
was called successfully.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Pawel Osciak <pawel@osciak.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVE
Prabhakar Lad [Sat, 6 Sep 2014 15:26:48 +0000 (12:26 -0300)]
[media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVE

this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 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@osg.samsung.com>
10 years ago[media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVE
Prabhakar Lad [Sat, 6 Sep 2014 15:26:47 +0000 (12:26 -0300)]
[media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVE

this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 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@osg.samsung.com>
10 years ago[media] videobuf: Allow reqbufs(0) to free current buffers
Hans de Goede [Sun, 31 Aug 2014 10:19:21 +0000 (07:19 -0300)]
[media] videobuf: Allow reqbufs(0) to free current buffers

All the infrastructure for this is already there, and despite our desires for
the old videobuf code to go away, it is currently still in use in 18 drivers.

Allowing reqbufs(0) makes these drivers behave consistent with modern drivers,
making live easier for userspace, see e.g. :
https://bugzilla.gnome.org/show_bug.cgi?id=735660

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] videobuf2-core: take mmap_sem before calling __qbuf_userptr
Hans Verkuil [Mon, 25 Aug 2014 11:57:59 +0000 (08:57 -0300)]
[media] videobuf2-core: take mmap_sem before calling __qbuf_userptr

(Changes since v2: dropped local variable as suggested by Laurent)

Commit f035eb4e976ef5a059e30bc91cfd310ff030a7d3 (videobuf2: fix lockdep warning)
unfortunately removed the mmap_sem lock that is needed around the call to
__qbuf_userptr. Amazingly nobody noticed this (especially me as the author)
until Jan Kara pointed this out to me.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jan Kara <jack@suse.cz>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] drivers: media: i2c: adv7343_regs.h: Fix typo in #ifndef
Rasmus Villemoes [Fri, 22 Aug 2014 16:45:17 +0000 (13:45 -0300)]
[media] drivers: media: i2c: adv7343_regs.h: Fix typo in #ifndef

Test for definedness of the macro which is actually defined, and which
matches the name of the file.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] drivers: media: b2c2: flexcop.h: Fix typo in include guard
Rasmus Villemoes [Fri, 22 Aug 2014 16:41:56 +0000 (13:41 -0300)]
[media] drivers: media: b2c2: flexcop.h: Fix typo in include guard

Three trailing underscores is one too many.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tvp7002: Don't update device->streaming if write to register fails
Axel Lin [Sat, 16 Aug 2014 06:57:30 +0000 (03:57 -0300)]
[media] tvp7002: Don't update device->streaming if write to register fails

This ensures device->streaming has correct status.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] radio-si470x-usb: use USB API functions rather than constants
Himangi Saraogi [Fri, 15 Aug 2014 16:21:15 +0000 (13:21 -0300)]
[media] radio-si470x-usb: use USB API functions rather than constants

This patch introduces the use of the function usb_endpoint_is_int_in.

The Coccinelle semantic patch that makes these changes is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_INT\|3\))
+ usb_endpoint_xfer_int(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd))
+ usb_endpoint_is_int_in(epd)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: convert to RegMap API
Antti Palosaari [Mon, 4 Aug 2014 04:00:46 +0000 (01:00 -0300)]
[media] tda18212: convert to RegMap API

Use RegMap API to handle all the boring I2C register access
boilerplate stuff.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: rename state from 'priv' to 'dev'
Antti Palosaari [Mon, 4 Aug 2014 02:40:23 +0000 (23:40 -0300)]
[media] tda18212: rename state from 'priv' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel codebase and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: clean logging
Antti Palosaari [Mon, 4 Aug 2014 02:26:27 +0000 (23:26 -0300)]
[media] tda18212: clean logging

There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: convert driver to I2C binding
Antti Palosaari [Mon, 4 Aug 2014 02:05:31 +0000 (23:05 -0300)]
[media] tda18212: convert driver to I2C binding

Convert driver from DVB proprietary model to common I2C model.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] em28xx: convert tda18212 tuner to I2C client
Antti Palosaari [Mon, 4 Aug 2014 01:35:03 +0000 (22:35 -0300)]
[media] em28xx: convert tda18212 tuner to I2C client

Used tda18212 tuner is implemented as a I2C driver. Use em28xx
tuner I2C client for tda18212 driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] anysee: convert tda18212 tuner to I2C client
Antti Palosaari [Mon, 4 Aug 2014 00:47:10 +0000 (21:47 -0300)]
[media] anysee: convert tda18212 tuner to I2C client

Used tda18212 tuner is implemented as I2C driver. Implement I2C
client to anysee and use it for tda18212.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: prepare for I2C client conversion
Antti Palosaari [Mon, 4 Aug 2014 01:43:26 +0000 (22:43 -0300)]
[media] tda18212: prepare for I2C client conversion

We need carry pointer to frontend via config struct
(I2C platform_data ptr) when I2C model is used. Add that pointer
first in order to keep build unbreakable during conversion.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: init DVBv5 statistics
Antti Palosaari [Sat, 6 Sep 2014 14:24:14 +0000 (11:24 -0300)]
[media] af9033: init DVBv5 statistics

We need to init supported stats here in order signal app which
stats are supported.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: remove I2C client differently
Antti Palosaari [Thu, 4 Sep 2014 21:35:59 +0000 (18:35 -0300)]
[media] af9035: remove I2C client differently

It crash kernel when device was removed while it was streaming.
That is because we removed driver and frontend thread was still
running. Use new callback which allows I2C driver removal just
after frontend is unregistered.

V2: fixed by reported by Daniel

Reported-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] dvb-usb-v2: add tuner_detach callback
Antti Palosaari [Thu, 4 Sep 2014 21:31:40 +0000 (18:31 -0300)]
[media] dvb-usb-v2: add tuner_detach callback

Add tuner_detach callback in order to allow custom detach. It is
needed when tuner driver is implemented I2C client or some other
kernel bus, but not proprietary dvb_attach / dvb_detach.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] dvb-usb-v2: add frontend_detach callback
Antti Palosaari [Thu, 4 Sep 2014 20:04:44 +0000 (17:04 -0300)]
[media] dvb-usb-v2: add frontend_detach callback

Add frontend_detach callback in order to allow custom detach. It is
needed when demod driver is implemented I2C client or some other
kernel bus, but not proprietary dvb_attach / dvb_detach.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: remove all DVBv3 stat calculation logic
Antti Palosaari [Thu, 4 Sep 2014 02:30:44 +0000 (23:30 -0300)]
[media] af9033: remove all DVBv3 stat calculation logic

Statistics are now calculated for DVBv5 and those DVBv5 values are
returned for legacy DVBv3 calls also. So we could remove all old
statistics calculation logic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 BER to DVBv5 BER
Antti Palosaari [Thu, 4 Sep 2014 02:22:53 +0000 (23:22 -0300)]
[media] af9033: wrap DVBv3 BER to DVBv5 BER

DVBv5 BER is calculated anyway, so just return it for legacy
read_ber() API too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 UCB to DVBv5 UCB stats
Antti Palosaari [Thu, 4 Sep 2014 02:07:39 +0000 (23:07 -0300)]
[media] af9033: wrap DVBv3 UCB to DVBv5 UCB stats

Remove 'duplicate' DVBv3 read UCB implementation and return value,
calculated already for DVBv5 statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 post-Viterbi BER
Antti Palosaari [Tue, 2 Sep 2014 11:29:46 +0000 (08:29 -0300)]
[media] af9033: implement DVBv5 post-Viterbi BER

Implement following DTV API commands:
DTV_STAT_POST_ERROR_BIT_COUNT
DTV_STAT_POST_TOTAL_BIT_COUNT

These will provide post-Viterbi bit error rate reporting.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 stat block counters
Antti Palosaari [Tue, 2 Sep 2014 11:01:10 +0000 (08:01 -0300)]
[media] af9033: implement DVBv5 stat block counters

Implement following API commands:
DTV_STAT_ERROR_BLOCK_COUNT
DTV_STAT_TOTAL_BLOCK_COUNT

These returns total and uncorrected error packets from outer FEC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 read SNR to DVBv5 CNR
Antti Palosaari [Tue, 2 Sep 2014 08:03:21 +0000 (05:03 -0300)]
[media] af9033: wrap DVBv3 read SNR to DVBv5 CNR

Remove 'duplicate' DVBv3 read SNR implementation and return value,
calculated already by DVBv5 CNR, from the cache.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 statistics for CNR
Antti Palosaari [Tue, 2 Sep 2014 07:24:41 +0000 (04:24 -0300)]
[media] af9033: implement DVBv5 statistics for CNR

Return CNR via DVBv5 statistics API.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 statistics for signal strength
Antti Palosaari [Tue, 2 Sep 2014 06:55:21 +0000 (03:55 -0300)]
[media] af9033: implement DVBv5 statistics for signal strength

Let the demod firmware estimate RF signal strength and return it
to the app as a dBm. To handle that, use thread which reads signal
strengths from firmware in 2 sec intervals when device is active.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] MAINTAINERS: IT913X driver filenames
Antti Palosaari [Mon, 1 Sep 2014 22:44:59 +0000 (19:44 -0300)]
[media] MAINTAINERS: IT913X driver filenames

I removed tuner_ prefix from the driver file names. Update
maintainers entry according to that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: replace PCTV device model numbers with name
Antti Palosaari [Mon, 1 Sep 2014 03:38:01 +0000 (00:38 -0300)]
[media] af9035: replace PCTV device model numbers with name

Use device names for recent PCTV Systems devices:
PCTV AndroiDTV (78e)
PCTV microStick (79e)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: remove I2C addr from config
Antti Palosaari [Mon, 1 Sep 2014 01:57:26 +0000 (22:57 -0300)]
[media] af9033: remove I2C addr from config

I2C driver address is passed as a i2c_new_device() parameter when
device is created. Thus no need to keep it in config struct.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: few small I2C master xfer changes
Antti Palosaari [Mon, 1 Sep 2014 01:17:12 +0000 (22:17 -0300)]
[media] af9035: few small I2C master xfer changes

Biggest problem of that function is complexity. Try reduce complexity:

* define macros to detect all 3 supported xfers
* remove duplicate message maximum size checks

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: clean up logging
Antti Palosaari [Mon, 1 Sep 2014 00:08:09 +0000 (21:08 -0300)]
[media] af9033: clean up logging

It uses I2C client so logging system prints module name
automatically. Function name is also added automatically, if it is
requested from dynamic debug by setting proper format.
Because of that, we could simplify logging in our driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: convert to I2C client
Antti Palosaari [Sun, 31 Aug 2014 23:57:05 +0000 (20:57 -0300)]
[media] af9033: convert to I2C client

Convert driver to kernel I2C model.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: rename 'state' to 'dev'
Antti Palosaari [Sun, 31 Aug 2014 05:18:34 +0000 (02:18 -0300)]
[media] af9033: rename 'state' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel codebase and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: fix firmware version logging
Antti Palosaari [Sun, 31 Aug 2014 05:03:05 +0000 (02:03 -0300)]
[media] af9033: fix firmware version logging

AF9030 and IT9130 series has different memory location for firmware
version. Choose correct location according to chip type.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: replace udelay polling with jiffies
Antti Palosaari [Sun, 31 Aug 2014 03:29:33 +0000 (00:29 -0300)]
[media] it913x: replace udelay polling with jiffies

udelay based I/O polling loop is a bad idea, especially system
performance point of view. Kernel jiffies are preferred solution
for such situations. Use it instead.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: refactor code largely
Antti Palosaari [Sun, 31 Aug 2014 02:52:48 +0000 (23:52 -0300)]
[media] it913x: refactor code largely

Refactor code largely.

Try to keep order of register read/write same as windows driver does as
it makes comparing sniffs easier.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: get rid of script loader and and private header file
Antti Palosaari [Thu, 28 Aug 2014 05:07:08 +0000 (02:07 -0300)]
[media] it913x: get rid of script loader and and private header file

Used script loader is quite useless and hides register numbers
making code hard to understand. Get rid of it and use standard
RegMap register write functions directly.

it913x_priv.h file leaves empty after that change and is also
removed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: remove dead code
Antti Palosaari [Thu, 28 Aug 2014 04:45:52 +0000 (01:45 -0300)]
[media] it913x: remove dead code

Remove unused tuner set template.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: re-implement sleep
Antti Palosaari [Wed, 27 Aug 2014 06:59:27 +0000 (03:59 -0300)]
[media] it913x: re-implement sleep

Re-implement sleep. Based USB sniffs taken from the latest Hauppauge
windows driver version 07/10/2014, 14.6.23.32191.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: convert to RegMap API
Antti Palosaari [Wed, 27 Aug 2014 00:45:33 +0000 (21:45 -0300)]
[media] it913x: convert to RegMap API

Use RegMap API to cover I2C register access routines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: rename 'state' to 'dev'
Antti Palosaari [Tue, 26 Aug 2014 23:11:08 +0000 (20:11 -0300)]
[media] it913x: rename 'state' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: change reg read/write routines more common
Antti Palosaari [Tue, 26 Aug 2014 21:56:46 +0000 (18:56 -0300)]
[media] it913x: change reg read/write routines more common

Change register write and read routines to similar which are
typically used. We have to add processor core as a part of register
address in order to simplify register access. Chip has two cores,
called link and ofdm. As for now, use address bit 24 to address used
core. Bits 15:0 are register address in given core.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: convert to I2C driver
Antti Palosaari [Tue, 26 Aug 2014 20:14:16 +0000 (17:14 -0300)]
[media] it913x: convert to I2C driver

Change the it913x driver to use the I2C high lever tuner
binding model. As af9035 depends on it, add a code there
to do the binding.

[mchehab@osg.samsung.com: Merge 3 patches into one, because
 we don't want to break bisect due to the conversion]
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: rename tuner_it913x => it913x
Antti Palosaari [Tue, 26 Aug 2014 03:08:16 +0000 (00:08 -0300)]
[media] it913x: rename tuner_it913x => it913x

Remove tuner_ prefix from module name and file names. Prefix was
added due to file name conflict on media out-tree build system.
Demodulator having same name does not exists anymore. So lets
remove dumb prefix.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 18:02:14 +0000 (15:02 -0300)]
[media] it913x: make checkpatch.pl happy

Correct issues reported by checkpatch.pl

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 17:59:53 +0000 (14:59 -0300)]
[media] af9033: make checkpatch.pl happy

Correct issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 17:49:46 +0000 (14:49 -0300)]
[media] af9035: make checkpatch.pl happy

Correct issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: remove AVerMedia eeprom override
Antti Palosaari [Sat, 9 Aug 2014 17:16:29 +0000 (14:16 -0300)]
[media] af9035: remove AVerMedia eeprom override

Reverts commit 3ab25123373270152a9fae98e3c48ef1b2a878c0
[media] af9035: override tuner for AVerMedia A835B devices

Original commit itself is correct, but it was replaced by more
general solution (commit 1cbbf90d0406913ad4b44194b07f4f41bde84e54).
This old solution was committed by a accident and is not needed
anymore.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: fix IT9135 AX sleep
Antti Palosaari [Sat, 9 Aug 2014 16:39:16 +0000 (13:39 -0300)]
[media] it913x: fix IT9135 AX sleep

Old IT9135 AX needs a little bit different register settings for
sleep than newer IT9135 BX. This has been broken always, as power
management of the whole driver, but it started to be problem as I
fixed clock. Earlier clock was disabled very first on sleep and
rest of the commands were skipped by the chip as no clock, leaving
tuner full power state. When I fixed clocks these PM bugs started
raising out as I/O errors.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: avoid division by zero on error case
Antti Palosaari [Sat, 9 Aug 2014 15:35:00 +0000 (12:35 -0300)]
[media] it913x: avoid division by zero on error case

Error on init leaves some internal divisor zero, which causes oops
later. Fix it by populating divisors even it fails.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: fix tuner sleep power leak
Antti Palosaari [Sat, 9 Aug 2014 03:15:05 +0000 (00:15 -0300)]
[media] it913x: fix tuner sleep power leak

IT913x tuner driver disables own clock, provided by demod core, as
very a first operation when tuner is put on *sleep*. That likely
causes failure of all the rest commands on sleep sequence, which
leads situation where tuner is not actually on sleep, but consuming
a lot of power.

I measured 102mA current consumption from the USB before change
and after change it was only 32mA. Used device was single tuner
IT9135 BX.

Second reason to remove that register from tuner driver is reason
it is simply on wrong driver (demod vs. tuner), breaking the
principle of correct driver.

Clock is now provided more correctly af9033 demod driver as a
config option.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: enable AF9033 demod clock source for IT9135
Antti Palosaari [Sat, 9 Aug 2014 03:08:57 +0000 (00:08 -0300)]
[media] af9035: enable AF9033 demod clock source for IT9135

Integrated RF tuner of IT9135 is connected to demod clock source
named dyn0_clk. Enable that clock source in order to provide stable
clock early enough.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: provide dyn0_clk clock source
Antti Palosaari [Sat, 9 Aug 2014 02:56:49 +0000 (23:56 -0300)]
[media] af9033: provide dyn0_clk clock source

AF903x/IT913x demod provides clock source(s). It seems that this
clock source is used for integrated RF tuner of IT913x. It is
enabled by default, but firmware disables it automatically when
suspend is requested (suspend_flag (0x004c) + trigger_ofsm
(0x0000)). Automatic disable behavior seems to be similar for both
AF903x and IT913x I tested, though there is no likely any real
clock user in a case of AF903x.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] get_dvb_firmware: Update firmware of ITEtech IT9135
Bimow Chen [Fri, 1 Aug 2014 09:19:58 +0000 (06:19 -0300)]
[media] get_dvb_firmware: Update firmware of ITEtech IT9135

IT9135 firmware update.

Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] coda: coda-bit: Include "<linux/slab.h>"
Fabio Estevam [Fri, 19 Sep 2014 11:32:30 +0000 (08:32 -0300)]
[media] coda: coda-bit: Include "<linux/slab.h>"

coda-bit uses kmalloc/kfree functions, so the slab header needs to be included
in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration]
drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: add support for slave chip version
Antti Palosaari [Thu, 31 Jul 2014 19:35:56 +0000 (16:35 -0300)]
[media] tda18212: add support for slave chip version

There is 2 different versions of that chip available, master and
slave. Slave is used only on dual tuner devices with master tuner.
Laser printing top of chip is 18212/M or 18212/S according to chip
version.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2168: avoid firmware loading if it has been loaded previously
Olli Salonen [Mon, 25 Aug 2014 18:07:04 +0000 (15:07 -0300)]
[media] si2168: avoid firmware loading if it has been loaded previously

Add a variable to keep track if firmware is loaded or not and skip parts of the
initialization if fw is already loaded. Resume from sleep with a different
command compared to initial power up and run command 85 after resume command.
This behaviour is observed when using manufacturer provided binary-only si2168
driver for TechnoTrend CT2-4400.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2157: avoid firmware loading if it has been loaded previously
Olli Salonen [Mon, 25 Aug 2014 18:07:03 +0000 (15:07 -0300)]
[media] si2157: avoid firmware loading if it has been loaded previously

Add a variable into state to keep track if firmware has been loaded or not.
Skip firmware loading in case it is already loaded (resume from sleep).

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2157: change command for sleep
Olli Salonen [Mon, 25 Aug 2014 18:07:02 +0000 (15:07 -0300)]
[media] si2157: change command for sleep

Instead of sending command 13 to the tuner, send command 16 when sleeping. This
behaviour is observed when using manufacturer provided binary-only Linux driver
for TechnoTrend CT2-4400 (Windows driver does not do power management).

The issue with command 13 is that firmware loading is necessary after that.
This is not an issue with tuners that do not require firmware, but starting
streaming after sleep on an Si2158 takes noticeable time as firmware is
loaded on resume.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:57:54 +0000 (23:57 -0300)]
[media] rtl2832_sdr: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: enhance sample rate debug calculation precision
Antti Palosaari [Mon, 25 Aug 2014 02:44:13 +0000 (23:44 -0300)]
[media] rtl2832_sdr: enhance sample rate debug calculation precision

Sample rate calculation gives a little bit too large results because
in real life there was around one milliseconds (~one usb packet) too
much data for given time. Calculate time more accurate in order to
provide better results.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: remove unneeded spinlock irq flags initialization
Antti Palosaari [Mon, 25 Aug 2014 02:37:57 +0000 (23:37 -0300)]
[media] rtl2832_sdr: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is macro which stores value to 'flags'

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] e4000: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:35:48 +0000 (23:35 -0300)]
[media] e4000: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi2500: remove unneeded spinlock irq flags initialization
Antti Palosaari [Mon, 25 Aug 2014 02:26:23 +0000 (23:26 -0300)]
[media] msi2500: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is macro which stores value to 'flags'.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi001: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:12:13 +0000 (23:12 -0300)]
[media] msi001: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi2500: logging changes
Antti Palosaari [Mon, 25 Aug 2014 01:54:06 +0000 (22:54 -0300)]
[media] msi2500: logging changes

Kernel logging system needs pointer to usb interface device in
order to print names and bus numbers properly. There was wrong
device pointer given and log printings wasn't correct.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: enhance sample rate debug calculation precision
Antti Palosaari [Sun, 24 Aug 2014 23:11:27 +0000 (20:11 -0300)]
[media] airspy: enhance sample rate debug calculation precision

Sample rate calculation gives a little bit too large results because
in real life there was around one milliseconds (~one usb packet) too
much data for given time. Calculate time more accurate in order to
provide better results.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: remove unneeded spinlock irq flags initialization
Antti Palosaari [Sun, 24 Aug 2014 22:27:43 +0000 (19:27 -0300)]
[media] airspy: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is a macro which stores value to 'flags'.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: logging changes
Antti Palosaari [Sun, 24 Aug 2014 22:14:32 +0000 (19:14 -0300)]
[media] airspy: logging changes

Kernel logging system needs pointer to usb interface device in
order to print names and bus numbers properly. There was wrong
device pointer given and log printings wasn't correct.

Remove some debug logging from v4l2 ioctl functions. v4l2 core debug
prints almost same information when enabled.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: coding style issues
Antti Palosaari [Sun, 24 Aug 2014 21:31:52 +0000 (18:31 -0300)]
[media] airspy: coding style issues

Fix issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: fix error handling on start streaming
Antti Palosaari [Mon, 25 Aug 2014 00:59:36 +0000 (21:59 -0300)]
[media] airspy: fix error handling on start streaming

Free all reserved USB buffers and URBs on failure. Return all queued
buffers to vb2 with state queued on error case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years agoMerge remote-tracking branch 'linus/master' into patchwork
Mauro Carvalho Chehab [Sun, 21 Sep 2014 19:40:04 +0000 (16:40 -0300)]
Merge remote-tracking branch 'linus/master' into patchwork

There are some patches that depends on media-v3.16-rc6.
So, merge back from upstream before applying them.

* linus/master: (1123 commits)
  drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
  drm/bochs: add missing drm_connector_register call
  drm/cirrus: add missing drm_connector_register call
  staging: vt6655: buffer overflow in ioctl
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  [SCSI] fix for bidi use after free
  [SCSI] fix regression that accidentally disabled block-based tcq
  [SCSI] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page
  drm/nouveau/runpm: fix module unload
  drm/radeon/px: fix module unload
  vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
  drm/radeon: don't reset dma on r6xx-evergreen init
  drm/radeon: don't reset sdma on CIK init
  drm/radeon: don't reset dma on NI/SI init
  drm/radeon/dpm: fix resume on mullins
  drm/radeon: Disable HDP flush before every CS again for < r600
  ...

10 years agoMerge tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 21 Sep 2014 17:56:50 +0000 (10:56 -0700)]
Merge tag 'media-v3.17-rc6' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "some media bug fixes:
   - a Kconfig dependency issue
   - some fixes for af9033/it913x demod to be more reliable and address
     a performance regression
   - cx18: fix an oops on devices with tda8290 tuner
   - two new USB IDs for af9035
   - a couple fixes on smapp driver"

* tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] af9035: new IDs: add support for PCTV 78e and PCTV 79e
  [media] af9033: feed clock to RF tuner
  [media] it913x: init tuner on attach
  [media] af9033: update IT9135 tuner inittabs
  [media] Kconfig: do not select SPI bus on sub-driver auto-select
  [media] cx18: fix kernel oops with tda8290 tuner
  [media] smiapp: Set sub-device owner
  [media] smiapp: Fix power count handling

10 years agoMerge tag 'staging-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 20 Sep 2014 17:43:37 +0000 (10:43 -0700)]
Merge tag 'staging-3.17-rc6' of git://git./linux/kernel/git/gregkh/staging

Pull staging / IIO fixes from Greg KH:
 "Here are some IIO and Staging driver fixes for 3.17-rc6.  They are all
  pretty simple, and resolve reported issues"

* tag 'staging-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: vt6655: buffer overflow in ioctl
  iio:magnetometer: bugfix magnetometers gain values
  iio: adc: at91: don't use the last converted data register
  iio: adc: xilinx-xadc: assign auxiliary channels address correctly
  iio: meter: ade7758: Fix indio_dev->trig assignment
  iio: inv_mpu6050: Fix indio_dev->trig assignment
  iio: gyro: itg3200: Fix indio_dev->trig assignment
  iio: st_sensors: Fix indio_dev->trig assignment
  iio: hid_sensor_hub: Fix indio_dev->trig assignment
  iio: adc: ad_sigma_delta: Fix indio_dev->trig assignment
  iio: accel: bma180: Fix indio_dev->trig assignment
  iio:trigger: modify return value for iio_trigger_get
  iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name

10 years agoMerge tag 'usb-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 20 Sep 2014 17:42:56 +0000 (10:42 -0700)]
Merge tag 'usb-3.17-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes / quirks from Greg KH:
 "Here are some USB and PHY fixes and quirks for 3.17-rc6.  Nothing
  major, just a few things that have been reported"

* tag 'usb-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  phy: spear1340-miphy: fix driver dependencies
  phy: spear1310-miphy: fix driver dependencies
  phy: miphy365x: Fix off-by-one error

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 20 Sep 2014 17:41:38 +0000 (10:41 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Here are the target pending fixes for v3.17-rc6.

  Included are Sagi's long overdue fixes related to iser-target
  shutdown, along with a couple of fixes from Sebastian related to ALUA
  Referrals changes that when in during the v3.14 time-frame.

  Also included are a few iscsi-target fixes, most recently of which
  where found during Joern's Coverity scanning of target code"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure
  iscsi-target: Fix memory corruption in iscsit_logout_post_handler_diffcid
  target: Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE
  target: Fix user data segment multiplier in spc_emulate_evpd_b3()
  iscsi-target: Ignore ICF_GOT_LAST_DATAOUT during Data-Out ITT lookup
  Target/iser: Fix initiator_depth and responder_resources
  Target/iser: Avoid calling rdma_disconnect twice
  Target/iser: Don't put isert_conn inside disconnected handler
  Target/iser: Get isert_conn reference once got to connected_handler

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 20 Sep 2014 17:10:14 +0000 (10:10 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "A bunch of radeon fixes for oops on module unload, and problems with
  resetting the dma engine, one nouveau fix for black boxes in rendering
  on my mbp retina, one sti fix, and a couple of intel fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
  drm/bochs: add missing drm_connector_register call
  drm/cirrus: add missing drm_connector_register call
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page
  drm/nouveau/runpm: fix module unload
  drm/radeon/px: fix module unload
  vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
  drm/radeon: don't reset dma on r6xx-evergreen init
  drm/radeon: don't reset sdma on CIK init
  drm/radeon: don't reset dma on NI/SI init
  drm/radeon/dpm: fix resume on mullins
  drm/radeon: Disable HDP flush before every CS again for < r600
  drm/radeon: delete unused PTE_* defines
  drm/i915: Add limited color range readout for HDMI/DP ports on g4x/vlv/chv
  drm: sti: do not iterate over the info frame array
  drm/i915: Fix SRC_COPY width on 830/845g

10 years agodrm/nouveau: ltc/gf100-: fix cbc issues on certain boards
Ben Skeggs [Sat, 20 Sep 2014 07:39:00 +0000 (17:39 +1000)]
drm/nouveau: ltc/gf100-: fix cbc issues on certain boards

A mismatch between FB and LTC's idea of how big a large page is causes
issues such as black "holes" in rendering to occur on some boards
(those where LTC is configured for 64KiB large pages) when compression
is used.

Confirmed to fix at least the GK107 MBP.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoMerge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Sat, 20 Sep 2014 07:23:37 +0000 (17:23 +1000)]
Merge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

single fix for regression on rs4xx/rs690/rs740
* 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page

10 years agodrm/bochs: add missing drm_connector_register call
Gerd Hoffmann [Fri, 19 Sep 2014 08:11:37 +0000 (10:11 +0200)]
drm/bochs: add missing drm_connector_register call

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/cirrus: add missing drm_connector_register call
Gerd Hoffmann [Fri, 19 Sep 2014 08:11:36 +0000 (10:11 +0200)]
drm/cirrus: add missing drm_connector_register call

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agostaging: vt6655: buffer overflow in ioctl
Dan Carpenter [Fri, 19 Sep 2014 10:43:11 +0000 (13:43 +0300)]
staging: vt6655: buffer overflow in ioctl

->u.generic_elem.len is a user controlled number between 0-255.  We
should limit it to avoid memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'iio-fixes-3.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Fri, 19 Sep 2014 22:29:39 +0000 (15:29 -0700)]
Merge tag 'iio-fixes-3.17a' of git://git./linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First round of IIO fixes for the 3.17 cycle.

* Fix an overwritten error return that can prevent deferred probing when
  using of_iio_channel_get_by_name
* A series that deals with an incorrect reference count when the default
  trigger is set within the main probe routine for a driver.  Can result
  in a double free if the trigger is changed.
* Fix a buglet with xilinx-xadc concerning setup of the address for an
  aux channel.
* At91 adc driver could sometimes get a touchscreen reading rather than
  the intended adc channel.  This is fixed by using the channel data register
  instead.
* Fix some ST magnetometer gain values that differ in production parts from
  the prerelease ones used for driver development.

10 years agoUSB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
Mark [Wed, 17 Sep 2014 18:15:43 +0000 (19:15 +0100)]
USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters

This patch adds quirks for Entrega Technologies (later Xircom PortGear) USB-
SCSI converters. They use Shuttle Technology EUSB-01/EUSB-S1 chips. The
US_FL_SCM_MULT_TARG quirk is needed to allow multiple devices on the SCSI
chain to be accessed. Without it only the (single) device with SCSI ID 0
can be used.

The standalone converter sold by Entrega had model number U1-SC25. Xircom
acquired Entrega and re-branded the product line PortGear. The PortGear USB
to SCSI Converter (model PGSCSI) is internally identical to the Entrega
product, but later models may use a different USB ID. The Entrega-branded
units have USB ID 1645:0007, as does my Xircom PGSCSI, but the Windows and
Macintosh drivers also support 085A:0028.

Entrega also sold the "Mac USB Dock", which provides two USB ports, a Mac
(8-pin mini-DIN) serial port and a SCSI port. It appears to the computer as
a four-port hub, USB-serial, and USB-SCSI converters. The USB-SCSI part may
have initially used the same ID as the standalone U1-SC25 (1645:0007), but
later production used 085A:0026.

My Xircom PortGear PGSCSI has bcdDevice=0x0100. Units with bcdDevice=0x0133
probably also exist.

This patch adds quirks for 1645:0007, 085A:0026 and 085A:0028. The Windows
driver INF file also mentions 085A:0032 "PortStation SCSI Module", but I
couldn't find any mention of that actually existing in the wild; perhaps it
was cancelled before release?

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
Mark [Tue, 16 Sep 2014 15:51:41 +0000 (16:51 +0100)]
USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter

Hi,

The Ariston Technologies iConnect 025 and iConnect 050 (also known as e.g.
iSCSI-50) are SCSI-USB converters which use Shuttle Technology/SCM
Microsystems chips. Only the connectors differ; both have the same USB ID.
The US_FL_SCM_MULT_TARG quirk is required to use SCSI devices with ID other
than 0.

I don't have one of these, but based on the other entries for Shuttle/
SCM-based converters this patch is very likely correct. I used 0x0000 and
0x9999 for bcdDeviceMin and bcdDeviceMax because I'm not sure which
bcdDevice value the products use.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
Mark [Tue, 16 Sep 2014 15:22:50 +0000 (16:22 +0100)]
USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter

The Adaptec USBConnect 2000 is another SCSI-USB converter which uses
Shuttle Technology/SCM Microsystems chips. The US_FL_SCM_MULT_TARG quirk is
required to use SCSI devices with ID other than 0.

I don't have a USBConnect 2000, but based on the other entries for Shuttle/
SCM-based converters this patch is very likely correct. I used 0x0000 and
0x9999 for bcdDeviceMin and bcdDeviceMax because I'm not sure which
bcdDevice value the product uses.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: EHCI: unlink QHs even after the controller has stopped
Alan Stern [Wed, 17 Sep 2014 15:23:54 +0000 (11:23 -0400)]
USB: EHCI: unlink QHs even after the controller has stopped

Old code in ehci-hcd tries to expedite disabling endpoints after the
controller has stopped, by destroying the endpoint's associated QH
without first unlinking the QH.  This was necessary back when the
driver wasn't so careful about keeping track of the controller's
state.

But now we are careful about it, and the driver knows that when the
controller isn't running, no unlinking delay is needed.  Furthermore,
skipping the unlink step will trigger a BUG() in qh_destroy() when the
preceding QH is released, because the link pointer will be non-NULL.

Removing the lines that skip the unlinking step and go directly to
QH_STATE_IDLE fixes the problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
Tested-by: Joe Lawrence <joe.lawrence@stratus.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'for_3.17-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux...
Greg Kroah-Hartman [Fri, 19 Sep 2014 21:58:20 +0000 (14:58 -0700)]
Merge tag 'for_3.17-rc' of git://git./linux/kernel/git/kishon/linux-phy into usb-linus

Kishon writes:

misc fixes in PHY drivers

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 19 Sep 2014 20:10:53 +0000 (13:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "I've got a revert to fix a regression with btrfs device registration,
  and Filipe has part two of his fsync fix from last week"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Revert "Btrfs: device_list_add() should not update list when mounted"
  Btrfs: set inode's logged_trans/last_log_commit after ranged fsync

10 years agoMerge tag 'nfs-for-3.17-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Fri, 19 Sep 2014 20:07:49 +0000 (13:07 -0700)]
Merge tag 'nfs-for-3.17-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client fixes from Trond Myklebust:
 "Highligts:
   - fix an Oops in nfs4_open_and_get_state
   - fix an Oops in the nfs4_state_manager
   - fix another bug in the close/open_downgrade code"

* tag 'nfs-for-3.17-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFSv4: Fix another bug in the close/open_downgrade code
  NFSv4: nfs4_state_manager() vs. nfs_server_remove_lists()
  NFS: remove BUG possibility in nfs4_open_and_get_state