aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-16Merge tag 'media/v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds7-12/+20
Pull media fixes from Mauro Carvalho Chehab: "Some fixes for some platform drivers (rockchip, atmel, omap, daVinci, tegra-cec, coda and rcar). Also includes a fix on one of the V4L2 uAPI doc, explaining a border case" * tag 'media/v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: rockchip/vpu: Fix/re-order probe-error/remove path media: rockchip/vpu: Initialize mdev->bus_info media: rockchip/vpu: Get vdev from the file arg in vidioc_querycap() media: rockchip/vpu: Add missing dont_use_autosuspend() calls media: rockchip/vpu: Do not request id 0 for our video device media: tegra-cec: fix cec_notifier_parse_hdmi_phandle return check media: davinci/vpbe: array underflow in vpbe_enum_outputs() media: field-order.rst: clarify FIELD_ANY and FIELD_NONE media: staging/imx: add media device to capture register media: rcar-csi2: Propagate the FLD signal for NTSC and PAL media: rcar-csi2: restart CSI-2 link if error is detected media: omap_vout: potential buffer overflow in vidioc_dqbuf() media: coda: fix unset field and fail on invalid field in buf_prepare media: atmel: atmel-isc: fix asd memory allocation media: atmel: atmel-isc: fix INIT_WORK misplacement media: atmel: atmel-isc: limit incoming pixels per frame
2019-05-15media: rockchip/vpu: Fix/re-order probe-error/remove pathJonas Karlman1-3/+5
media_device_cleanup() and v4l2_m2m_unregister_media_controller() were missing in the probe error path. While at it, re-order calls in the remove path to unregister/cleanup things in the reverse order they were initialized/registered. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-15media: rockchip/vpu: Initialize mdev->bus_infoBoris Brezillon1-0/+2
v4l2-compliance complains that ->bus_info is empty. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-15media: rockchip/vpu: Get vdev from the file arg in vidioc_querycap()Boris Brezillon1-1/+2
This makes the function more generic so it can easily be re-used when adding support for the decoding functionality. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-15media: rockchip/vpu: Add missing dont_use_autosuspend() callsJonas Karlman1-0/+2
Those calls are needed to restore a clean PM state when the probe fails or when the driver is unloaded such that future ->probe() calls can initialize runtime PM again. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-15media: rockchip/vpu: Do not request id 0 for our video deviceJonas Karlman1-1/+1
Pass -1 to video_register_device() to let the core assign the first free id instead of trying to get id 0. In practice it doesn't make a difference since video_register_device() is not strict about id requests and will anyway pick the first free id starting at the id passed in argument, and passing -1 has the same effect as passing 0. But let's comply with the API doc and pass -1 here. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-08Merge tag 'media/v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds53-10690/+281
Pull media updates from Mauro Carvalho Chehab: - remove the deprecated Zoran driver from staging - new I2C driver: ST MIPID02 CSI-2 camera bridge - new platform driver: Amlogic Meson AO CEC G12A Controller - add support for USB audio via the media controller - au0828 driver is now supported via the media controller on both on media and on usbaudio - new kernel test for the media device allocator - add support for stateless decoder at vicodec driver - lots of other driver improvements fixes and cleanups * tag 'media/v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (218 commits) media: dt-bindings: aspeed-video: Add missing memory-region property media: platform: Aspeed: Make reserved memory optional media: platform: Aspeed: Remove use of reset line media: stm32-dcmi: return appropriate error codes during probe media: vsp1: Add support for missing 16-bit RGB555 formats media: vsp1: Add support for missing 16-bit RGB444 formats media: vsp1: Add support for missing 32-bit RGB formats media: v4l: Add definitions for missing 16-bit RGB555 formats media: v4l: Add definitions for missing 16-bit RGB4444 formats media: v4l: Add definitions for missing 32-bit RGB formats media: zoran: remove deprecated driver media: MAINTAINERS: Update AO CEC with ao-cec-g12a driver media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver media: dt-bindings: media: meson-ao-cec: Add G12A AO-CEC-B Compatible media: cros-ec-cec: decrement HDMI device refcount media: seco-cec: decrement HDMI device refcount media: tegra_cec: use new cec_notifier_parse_hdmi_phandle helper media: stih_cec: use new cec_notifier_parse_hdmi_phandle helper media: s5p_cec: use new cec_notifier_parse_hdmi_phandle helper media: meson: ao-cec: use new cec_notifier_parse_hdmi_phandle helper ...
2019-05-08media: staging/imx: add media device to capture registerRui Miguel Silva5-7/+8
When register the capture media device it is assumed that the device data is the media device. In the imx6 case is but in the imx7 is not case. The device data is the csi structure. Add the explicit argument of the media device that we want to associate with the capture device. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Acked-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: fix checkpatch alignment warning] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: zoran: remove deprecated driverHans Verkuil22-10702/+0
The zoran driver has been marked deprecated for a year now without any interest to update this driver to the vb2 framework. Time to remove it altogether. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: cedrus: Fix initialization orderJernej Skrabec1-12/+12
Currently, MEDIA_IOC_G_TOPOLOGY ioctl on cedrus fails due to incorrect initialization order. Fix that by moving video_register_device() before v4l2_m2m_register_media_controller() and while at it, fix error path. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: ipu3-imgu: Use %u for formatting unsigned values (not %d)Sakari Ailus1-20/+20
The driver used %d for formatting unsigned values. Use %u instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: staging/intel-ipu3: parameter buffer refactoringBingbu Cao3-35/+46
Current ImgU driver processes and releases the parameter buffer immediately after queued from user. This does not align with other image buffers which are grouped in sets and used for the same frame. If user queues multiple parameter buffers continuously, only the last one will take effect. To make consistent buffers usage, this patch changes the parameter buffer handling and group parameter buffer with other image buffers for each frame. Each time driver will queue one more group of buffers when previous frame processed and buffers consumed by css. Signed-off-by: Tianshu Qiu <tian.shu.qiu@intel.com> Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: staging: media: imx: imx7-mipi-csis: simplify getting .driver_dataWolfram Sang1-4/+2
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-22media: rockchip/vpu: Rename pixel format helpersEzequiel Garcia1-6/+6
The rockchip VPU driver uses generic names for its pixel format helpers. We want to use the same names for generic versions of these helpers, so rename the rockchip ones. The driver will be switched to the generic helpers later. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-16staging: remove redundant 'default n' from KconfigBartlomiej Zolnierkiewicz1-1/+0
'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: tegra-vde: add proper SPDX identifiers on file that did not have it.Greg Kroah-Hartman1-9/+2
There was a single file for the tegra-vde driver that did not have SPDX identifiers on it, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Cc: Dmitry Osipenko <digetx@gmail.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Jonathan Hunter <jonathanh@nvidia.com> Cc: linux-media@vger.kernel.org Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: imx: add proper SPDX identifiers on files that did not have them.Greg Kroah-Hartman14-70/+14
There were a few files for the imx media drivers that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP Linux Team <linux-imx@nxp.com> Cc: linux-media@vger.kernel.org Acked-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: soc_camera: add proper SPDX identifiers on files that did not have them.Greg Kroah-Hartman7-35/+7
There were a few files for the soc_camera drivers that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP Linux Team <linux-imx@nxp.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: linux-media@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: zoran: add proper SPDX identifiers on files that did not have them.Greg Kroah-Hartman16-218/+16
There were a few files for the zoran driver that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: linux-media@vger.kernel.org Cc: mjpeg-users@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman8-0/+8
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman12-0/+12
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: zoran: fix brace in the wrong lineCristiano Borges Cardoso1-2/+1
fix the following error from checkpatch: ERROR: that open brace { should be on the previous line Signed-off-by: Cristiano Borges Cardoso <cristianoborgescardoso@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: zoran: Remove print statement for failed kmallocNishka Dasgupta1-4/+0
Remove print statement indicating failure of kmalloc. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: media: zoran: Remove print statementNishka Dasgupta1-2/+0
Remove print statement following unsuccessful kmalloc. Issue found with the following Coccinelle script: @@ identifier e1, print; char [] c; @@ e1 = kmalloc(...); if(!e1){ -print(...,c,...); ... when any } Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03Staging: media: davinci_vpfe: Drop macro and use an in-kernel functionMadhumitha Prabakaran2-4/+2
Drop macro CEIL and use an in-kernel function DIV_ROUND_UP. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-01staging: media: zoran: Modify return statement.Sanjana Sanikommu1-65/+30
Challenge suggested by coccinelle. Remove return variable and directly return the value Issue found using ret.cocci Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-01staging: media: imx: Replace list_entry with list_for_each_entry_safeSanjana Sanikommu1-3/+2
Challenge suggested by coccinelle. Replace use of the combination of list_empty() and list_entry() with list_for_each_entry_safe() to simplify the code. Issue found using below Coccinelle script. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-30staging: media: zoran: Fix block comment styleVatsala Narang1-4/+8
Add trailing */ on a separate line for block comments to get rid of checkpatch warning. Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29media: staging: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2-3/+3
There are a few left overs at staging which were still using the deprecated strlcpy() function. Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29Staging: media: davinci_vpfe: Convert macro 'IPIPE_S12Q8' into inlineMadhumitha Prabakaran1-11/+13
Convert macro 'IPIPE_S12Q8' into an inline function to maintain Linux kernel coding style based on which inline function is preferable to macro resembling function. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: media: ipu3: Avoid unnecessary blank line.Sanjana Sanikommu1-1/+0
Remove unnecessary blank line. Issue found using checkpatch.pl Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29media: soc_camera: Remove leftover files, add TODOSakari Ailus4-11/+4
Remove a few files left over from the mt9t031 driver. While at it, add a TODO file for the SoC camera framework as a whole. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29media: replace strncpy() by strscpy()Mauro Carvalho Chehab4-9/+9
The strncpy() function is being deprecated upstream. Replace it by the safer strscpy(). While here, replace a few occurences of strlcpy() that were recently added to also use strscpy(). Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29media: staging: media: imx7-mipi-csis: fix debugfs compilationArnd Bergmann1-14/+2
When CONFIG_DEBUGFS is enabled, we get a warning about an incorrect section annotation that can lead to undefined behavior: WARNING: vmlinux.o(.text+0xd3c7c4): Section mismatch in reference from the function mipi_csis_probe() to the function .init.text:mipi_csis_debugfs_init() The function mipi_csis_probe() references the function __init mipi_csis_debugfs_init(). This is often because mipi_csis_probe lacks a __init annotation or the annotation of mipi_csis_debugfs_init is wrong. The same function for an unknown reason has a different version for !CONFIG_DEBUGFS, which does not have this problem, but behaves the same way otherwise (it does nothing when debugfs is disabled). Consolidate the two versions, using the correct section from one version, and the implementation from the other. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29media: staging: media: davinci_vpfe: fix large stack usage with clangArnd Bergmann1-11/+9
clang is unable to optimize the isif_ioctl() in the same way that gcc does, as it fails to prove that the local copy of the 'struct vpfe_isif_raw_config' argument is unnecessary: drivers/staging/media/davinci_vpfe/dm365_isif.c:622:13: error: stack frame size of 1344 bytes in function 'isif_ioctl' [-Werror,-Wframe-larger-than=] Marking it as 'const' while passing the data down clearly shows us that the copy is never modified, and we can skip copying it entirely, which reduces the stack usage to just eight bytes. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29media: staging/imx: Fix inconsistent long line breaksLucas Leonardo Ciancaglini1-8/+9
Small readability changes to make the breaking of some lines cleaner. Signed-off-by: Lucas Leonardo Ciancaglini <leociancalucas@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-26staging: tegra-vde: remove unnecessary boilerplate license identifier textJules Irenge1-4/+0
Remove unnecessary boilerplate license identifier text. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-26staging: tegra-vde: Add SPDX GPL-2.0+ license identifier to fix checkpatch warningJules Irenge1-0/+1
Add the SPDX GPL-2.0+ license identifier to fix checkpatch.pl warning "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1" Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-26Staging: media: davinci_vpfe: Drop macrosMadhumitha Prabakaran2-11/+9
Drop macros instead use functions set_bit() and clear_bit directly. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-26Staging: media: davinci_vpfe: Fix preferred form of passing a sizeMadhumitha Prabakaran1-4/+2
Fix preferred form of passing a size of a struct to improve readability and eradicate an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-26staging: media: zoran: Use unsigned int instead of unsignedVatsala Narang1-5/+5
Replace 'unsigned' with 'unsigned int' to get rid of checkpatch warning Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-26Staging: media: imx: mipi-csi2: Remove unnecessary error messagesBhanusree Pola1-3/+1
The function devm_ioremap already prints error message when there is no enough memory. Remove print statements that give error messages Issue found using coccinelle The following semantic patch is used to solve this: <smpl> @@ expression x; constant char[] C; identifier f; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); if(x==NULL) { ... ( -f(C,...); | -f(...,C); ) ... } </smpl> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-25media: cedrus: set requires_requestsHans Verkuil1-0/+1
The cedrus stateless decoder requires the use of request, so indicate this by setting requires_requests to 1. Note that the cedrus driver never checked for this, and as far as I can tell would just crash if an attempt was made to queue a buffer without a request. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-21Staging: media: Use !x in place of NULL comparisionBhanusree Pola1-1/+1
Test for NULL as !x instead of NULL comparisions for functions that return NULL on failure. Issue found using coccinelle Semantic patch used to solve the problem is as follows // <smpl> @@ expression x; statement S; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); -if(x==NULL) +if(!x) // </smpl> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20media: Kconfig files: use the right help coding styleMauro Carvalho Chehab5-6/+6
Checkpatch wants to use 'help' instead of '---help---': WARNING: prefer 'help' over '---help---' for new help texts Let's change it globally at the media subsystem, as otherwise people would keep using the old way. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-20media: staging/intel-ipu3: reduce kernel stack usageArnd Bergmann1-12/+23
The imgu_css_queue structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-css.c: In function 'imgu_css_fmt_try': drivers/staging/media/ipu3/ipu3-css.c:1863:1: error: the frame size of 1172 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 140 bytes for the same x86-32 configuration. Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add css pipeline programming") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Cao, Bingbu <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-20media: staging/intel-ipu3: mark PM function as __maybe_unusedArnd Bergmann1-1/+1
The imgu_rpm_dummy_cb() looks like an API misuse that is explained in the comment above it. Aside from that, it also causes a warning when power management support is disabled: drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function] The warning is at least easy to fix by marking the function as __maybe_unused. Fixes: 7fc7af649ca7 ("media: staging/intel-ipu3: Add imgu top level pci device driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-20media: staging/intel-ipu3-v4l: reduce kernel stack usageArnd Bergmann1-15/+25
The v4l2_pix_format_mplane structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt': drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 272 bytes for the same x86-32 configuration. Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-19media: staging: davinci: drop pointless static qualifier in vpfe_resizer_init()Mao Wenan1-1/+1
There is no need to have the 'T *v' variable static since new value always be assigned before use it. Signed-off-by: Mao Wenan <maowenan@huawei.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-19media: staging: media: zoran: Fixes a checkpatch.pl error in videocodec.cclaudiojpaz1-1/+1
ERROR: do not initialise statics to NULL Signed-off-by: claudiojpaz <claudiojpaz@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>