Heiner Kallweit [Mon, 1 Feb 2016 20:50:55 +0000 (18:50 -0200)]
[media] rc/nuvoton_cir: fix locking issue when calling nvt_disable_cir
nvt_disable_cir calls nvt_disable_logical_dev (that may sleep) and is
called from contexts holding a spinlock.
Fix this and remove the unneeded clearing of CIR_IREN as this is done
in nvt_cir_disable already.
Heiner Kallweit [Mon, 1 Feb 2016 20:49:32 +0000 (18:49 -0200)]
[media] rc/nuvoton_cir: fix locking issue with nvt_enable_cir
nvt_enable_cir calls nvt_enable_logical_dev (that may sleep)
while holding a spinlock.
This patch fixes this and moves the content of nvt_enable_cir
to nvt_open as this is the only caller.
Abhilash Jindal [Sun, 31 Jan 2016 05:47:31 +0000 (03:47 -0200)]
[media] dvb-frontend: Use boottime
Wall time obtained from ktime_get_real is susceptible to sudden jumps due to
user setting the time or due to NTP. Boot time is constantly increasing time
better suited for comparing two timestamps.
Shuah Khan [Sat, 30 Jan 2016 20:10:52 +0000 (18:10 -0200)]
[media] media: Media Controller fix to not let stream_count go negative
Change media_entity_pipeline_stop() to not decrement
stream_count of an inactive media pipeline. Doing so,
results in preventing starting the pipeline.
Arnd Bergmann [Tue, 26 Jan 2016 14:09:58 +0000 (12:09 -0200)]
[media] b2c2: flexcop: avoid unused function warnings
The flexcop driver has two functions that are normally used, except
when multiple frontend drivers are disabled:
drivers/media/common/b2c2/flexcop-fe-tuner.c:42:12: warning: 'flexcop_set_voltage' defined but not used [-Wunused-function]
drivers/media/common/b2c2/flexcop-fe-tuner.c:71:12: warning: 'flexcop_sleep' defined but not used [-Wunused-function]
This avoids the build warning by updating the #ifdef for flexcop_set_voltage
to the exact condition under which it is used. For flexcop_sleep, the
condition is rather complex, so I resort to marking it as __maybe_unused,
so the compiler can silently drop it.
Arnd Bergmann [Tue, 26 Jan 2016 14:09:56 +0000 (12:09 -0200)]
[media] hdpvr: hide unused variable
The i2c client pointer is only used when CONFIG_I2C is set, and
otherwise produces a compile-time warning:
drivers/media/usb/hdpvr/hdpvr-core.c: In function 'hdpvr_probe':
drivers/media/usb/hdpvr/hdpvr-core.c:276:21: error: unused variable 'client' [-Werror=unused-variable]
This uses the same #ifdef to hide the variable when the code using
it is hidden.
for_each_available_child_of_node and for_each_child_of_node perform an
of_node_get on each iteration, so to break out of the loop an of_node_put is
required.
Found using Coccinelle. The simplified version of the semantic patch
that is used for this is as follows:
// <smpl>
@@
local idexpression n;
expression e,r;
@@
for_each_available_child_of_node(r,n) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
// </smpl>
The v4l2_of_parse_endpoint function kernel-doc says that the return value
is always 0. But that is not true since the function can fail and a error
negative code is returned on failure. So correct the kernel-doc to match.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This memory is allocated using kzalloc so there is no need to call
memset(..., 0, ...)
[mchehab@osg.samsung.com: as suggested by Joe Perches,
It's unusual to not see the alloc above the if, removed a
blank line between kzalloc/if and added a blank line after if] Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] ts2020: cancel_delayed_work_sync before device removal / kfree
ts2020_remove was calling kfree(dev) with possibly still active
schedule_delayed_work(dev->stat_work). A similar bug in si2157 caused
kernel panics in call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] rtl2830: cancel_delayed_work_sync before device removal / kfree
rtl2830_remove was calling kfree(dev) with possibly still active
schedule_delayed_work(&dev->stat_work). A similar bug in si2157
caused kernel panics in call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] si2157: cancel_delayed_work_sync before device removal / kfree
si2157_remove was calling kfree(dev) with possibly still active
schedule_delayed_work(dev->stat_work). This caused kernel panics in
call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] af9033: cancel_delayed_work_sync before device removal / kfree
af9033_remove was calling kfree(dev) with possibly still active
schedule_delayed_work(&dev->stat_work). A similar bug in si2157
caused kernel panics in call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] af9013: cancel_delayed_work_sync before device removal / kfree
af9013_remove was calling kfree(state) with possibly still active
schedule_delayed_work(&state->statistics_work). A similar bug in
si2157 caused kernel panics in call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 7 Jan 2016 08:35:21 +0000 (06:35 -0200)]
[media] rtl28xxu: retry failed i2c messages
Sometimes i2c transfer fails. That happens especially when large
amount of data is written sequentially eg. firmware download.
Problem arises with both integrated rtl2832 demod and external
mn88472 demod, which is clear indicator it is busy i2c bus issue.
Use i2c core retry logic in order fix the issue by repeating failed
message. Another solution which also works is to add ~100us delay
between i2c messages - but repeating sounds more elegant and does
not cause any extra delay for success cases.
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Mon, 4 Jan 2016 19:32:51 +0000 (17:32 -0200)]
[media] dw2102: Add support for Terratec Cinergy S2 USB BOX
The Terratec Cinergy S2 USB BOX uses a Montage M88TS2022 tuner
and a M88DS3103 demodulator, same as Technotrend TT-connect S2-4600.
This patch adds the missing USB Product ID to make it work.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Only handle an interrupt if at least one combination of event bit
and related interrupt bit is set.
Previously it was just checked that at least one event bit and
at least one interrupt bit are set.
This fixes issues like the following which was caused by
interrupt sharing:
An interrupt intended for nvt_cir_isr was handled by nvt_cir_wake_isr
first and because status bit CIR_WAKE_IRSTS_IR_PENDING was set
the wake fifo was accidently cleared.
This patch also fixes the bug that nvt_cir_wake_isr returned IRQ_HANDLED
even if it detected that the (shared) interrupt was meant for another
handler.
Check for the case that no Nuvoton chip is found on either EFM port.
Also move the position of nvt_efm_disable to reduce the time the
EFM ports are locked.
Sakari Ailus [Mon, 11 Jan 2016 13:21:15 +0000 (11:21 -0200)]
[media] media: v4l: Dual license v4l2-common.h under GPL v2 and BSD licenses
The v4l2-common.h user space header was split off from videodev2.h, but
the dual licensing of the videodev2.h (as well as other V4L2 headers) was
missed. Change the license of the v4l2-common.h from GNU GPL v2 to both
GNU GPL v2 and BSD.
Sakari Ailus <sakari.ailus@iki.fi>:
> Would you approve a license change of the patches to
> include/uapi/linux/v4l2-common.h (formerly include/linux/v4l2-common.h) you
> or your company have contributed from GNU GPL v2 to dual GNU GPL v2 and BSD
> licenses, changing the copyright notice in the file as below (from
> videodev2.h):
>
> -------------8<------------
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License as published by
> * the Free Software Foundation; either version 2 of the License, or
> * (at your option) any later version.
> *
> * This program is distributed in the hope that it will be useful,
> * but WITHOUT ANY WARRANTY; without even the implied warranty of
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> * GNU General Public License for more details.
> *
> * Alternatively you can redistribute this file under the terms of the
> * BSD license as stated below:
> *
> * Redistribution and use in source and binary forms, with or without
> * modification, are permitted provided that the following conditions
> * are met:
> * 1. Redistributions of source code must retain the above copyright
> * notice, this list of conditions and the following disclaimer.
> * 2. Redistributions in binary form must reproduce the above copyright
> * notice, this list of conditions and the following disclaimer in
> * the documentation and/or other materials provided with the
> * distribution.
> * 3. The names of its contributors may not be used to endorse or promote
> * products derived from this software without specific prior written
> * permission.
> *
> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
> * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> -------------8<------------
Mauro Carvalho Chehab <mchehab@osg.samsung.com>:
> No problem from my side.
Hans Verkuil <hans.verkuil@cisco.com>:
> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Aaro Koskinen <aaro.koskinen@nokia.com>:
> This fine also for us.
>
> Acked-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Benoit Parrot [Wed, 6 Jan 2016 23:37:26 +0000 (21:37 -0200)]
[media] media: ti-vpe: Add CAL v4l2 camera capture driver
The Camera Adaptation Layer (CAL) is a block which consists of a dual
port CSI2/MIPI camera capture engine.
Port #0 can handle CSI2 camera connected to up to 4 data lanes.
Port #1 can handle CSI2 camera connected to up to 2 data lanes.
The driver implements the required API/ioctls to be V4L2 compliant.
Driver supports the following:
- V4L2 API using DMABUF/MMAP buffer access based on videobuf2 api
- Asynchronous sensor sub device registration
- DT support
Hans Verkuil [Fri, 22 Jan 2016 15:13:25 +0000 (13:13 -0200)]
[media] vivid: fix broken Bayer text rendering
Sometimes when a Bayer pixelformat is selected the rendering of the OSD text
by vivid was all wrong: every other line of the text was shifted by half the width
or more.
It turned out that to render Bayer formats the interleaved boolean is set to true
in the tpg. This mode indicates a semi-biplanar mode where two interleaved planes
are used to render the frame. From outside the tpg it looks like a single plane,
but internally it is two planes.
However, in the tpg_s_bytesperline() function the interleaved bool wasn't checked
and only the bytesperline value for plane 0 was updated. But for the interleaved
mode the same value has to be copied to bytesperline[1] as well.
The effect was that whatever old value was left in bytesperline[1] was used, which
caused all sorts of weird and seemingly unpredictable shifts.
Reported-by: Ove Brynestad <ovebryne@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Tiffany Lin [Tue, 19 Jan 2016 07:56:50 +0000 (05:56 -0200)]
[media] media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32
In v4l2-compliance utility, test QUERYBUF required correct length
value to go through each planar to check planar's length in
multi-planar buffer type
Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.7 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Thu, 24 Dec 2015 13:18:10 +0000 (11:18 -0200)]
[media] DocBook media: make explicit that standard/timings never change automatically
A driver might detect a new standard or DV timings, but it will never change to
those new timings automatically. Instead it will send an event and let the application
take care of it.
Make this explicit in the documentation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mats Randgaard [Thu, 10 Dec 2015 13:38:07 +0000 (11:38 -0200)]
[media] tc358743: Use local array with fixed size in i2c write
i2c_wr() is called from ops and the interrupt service routine, while
state->wr_data is shared and unprotected, and could be overwritten.
This shared buffer is therefore replaced with a local array with fixed
size. The array has the size of one EDID block (128 bytes) + 2 bytes
i2c address, and the EDID is written block by block (up to 8 blocks).
Hans Verkuil [Wed, 13 Jan 2016 13:44:41 +0000 (11:44 -0200)]
[media] v4l2-dv-timings: skip standards check for V4L2_DV_BT_CAP_CUSTOM
Skip validating the standards field in v4l2_valid_dv_timings() if the
V4L2_DV_BT_CAP_CUSTOM capability is set, since that implies that
non-standard timings are allowed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Mon, 4 Jan 2016 19:30:09 +0000 (17:30 -0200)]
[media] coda: fix first encoded frame payload
During the recent vb2_buffer restructuring, the calculation of the
buffer payload reported to userspace was accidentally broken for the
first encoded frame, counting only the length of the headers.
This patch re-adds the length of the actual frame data.
Fixes: 2d7007153f0c ("[media] media: videobuf2: Restructure vb2_buffer") Reported-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Jan Luebbe <jlu@pengutronix.de> Cc: <stable@vger.kernel.org> # for v4.4 and up Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This mxl111sf_tuner_config structure is never modified, so declare it as
const.
There are some indentation changes to remain within 80 columns.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Markus Elfring [Tue, 29 Dec 2015 10:02:43 +0000 (08:02 -0200)]
[media] hdpvr: Refactoring for hdpvr_read()
Let us return directly if the element "status" of the variable "buf"
indicates "BUFSTAT_READY".
A check repetition can be excluded for the variable "ret" at the end then.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Nikola Forró [Sun, 20 Dec 2015 11:57:17 +0000 (09:57 -0200)]
[media] usbtv: discard redundant video fields
There are many dropped fields with some sources, leading to many
redundant fields without counterparts. When this redundant field
is odd, a new frame is pushed containing this odd field interleaved
with whatever was left in the buffer, causing video artifacts.
Do not push a new frame after processing every odd field, but do it
only after those which come after an even field.
Signed-off-by: Nikola Forró <nikola.forro@gmail.com> Acked-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[media] em28xx: make sure that the device has video
There are some devices, like Terratec Cinergy HTC, where
while the device supports analog TV, the driver is not
capable yet of handling it, because the analog TV driver
was not written.
So, don't bind the em28xx-v4l drivers on such devices.
[media] saa7115: initialize demod type and add the needed pads
The saa7115 driver is used on several em28xx-based devices.
Now that we're about to add MC support to em28xx, we need to
be sure that the saa711x demod will be properly mapped at MC.
[media] v4l2-mc.h Add pads for audio and video IF-PLL decoders
The audio and video IF-PLL decoders have one sink and one source
PAD. Add macro names for those pads and describe what kind of
signals are represented at such pads.
[media] media.h: add support for IF-PLL video/sound decoder
Very old hardware may have an analog stage tuner. Those hardware
consists of a PLL that converts a RF signal into IF signals.
Depending on the hardware, those video IF signal can be
decoded directly by the bridge chipset. Most Conexant
chips (bt8x8, cx2388x, etc) have internally the decoders
for that. Yet, even on such hardware, the tuner may have
internally its own TV multi-standard decoder like tda9887.
The same happens with the audio IF signal, where some bridges
are capable of receiving it, while others require an external
IF-PLL sound decoder, like msp3400.
Those external IF-PLL audio and video decoders have their own
I2C address, and use different drivers to handle them. So, they're
mapped as different subdevices on Linux.
Thankfully, all modern hardware comes with an IC chip that
has both the RF and the IF stages on it, being capable of
decoding audio and video IF signals internally.
Yet, as we need to support drivers that can work with either
analog or silicon tuners, we need to add two entity types
for those old hardware.
[media] v4l2-mc.h: move tuner PAD definitions to this new header
The customer PC hardware can be shipped with lots of different
configurations, as vendors use to replace some of the chips on
their hardware along the time. All drivers that support such
devices are prepared to handle the hardware differences, using
their own auto-probing logic.
They do it in a way that number of inputs and outputs for a given
hardware type doesn't change.
Now that we're adding media controller capabilities to those drivers,
we need to standardize the number of inputs and outputs for each
hardware type, as we want to have a generic function at the V4L2
core that would create the links for the entities that are expected
on such hardware.
Such standard is already there for tuners, but tuner.h is not the
best place to store such data, as we'll need to add definitions also
for analog TV demodulators.
Also, we'll need a place to put a set of MC handling functions. So,
let's create a v4l2-mc.h to store such kind of definitions.
[media] tuner.h: rename TUNER_PAD_IF_OUTPUT to TUNER_PAD_OUTPUT
The output of a tuner is not only IF frequencies. They may also
output audio on some of its pins, and may even be a zero-IF tuner,
with outputs a baseband. So, rename the PAD name to make it
clearer and add a proper documentation about that at tuner.h.
If struct xc2028_config is passed without a firmware name,
the following trouble may happen:
[11009.907205] xc2028 5-0061: type set to XCeive xc2028/xc3028 tuner
[11009.907491] ==================================================================
[11009.907750] BUG: KASAN: use-after-free in strcmp+0x96/0xb0 at addr ffff8803bd78ab40
[11009.907992] Read of size 1 by task modprobe/28992
[11009.907994] =============================================================================
[11009.907997] BUG kmalloc-16 (Tainted: G W ): kasan: bad access detected
[11009.907999] -----------------------------------------------------------------------------
[11009.908130] Bytes b4 ffff8803bd78ab30: 01 00 00 00 2a 07 00 00 9d 28 00 00 01 00 00 00 ....*....(......
[11009.908133] Object ffff8803bd78ab40: 01 00 00 00 00 00 00 00 b0 1d c3 6a 00 88 ff ff ...........j....
[11009.908137] CPU: 3 PID: 28992 Comm: modprobe Tainted: G B W 4.5.0-rc1+ #43
[11009.908140] Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
[11009.908142] ffff8803bd78a000ffff8802c273f1b8ffffffff81932007ffff8803c6407a80
[11009.908148] ffff8802c273f1e8ffffffff81556759ffff8803c6407a80ffffea000ef5e280
[11009.908153] ffff8803bd78ab40dffffc0000000000ffff8802c273f210ffffffff8155ccb4
[11009.908158] Call Trace:
[11009.908162] [<ffffffff81932007>] dump_stack+0x4b/0x64
[11009.908165] [<ffffffff81556759>] print_trailer+0xf9/0x150
[11009.908168] [<ffffffff8155ccb4>] object_err+0x34/0x40
[11009.908171] [<ffffffff8155f260>] kasan_report_error+0x230/0x550
[11009.908175] [<ffffffff81237d71>] ? trace_hardirqs_off_caller+0x21/0x290
[11009.908179] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908182] [<ffffffff8155f5c3>] __asan_report_load1_noabort+0x43/0x50
[11009.908185] [<ffffffff8155ea00>] ? __asan_register_globals+0x50/0xa0
[11009.908189] [<ffffffff8194cea6>] ? strcmp+0x96/0xb0
[11009.908192] [<ffffffff8194cea6>] strcmp+0x96/0xb0
[11009.908196] [<ffffffffa13ba4ac>] xc2028_set_config+0x15c/0x630 [tuner_xc2028]
[11009.908200] [<ffffffffa13bac90>] xc2028_attach+0x310/0x8a0 [tuner_xc2028]
[11009.908203] [<ffffffff8155ea78>] ? memset+0x28/0x30
[11009.908206] [<ffffffffa13ba980>] ? xc2028_set_config+0x630/0x630 [tuner_xc2028]
[11009.908211] [<ffffffffa157a59a>] em28xx_attach_xc3028.constprop.7+0x1f9/0x30d [em28xx_dvb]
[11009.908215] [<ffffffffa157aa2a>] ? em28xx_dvb_init.part.3+0x37c/0x5cf4 [em28xx_dvb]
[11009.908219] [<ffffffffa157a3a1>] ? hauppauge_hvr930c_init+0x487/0x487 [em28xx_dvb]
[11009.908222] [<ffffffffa01795ac>] ? lgdt330x_attach+0x1cc/0x370 [lgdt330x]
[11009.908226] [<ffffffffa01793e0>] ? i2c_read_demod_bytes.isra.2+0x210/0x210 [lgdt330x]
[11009.908230] [<ffffffff812e87d0>] ? ref_module.part.15+0x10/0x10
[11009.908233] [<ffffffff812e56e0>] ? module_assert_mutex_or_preempt+0x80/0x80
[11009.908238] [<ffffffffa157af92>] em28xx_dvb_init.part.3+0x8e4/0x5cf4 [em28xx_dvb]
[11009.908242] [<ffffffffa157a6ae>] ? em28xx_attach_xc3028.constprop.7+0x30d/0x30d [em28xx_dvb]
[11009.908245] [<ffffffff8195222d>] ? string+0x14d/0x1f0
[11009.908249] [<ffffffff8195381f>] ? symbol_string+0xff/0x1a0
[11009.908253] [<ffffffff81953720>] ? uuid_string+0x6f0/0x6f0
[11009.908257] [<ffffffff811a775e>] ? __kernel_text_address+0x7e/0xa0
[11009.908260] [<ffffffff8104b02f>] ? print_context_stack+0x7f/0xf0
[11009.908264] [<ffffffff812e9846>] ? __module_address+0xb6/0x360
[11009.908268] [<ffffffff8137fdc9>] ? is_ftrace_trampoline+0x99/0xe0
[11009.908271] [<ffffffff811a775e>] ? __kernel_text_address+0x7e/0xa0
[11009.908275] [<ffffffff81240a70>] ? debug_check_no_locks_freed+0x290/0x290
[11009.908278] [<ffffffff8104a24b>] ? dump_trace+0x11b/0x300
[11009.908282] [<ffffffffa13e8143>] ? em28xx_register_extension+0x23/0x190 [em28xx]
[11009.908285] [<ffffffff81237d71>] ? trace_hardirqs_off_caller+0x21/0x290
[11009.908289] [<ffffffff8123ff56>] ? trace_hardirqs_on_caller+0x16/0x590
[11009.908292] [<ffffffff812404dd>] ? trace_hardirqs_on+0xd/0x10
[11009.908296] [<ffffffffa13e8143>] ? em28xx_register_extension+0x23/0x190 [em28xx]
[11009.908299] [<ffffffff822dcbb0>] ? mutex_trylock+0x400/0x400
[11009.908302] [<ffffffff810021a1>] ? do_one_initcall+0x131/0x300
[11009.908306] [<ffffffff81296dc7>] ? call_rcu_sched+0x17/0x20
[11009.908309] [<ffffffff8159e708>] ? put_object+0x48/0x70
[11009.908314] [<ffffffffa1579f11>] em28xx_dvb_init+0x81/0x8a [em28xx_dvb]
[11009.908317] [<ffffffffa13e81f9>] em28xx_register_extension+0xd9/0x190 [em28xx]
[11009.908320] [<ffffffffa0150000>] ? 0xffffffffa0150000
[11009.908324] [<ffffffffa0150010>] em28xx_dvb_register+0x10/0x1000 [em28xx_dvb]
[11009.908327] [<ffffffff810021b1>] do_one_initcall+0x141/0x300
[11009.908330] [<ffffffff81002070>] ? try_to_run_init_process+0x40/0x40
[11009.908333] [<ffffffff8123ff56>] ? trace_hardirqs_on_caller+0x16/0x590
[11009.908337] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908340] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908343] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908346] [<ffffffff8155ea37>] ? __asan_register_globals+0x87/0xa0
[11009.908350] [<ffffffff8144da7b>] do_init_module+0x1d0/0x5ad
[11009.908353] [<ffffffff812f2626>] load_module+0x6666/0x9ba0
[11009.908356] [<ffffffff812e9c90>] ? symbol_put_addr+0x50/0x50
[11009.908361] [<ffffffffa1580037>] ? em28xx_dvb_init.part.3+0x5989/0x5cf4 [em28xx_dvb]
[11009.908366] [<ffffffff812ebfc0>] ? module_frob_arch_sections+0x20/0x20
[11009.908369] [<ffffffff815bc940>] ? open_exec+0x50/0x50
[11009.908374] [<ffffffff811671bb>] ? ns_capable+0x5b/0xd0
[11009.908377] [<ffffffff812f5e58>] SyS_finit_module+0x108/0x130
[11009.908379] [<ffffffff812f5d50>] ? SyS_init_module+0x1f0/0x1f0
[11009.908383] [<ffffffff81004044>] ? lockdep_sys_exit_thunk+0x12/0x14
[11009.908394] [<ffffffff822e6936>] entry_SYSCALL_64_fastpath+0x16/0x76
[11009.908396] Memory state around the buggy address:
[11009.908398] ffff8803bd78aa00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908401] ffff8803bd78aa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908403] >ffff8803bd78ab00: fc fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc
[11009.908405] ^
[11009.908407] ffff8803bd78ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908409] ffff8803bd78ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908411] ==================================================================
In order to avoid it, let's set the cached value of the firmware
name to NULL after freeing it. While here, return an error if
the memory allocation fails.
Laurent Pinchart [Tue, 26 Jan 2016 12:46:24 +0000 (10:46 -0200)]
[media] tvp5150: Add pad-level subdev operations
This patch enables the tvp5150 decoder driver to be used with the media
controller framework by adding pad-level subdev operations and init the
media entity pad.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
On em28xx driver, s_stream subdev ops was not implemented
properly. It was used only to disable stream, never enabling it.
That was the root cause of the regression when we added support
for s_stream on tvp5150 driver.
With that, we can get rid of the changes on tvp5150 side,
e. g. changeset 47de9bf8931e ('[media] tvp5150: Fix breakage for serial usage').
Tested video output on em2820+tvp5150 on WinTV USB2 and
video and/or vbi output on em288x+tvp5150 on HVR 950.
Heiner Kallweit [Wed, 30 Dec 2015 16:42:05 +0000 (14:42 -0200)]
[media] nuvoton-cir: fix setting ioport base address
At least on Zotac CI321 ACPI provides an ioport range for the wake up part
but accessing these ioports has no effect.
Instead the ioport base address is set to another value already
(0xa20 in my case) and accessing this ioport range works.
Therefore set a new ioport base address only if the current ioport base
address is 0 (register reset default).
The need to use the existing base address instead of trying to set
an own one doesn't seem to be limited to this specific device as other
drivers like hwmon/nct6775 do it the same way.
This change was successfully tested on the mentioned device.
And the change should be generic enough to not break the driver for
other chips (however due to lack of appropriate hardware I wasn't
able to test this).
[mchehab@osg.samsung.com: Tested on Intel NUC NUC5i7RYB with BIOS
version RYBDWi35.86A.0350.2015.0812.1722]