- 04 Feb, 2016 9 commits
-
-
Mauro Carvalho Chehab authored
GET_FRONTEND and G_PROPERTY can be called anytime, even when the tuner/demod is not fully locked. However, several parameters returned by those calls are available only after the demod get VITERBI lock. While several drivers do the right thing by checking the status before returning the parameter, some drivers simply blindly update the DTV properties cache without checking if the registers at the hardware contain valid values. Due to that, programs that call G_PROPERTY (or GET_FRONTEND) before having a tuner lock may interfere at the zigzag logic, as the DVB kthread calls the set_frontend() callback several times, to fine tune the frequency and to identify if the signal is inverted or not. While the drivers should be fixed to report the right status, we should prevent that such bugs would actually interfere at the device operation. So, let's use a separate var for userspace calls to get frontend. As we copy the content of the cache, this should not cause any troubles. Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Instead of using the DTV properties cache directly, pass the get frontend data as an argument. For now, everything should remain the same, but the next patch will prevent get_frontend to affect the global cache. This is needed because several drivers don't care enough to only change the properties if locked. Due to that, calling G_PROPERTY before locking on those drivers will make them to never lock. Ok, those drivers are crap and should never be merged like that, but the core should not rely that the drivers would be doing the right thing. Reviewed-by:
Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
This is not needed, as the core handles well if get_frontend() is not present. Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
This device doesn't really have a get_frontend(). All it does is to blindly set everything to auto mode. Remove the get_frontend(), as the code does that already, and put the frontend changes at set_frontend, where it belongs. Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
This driver doesn't support getting frontend information and it only works in automatic mode. So, let's remove get_frontend() and update the cache at set_frontend(). Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
There's nothing at siano's get_frontend() callback. So, remove it, as the core will handle it. Reviewed-by:
Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
Instead of implicitly using the DTV cache properties at dtv_get_frontend(), pass it as an additional argument. This patch prepares to use a separate cache for G_PROPERTY, in order to avoid it to mangle with the DVB thread zigzag logic. Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Dan Carpenter authored
We have to unlock before returning -ENOMEM. Fixes: 8dfbcc43 ('[media] xc2028: avoid use after free') Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Mauro Carvalho Chehab authored
When debugging troubles with DTV properties get/set, it is important to be able to see not only the properties from get, but also the ones from set. So, improve the dumps to allow reporting both. Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 02 Feb, 2016 5 commits
-
-
Arnd Bergmann authored
A recent patch broke the msp3400 driver when CONFIG_MEDIA_CONTROLLER is not set: drivers/media/i2c/msp3400-driver.h:107:5: error: "CONFIG_MEDIA_CONTROLLER" is not defined [-Werror=undef] It was clearly a typo, and this patch changes the "#if CONFIG_MEDIA_CONTROLLER" to a working IS_ENABLED() check. Fixes: fb493282 ("[media] msp3400: initialize MC data") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Insu Yun authored
When remove_pending is non-zero, v4l2_lock is never unlocked. Signed-off-by:
Insu Yun <wuninsu@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Heiner Kallweit authored
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. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Heiner Kallweit authored
nvt_enable_wake calls nvt_select_logical_dev (that may sleep) and is called from contexts holding a spinlock. Fix this. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Heiner Kallweit authored
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. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 01 Feb, 2016 26 commits
-
-
Abhilash Jindal authored
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. [mchehab@osg.samsung.com: fix trivial merge conflicts] Signed-off-by:
Abhilash Jindal <klock.android@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Shuah Khan authored
Change media_entity_pipeline_stop() to not decrement stream_count of an inactive media pipeline. Doing so, results in preventing starting the pipeline. Signed-off-by:
Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Shuah Khan authored
Fix media_open() to clear filp->private_data when file open fails. Signed-off-by:
Shuah Khan <shuahkh@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Arnd Bergmann authored
em28xx selects VIDEO_TUNER, which has a dependency on MEDIA_TUNER, so we get a Kconfig warning if that is disabled: warning: (VIDEO_PVRUSB2 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_CX23885 && VIDEO_CX88 && VIDEO_BT848 && VIDEO_SAA7134 && VIDEO_SAA7164) selects VIDEO_TUNER which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_TUNER) VIDEO_TUNER does not actually depend on MEDIA_TUNER, and the dependency does nothing except cause the above warning, so let's remove it. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Arnd Bergmann authored
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. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Arnd Bergmann authored
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. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Amitoj Kaur Chawla authored
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> Signed-off-by:
Amitoj Kaur Chawla <amitoj1606@gmail.com> Reviewed-by:
Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Xiubo Li authored
The space is missing after ',', and this will be introduce much noise when checking new patch around them. Signed-off-by:
Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Xiubo Li authored
Since the number of elements equals to 1, so just use kzalloc to simplify the code and make it more readable. Signed-off-by:
Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Xiubo Li authored
The parentheses are not required after return, and just remove it. Signed-off-by:
Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Hans de Goede authored
SPC 880NC PC camera discussions: http://www.pclinuxos.com/forum/index.php/topic,135688.0.html Cc: stable@vger.kernel.org Reported-by:
Kikim <klucznik0@op.pl> Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Arnd Bergmann authored
Clang complains about an extraneous definition of the module device table after the patch to add it was accidentally merged twice: ../drivers/media/i2c/s5c73m3/s5c73m3-spi.c:40:1: error: redefinition of '__mod_of__s5c73m3_spi_ids_device_table' MODULE_DEVICE_TABLE(of, s5c73m3_spi_ids); ^ ../include/linux/module.h:223:27: note: expanded from macro 'MODULE_DEVICE_TABLE' extern const typeof(name) __mod_##type##__##name##_device_table \ ^ <scratch space>:99:1: note: expanded from here __mod_of__s5c73m3_spi_ids_device_table This removes the second definition. Fixes: f934a94b ("[media] s5c73m3: Export OF module alias information") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. 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>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by:
Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by:
Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Javier Martinez Canillas authored
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>
-
Laurent Pinchart authored
The two formats are very similar, having two separate pages to describe them is overkill. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Simon Horman authored
Add fallback compatibility string. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by:
Simon Horman <horms+renesas@verge.net.au> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
Christophe JAILLET authored
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>
-
Ernst Martin Witte authored
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>
-
Ernst Martin Witte authored
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>
-
Ernst Martin Witte authored
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>
-