summaryrefslogtreecommitdiff
path: root/drivers/media/platform
AgeCommit message (Collapse)Author
2019-08-05media: venus: hfi: add type argument to hfi flush functionStanimir Varbanov
Make hfi_flush function to receive an argument for the type of flush. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-05media: venus: helpers: export few helper functionsStanimir Varbanov
Here we export few helper function to use them from decoder to implement more granular control needed for stateful Codec API compliance. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-05media: venus: venc: amend buffer size for bitstream planeMalathi Gottam
Accept the buffer size requested by client and compare it against driver calculated size and set the maximum to bitstream plane. Signed-off-by: Malathi Gottam <mgottam@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-30media: via-camera: convert to the vb2 frameworkHans Verkuil
Convert the via-camera to the vb2 framework. With this change this driver passes all 'v4l2-compliance -s' tests on my OLPC 1.5. Also tested with the Sugar 'Record' application. All tests were done under the OLPC official 5.0.8 kernel. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-30media: vivid: add support for new pixelformatsHans Verkuil
New RGB444, RGB555 and RGB32 variants were recently added. Now also support them in vivid. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-30media: vivid: fix missing cec adapter nameHans Verkuil
Commit "vivid: reorder CEC allocation and control set-up" missed that the CEC adapter needs a valid vfd->name, and that was now filled in after the CEC adapter was created, leading to an empty adapter name. Fill in the name earlier. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 4ee895e71abb ("media: vivid: reorder CEC allocation and control set-up") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: rcar-vin: Always setup controls when opening video deviceNiklas Söderlund
Now that both Gen2 (video device centric) and Gen3 (media device centric) modes of the driver have controls it is required to always setup the controls when opening the devices. Remove the check which only calls v4l2_ctrl_handler_setup() for Gen2 and call it unconditionally. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: rcar-vin: Add support for RGB formats with alpha componentNiklas Söderlund
The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and V4L2_PIX_FMT_ABGR32 pixel formats. Add the hardware register setup and allow the alpha component to be changed while streaming using the V4L2_CID_ALPHA_COMPONENT control. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: fix checkpatch warning for macro VNDMR_A8BIT] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: rcar-vin: Add control for alpha componentNiklas Söderlund
In preparation to adding support for RGB pixel formats with an alpha component add a control to allow the user to control which alpha value should be used. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: rcar-vin: Rename VNDMR_DTMD_ARGB1555 to VNDMR_DTMD_ARGBNiklas Söderlund
The value have nothing to do with ARGB1555, it controls if the alpha component should be filled in for ARGB1555 or ARGB888. Rename it to reflect this. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: omap3isp: Rework OF endpoint parsingSakari Ailus
Rework OF endpoint parsing for the omap3isp driver. This does add some lines of code. The benefits are still clear: - the great complication related to callbacks in endpoint parsing is gone; instead endpoints are obtained port by port and - endpoints may now have a default bus configuration which was not possible while using callbacks. This driver does not benefit from that feature, but as the omap3isp is one of the exemplary drivers, this works as an example for driver developers. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: v4l2-async: Get fwnode reference when putting it to the notifier's listSakari Ailus
The v4l2_async_notifier_add_fwnode_subdev() did not take a reference of the added fwnode, relying on the caller to handle that instead, in essence putting the fwnode to be added if there was an error. As the reference is eventually released during the notifier cleanup, this is not intuitive nor logical. Improve this by always getting a reference when the function succeeds, and the caller releasing the reference when it does not *itself* need it anymore. Luckily, perhaps, there were just a handful of callers using the function. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: davinci-vpif: Don't dereference endpoint after putting it, fix ↵Sakari Ailus
refcounting The davinci-vpif driver dereferences its local endpoints after releasing the reference to them. The driver also puts its endpoints explicitly while the of_graph_get_next_endpoint() does that, too, leading to obtaining a reference once and releasing it twice. Both are fixed by this patch. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: Add support for Cadence CSI2TX 2.1Jan Kotas
This patch adds support for CSI2TX v2.1 version of the controller. Signed-off-by: Jan Kotas <jank@cadence.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: Fix Lane mapping in Cadence CSI2TXJan Kotas
This patch fixes mapping of lanes in DPHY_CFG register of the controller. In the register, bit 0 means first data lane. In Linux we currently assume lane 0 is clock. Signed-off-by: Jan Kotas <jank@cadence.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: Add lane checks for Cadence CSI2TXJan Kotas
This patch adds lane checks for CSI2TX, to prevent clock lane being used as a data lane. Signed-off-by: Jan Kotas <jank@cadence.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: vivid: fix typo: use -> userHans Verkuil
Fix typo in two comments. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: vivid: fix device init when no_error_inj=1 and fb disabledGuillaume Tucker
Add an extra condition to add the video output control class when the device has some hdmi outputs defined. This is required to then always be able to add the display present control, which is enabled when there are some hdmi outputs. This fixes the corner case where no_error_inj is enabled and the device has no frame buffer but some hdmi outputs, as otherwise the video output control class would be added anyway. Without this fix, the sanity checks fail in v4l2_ctrl_new() as name is NULL. Fixes: c533435ffb91 ("media: vivid: add display present control") Cc: stable@vger.kernel.org # for 5.3 Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: am437x: remove unused struct vpfe_pixel_formatHans Verkuil
struct vpfe_pixel_format was defined, but never used. Remove it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: davinci/vpfe_capture.c: drop unused format descriptionsHans Verkuil
Simplify vpfe_pixel_format to just contain the pixelformat and bpp fields. All others are unused. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: sh_veu: convert to struct v4l2_fhHans Verkuil
This driver didn't use struct v4l2_fh, so add it. This is a very basic conversion. I can't test this on real hardware, so I didn't dare to also convert the driver to start using the v4l2-mem2mem ioctl/fop helpers. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: marvell-ccic: mmp: add MODULE_DEVICE_TABLELubomir Rintel
This fixes autoloading the module by the OF compatible string. Fixes: 83c40e6611ec ("media: marvell-ccic/mmp: add devicetree support") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: v4l: ctrls: Add debug messagesEzequiel Garcia
Currently, the v4l2 control code is a bit silent on errors. Add debug messages on (hopefully) most of the error paths. 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-07-25media: rcar-vin: Centralize black listing of pixel formatsNiklas Söderlund
Instead of scattering black listing of pixel formats who are not supported on particular platforms move it to a central location. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-25media: rcar-vin: Clean up correct notifier in error pathNiklas Söderlund
The parallel input initialization error path cleans up the wrong async notifier, fix this by cleaning up the correct notifier. Fixes: 9863bc8695bc36e3 ("media: rcar-vin: Cleanup notifier in error path") Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vimc: stream: format comments as kernel-docAndré Almeida
Format the current existing comments as kernel-doc comments, to be reused at kernel documention. Add opening marks (/**) and return values. Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vimc: stream: fix style of argument descriptionAndré Almeida
As in "Function parameters" at doc-guide/kernel-doc.rst, "the continuation of the description should start at the same column as the previous line". Make the @producer_pixfmt comply with that. Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vimc: stream: remove obsolete function docAndré Almeida
As a more complete version of vimc_streamer_s_streamer comment was added at "media: vimc: stream: add missing function documentation" commit in .c file, remove the old documentation from .h file. Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: mx2_emmaprp: use struct v4l2_fhHans Verkuil
Convert this driver to use struct v4l2_fh and as a result switch to using vb2/v4l2_mem2mem helper functions as well. Only compile-tested due to lack of hardware. This driver is however very similar to the m2m-deinterlace driver in this respect, and that v4l2_fh conversion has been properly tested. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: omap_vout: use struct v4l2_fhHans Verkuil
This driver is one of the few that is still not using struct v4l2_fh. Convert it. Tested on a Pandaboard. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: m2m-deinterlace: use struct v4l2_fhHans Verkuil
Convert this driver to use struct v4l2_fh and as a result switch to using vb2/v4l2_mem2mem helper functions as well. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: ti-vpe: fix leaked of_node referencesWen Yang
The call to of_get_parent returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: drivers/media/platform/ti-vpe/cal.c:1621:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1607, but without a corresponding object release within this function. Signed-off-by: Wen Yang <wen.yang99@zte.com.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: exynos4-is: fix leaked of_node referencesWen Yang
The call to of_get_child_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: drivers/media/platform/exynos4-is/fimc-is.c:813:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 807, but without a corresponding object release within this function. drivers/media/platform/exynos4-is/fimc-is.c:870:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 807, but without a corresponding object release within this function. drivers/media/platform/exynos4-is/fimc-is.c:885:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 807, but without a corresponding object release within this function. drivers/media/platform/exynos4-is/media-dev.c:545:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 541, but without a corresponding object release within this function. drivers/media/platform/exynos4-is/media-dev.c:528:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 499, but without a corresponding object release within this function. drivers/media/platform/exynos4-is/media-dev.c:534:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 499, but without a corresponding object release within this function. Signed-off-by: Wen Yang <wen.yang99@zte.com.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vivid: work around high stack usage with clangArnd Bergmann
Building a KASAN-enabled kernel with clang ends up in a case where too much is inlined into vivid_thread_vid_cap() and the stack usage grows a lot, possibly when the register allocation fails to produce efficient code and spills a lot of temporaries to the stack. This uses more than twice the amount of stack than the sum of the individual functions when they are not inlined: drivers/media/platform/vivid/vivid-kthread-cap.c:766:12: error: stack frame size of 2208 bytes in function 'vivid_thread_vid_cap' [-Werror,-Wframe-larger-than=] Marking two of the key functions in here as 'noinline_for_stack' avoids the pathological case in clang without any apparent downside for gcc. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: via-camera: fix v4l2-compliance failsHans Verkuil
The patch fixes various v4l2-compliance failures: - missing support for control events - support of s/g_std even though this doesn't apply to a webcam - missing colorspace reporting - bus_info wasn't filled in by VIDIOC_QUERYCAP - parm.capture.readbuffers was overridden with wrong value - viacam_enum_framesizes/intervals didn't check the arguments Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: via-camera: use struct v4l2_fhHans Verkuil
Modern V4L2 drivers should use struct v4l2_fh to represent a filehandle. This driver was one of the few that didn't use it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: via-camera: call viafb_pm_unregister in remove()Hans Verkuil
The power management hooks were never unregistered, which caused a crash when unloading the module. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: m2m-deinterlace: Fix misuse of strscpyJoe Perches
Probable cut&paste typo - use the correct field size. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: platform: meson-ao-cec-g12a: add support for SM1Neil Armstrong
Add support for the Amlogic SM1 SoC Family to the G12A AO-CECB derivative. It only adds a single init register. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [hverkuil-cisco@xs4all.nl: dropped spurious newline] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: davinci-vpbe: remove obsolete includesArnd Bergmann
The driver builds fine without these, and they cause build problems once davinci multiplatform support is enabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vivid:add sanity check to avoid divide error and set value to 1 if 0.Vandana BN
Syzbot reported divide error in vivid_thread_vid_cap, which has been seen only once and does not have a reproducer. This patch adds sanity checks for the denominator value with WARN_ON if it is 0 and replaces it with 1. divide error: 0000 [#1] PREEMPT SMP KASAN kobject: 'tx-0' (0000000017161f7f): kobject_uevent_env CPU: 0 PID: 23689 Comm: vivid-003-vid-c Not tainted 5.0.0-rc4+ #58 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:vivid_cap_update_frame_period drivers/media/platform/vivid/vivid-kthread-cap.c:661 [inline] RIP: 0010:vivid_thread_vid_cap+0x221/0x284 drivers/media/platform/vivid/vivid-kthread-cap.c:789 Code: 48 c1 e9 03 0f b6 0c 11 48 89 f2 48 69 c0 00 ca 9a 3b 83 c2 03 38 ca 7c 08 84 c9 0f 85 f0 1e 00 00 41 8b 8f 24 64 00 00 31 d2 <48> f7 f1 49 89 c4 48 89 c3 49 8d 87 28 64 00 00 48 89 c2 48 89 45 RSP: 0018:ffff88808b4afd68 EFLAGS: 00010246 kobject: 'tx-0' (0000000017161f7f): fill_kobj_path: path = '/devices/virtual/net/gre0/queues/tx-0' RAX: 000000de5a6f8e00 RBX: 0000000100047b22 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: ffff88808b4aff00 R08: ffff88804862e1c0 R09: ffffffff89997008 R10: ffffffff89997010 R11: 0000000000000001 R12: 00000000fffffffc R13: ffff8880a17e0500 R14: ffff88803e40f760 R15: ffff8882182b0140 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004cdc90 CR3: 000000005d827000 CR4: 00000000001426f0 Call Trace: kobject: 'gretap0' (00000000d7549098): kobject_add_internal: parent: 'net', set: 'devices' kobject: 'loop2' (0000000094ed4ee4): kobject_uevent_env kobject: 'loop2' (0000000094ed4ee4): fill_kobj_path: path = '/devices/virtual/block/loop2' kthread+0x357/0x430 kernel/kthread.c:246 kobject: 'gretap0' (00000000d7549098): kobject_uevent_env ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Modules linked in: kobject: 'gretap0' (00000000d7549098): fill_kobj_path: path = '/devices/virtual/net/gretap0' ---[ end trace bc5c8b25b64d768f ]--- kobject: 'loop1' (0000000032036b86): kobject_uevent_env RIP: 0010:vivid_cap_update_frame_period drivers/media/platform/vivid/vivid-kthread-cap.c:661 [inline] RIP: 0010:vivid_thread_vid_cap+0x221/0x2840 drivers/media/platform/vivid/vivid-kthread-cap.c:789 kobject: 'loop1' (0000000032036b86): fill_kobj_path: path = '/devices/virtual/block/loop1' Code: 48 c1 e9 03 0f b6 0c 11 48 89 f2 48 69 c0 00 ca 9a 3b 83 c2 03 38 ca 7c 08 84 c9 0f 85 f0 1e 00 00 41 8b 8f 24 64 00 00 31 d2 <48> f7 f1 49 89 c4 48 89 c3 49 8d 87 28 64 00 00 48 89 c2 48 89 45 kobject: 'loop0' (00000000dd9927c3): kobject_uevent_env RSP: 0018:ffff88808b4afd68 EFLAGS: 00010246 RAX: 000000de5a6f8e00 RBX: 0000000100047b22 RCX: 0000000000000000 kobject: 'queues' (000000007ed20666): kobject_add_internal: parent: 'gretap0', set: '<NULL>' RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: ffff88808b4aff00 R08: ffff88804862e1c0 R09: ffffffff89997008 kobject: 'loop0' (00000000dd9927c3): fill_kobj_path: path = '/devices/virtual/block/loop0' R10: ffffffff89997010 R11: 0000000000000001 R12: 00000000fffffffc kobject: 'queues' (000000007ed20666): kobject_uevent_env R13: ffff8880a17e0500 R14: ffff88803e40f760 R15: ffff8882182b0140 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 kobject: 'loop5' (00000000a41f9e79): kobject_uevent_env CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kobject: 'queues' (000000007ed20666): kobject_uevent_env: filter function caused the event to drop! CR2: 00000000004cdc90 CR3: 000000005d827000 CR4: 00000000001426f0 kobject: 'loop5' (00000000a41f9e79): fill_kobj_path: path = '/devices/virtual/block/loop5' Reported-by: syz...@syzkaller.appspotmail.com Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: vivid: fix potential integer overflow on left shiftColin Ian King
There is a potential integer overflow when int 2 is left shifted as this is evaluated using 32 bit arithmetic but is being used in a context that expects an expression of type s64. Fix this by generating a mask using GENMASK to avoid a 32 bit overflow. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 8a99e9faa131 ("media: vivid: add HDMI (dis)connect RX emulation") Fixes: 79a792dafac6 ("media: vivid: add HDMI (dis)connect TX emulation") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: drivers/media: don't set pix->priv = 0Hans Verkuil
The priv field of struct v4l2_pix_format shouldn't be set by drivers, it's set by the v4l2 core instead to V4L2_PIX_FMT_PRIV_MAGIC. Drop this from the few media drivers that still do this. Note that the gspca patch is slightly more involved since some of the sub-gspca drivers use the priv field internally. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [hverkuil-cisco@xs4all.nl: fix clash in gspca between priv arg and priv variable] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: tegra-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use cec_notifier_cec_adap_(un)register instead of cec_notifier_get, cec_notifier_put and cec_register_cec_notifier. Also enable the CEC_CAP_CONNECTOR_INFO capability. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: stih-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use cec_notifier_cec_adap_(un)register instead of cec_notifier_get, cec_notifier_put and cec_register_cec_notifier. Also enable the CEC_CAP_CONNECTOR_INFO capability. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: s5p-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use cec_notifier_cec_adap_(un)register instead of cec_notifier_get, cec_notifier_put and cec_register_cec_notifier. Also enable the CEC_CAP_CONNECTOR_INFO capability. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Sylwester Nawrocki <snawrocki@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: seco-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use cec_notifier_cec_adap_(un)register instead of cec_notifier_get_conn, cec_notifier_put and cec_register_cec_notifier. Also enable the CEC_CAP_CONNECTOR_INFO capability. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Ettore Chimenti <ek5.chimenti@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: cros-ec-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use cec_notifier_cec_adap_(un)register instead of cec_notifier_get_conn, cec_notifier_put and cec_register_cec_notifier. Also enable the CEC_CAP_CONNECTOR_INFO capability. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-23media: meson/ao-cec: use cec_notifier_cec_adap_(un)registerHans Verkuil
Use the new cec_notifier_cec_adap_(un)register() functions to (un)register the notifier for the CEC adapter. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-22media: omap3isp: set device_caps in struct video_deviceHans Verkuil
Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>