summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
Commit message (Collapse)AuthorAgeFilesLines
* media: vsp1: fix memory leak of dl on error return pathColin Ian King2019-08-141-1/+3
| | | | | | | | | | | | | | Currently when the call vsp1_dl_body_get fails and returns null the error return path leaks the allocation of dl. Fix this by kfree'ing dl before returning. Addresses-Coverity: ("Resource leak") Fixes: 5d7936b8e27d ("media: vsp1: Convert display lists to use new body pool") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: exynos4-is: Remove call to memset after dma_alloc_coherentFuqian Huang2019-08-131-1/+0
| | | | | | | | | | | | In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: platform: mtk-mdp: mtk_mdp_core: Add of_node_put() before gotoNishka Dasgupta2019-08-131-1/+4
| | | | | | | | | | | | | Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto in two places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Acked-by: Houlong Wei <houlong.wei@mediatek.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: fdp1: Reduce FCP not found message level to debugGeert Uytterhoeven2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | When support for the IPMMU is not enabled, the FDP driver may be probe-deferred multiple times, causing several messages to be printed like: rcar_fdp1 fe940000.fdp1: FCP not found (-517) rcar_fdp1 fe944000.fdp1: FCP not found (-517) Fix this by reducing the message level to debug level, as is done in the VSP1 driver. Fixes: 4710b752e029f3f8 ("[media] v4l: Add Renesas R-Car FDP1 Driver") Signed-off-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>
* media: mtk-mdp: fix reference count on old device treeMatthias Brugger2019-08-131-1/+3
| | | | | | | | | | | | | of_get_next_child() increments the reference count of the returning device_node. Decrement it in the check if we are using the old or the new DTB. Fixes: ba1f1f70c2c0 ("[media] media: mtk-mdp: Fix mdp device tree") Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Acked-by: Houlong Wei <houlong.wei@mediatek.com> [hverkuil-cisco@xs4all.nl: use node instead of parent as temp variable] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: Revert "media: vimc: propagate pixel format in the stream"Helen Koike2019-08-138-308/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b6c61a6c37317efd7327199bfe24770af3d7e799. The requested pixelformat is being propagated from the capture to the tpg in the sensor. This was a bad design choice, as we start having the following issues: * We set a pixelformat in the capture; * We set matching media bus formats in the subdevices pads; * Link validate looks fine (sizes matches, media bus formats matches); * Issue: if some of the subdevice doesn't know how to generate the requested pixelformat in the capture, then stream_on fails. This is bad because capture says it supports that pixelformat, everything looks fine, but it is not, and there is no way to find it out through the links. This patch was implemented so we could request any pixelformat from the pipeline regardeless of the media bus format configured between pads. Not all pixelformat can be mapped into a media bus code (e.g. multiplanar formats), so with this patch we could request those pixelformats from the tpg. Solution: map pixelformats to media bus codes as before, and implement conversions to other pixelformats in the capture to support multiplanar. So first step to this solution is to revert this patch. Signed-off-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Lucas A. M. Magalhaes <lucmaga@gmail.com> Tested-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>
* media: Revert "media: vimc: Remove or modify stream checks"Helen Koike2019-08-133-4/+14
| | | | | | | | | | | | This reverts commit 3c1b9ac753e99005d7ee0a883d6e5b577ba32aa9. Required to Revert "media: vimc: propagate pixel format in the stream" which introduced the stream object in the vimc_ent_device struct. Signed-off-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Lucas A. M. Magalhaes <lucmaga@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: rcar-vin: Report correct image strideNiklas Söderlund2019-08-132-5/+10
| | | | | | | | | | | The image stride was adjusted when it was written to hardware and not when configuring the format. Calculate the correct stride value and report it to userspace. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: omap_vout: convert to vb2Hans Verkuil2019-08-135-754/+181
| | | | | | | | | | | | Convert omap_vout to the vb2 framework. After this change 'v4l2-compliance -s' passes all tests. As usual, this vb2 conversion is a 'big bang' patch and hard to read. Tested on a Pandaboard and a Beagle XM board. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: omap_vout: fix various v4l2-compliance failuresHans Verkuil2019-08-132-42/+134
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following v4l2-compliance failures: - FIELD_ANY could be returned, which is not allowed. - JPEG colorspace was set instead of SRGB. - No control events. - Empty bus_info in QUERYCAP. - Overlay format handling wasn't zeroing bitmap/clips and didn't return the chromakey correctly. - G_FBUF didn't fill in many of the v4l2_framebuffer values. Now also return the base address of the corresponding framebuffer that this overlays. - Missing ENUM/G/S_OUTPUT ioctls. - ROTATE/VFLIP controls were added when the HW didn't support them. With these changes 'v4l2-compliance' passes all non-streaming tests. Tested on a Pandaboard and a Beagle XM board. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* Merge tag 'v5.3-rc4' into patchworkMauro Carvalho Chehab2019-08-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 5.3-rc4 * tag 'v5.3-rc4': (750 commits) Linux 5.3-rc4 Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang ARM: ep93xx: Mark expected switch fall-through scsi: fas216: Mark expected switch fall-throughs pcmcia: db1xxx_ss: Mark expected switch fall-throughs video: fbdev: omapfb_main: Mark expected switch fall-throughs watchdog: riowd: Mark expected switch fall-through s390/net: Mark expected switch fall-throughs crypto: ux500/crypt: Mark expected switch fall-throughs watchdog: wdt977: Mark expected switch fall-through watchdog: scx200_wdt: Mark expected switch fall-through watchdog: Mark expected switch fall-throughs ARM: signal: Mark expected switch fall-through mfd: omap-usb-host: Mark expected switch fall-throughs mfd: db8500-prcmu: Mark expected switch fall-throughs ARM: OMAP: dma: Mark expected switch fall-throughs ARM: alignment: Mark expected switch fall-throughs ARM: tegra: Mark expected switch fall-through ARM/hw_breakpoint: Mark expected switch fall-throughs mm/memremap: Fix reuse of pgmap instances with internal references ...
| * media: vivid: fix missing cec adapter nameHans Verkuil2019-07-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: Remove dev_err() usage after platform_get_irq()Stephen Boyd2019-08-0712-41/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: media/platform: fsl-viu.c: fix build for MICROBLAZERandy Dunlap2019-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/microblaze/ defines out_be32() and in_be32(), so don't do that again in the driver source. Fixes these build warnings: ../drivers/media/platform/fsl-viu.c:36: warning: "out_be32" redefined ../arch/microblaze/include/asm/io.h:50: note: this is the location of the previous definition ../drivers/media/platform/fsl-viu.c:37: warning: "in_be32" redefined ../arch/microblaze/include/asm/io.h:53: note: this is the location of the previous definition Fixes: 29d750686331 ("media: fsl-viu: allow building it with COMPILE_TEST") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: mtk-vcodec: Handle H264 error bitstreamsRui Wang2019-08-071-2/+14
| | | | | | | | | | | | | | | | | | | | Error h264 bitstreams which picture info are out range of decoder hardware specification, and no nal start code at the beginning of the buffer, stop decoding and exit. Signed-off-by: Rui Wang <gtk_ruiwang@mediatek.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: vicodec: add support for 4 new RGB32 pixelformatsHans Verkuil2019-08-071-2/+28
| | | | | | | | | | | | | | Add support for V4L2_PIX_FMT_BGRA/X32 and V4L2_PIX_FMT_RGBA/X32 formats. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: dec: populate properly timestamps and flags for capture buffersStanimir Varbanov2019-08-054-0/+67
| | | | | | | | | | | | | | | | | | | | | | Cache flags, timestamps and timecode structure of OUTPUT buffers in per-instance structure array and fill correctly the same when the CAPTURE buffers are done. This will make v4l2-compliance decoder streaming test happy. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: helpers: handle correctly vbuf fieldStanimir Varbanov2019-08-051-0/+11
| | | | | | | | | | | | | | | | Correct handling of OUTPUT buffers field and make v4l2-compliance happy. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: make decoder compliant with stateful codec APIStanimir Varbanov2019-08-053-132/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | This refactors code for start/stop streaming vb2 operations and adds a state machine handling similar to the one in stateful codec API documentation. One major change is that now the HFI session is started on STREAMON(OUTPUT) and stopped on REQBUF(OUTPUT,count=0), during that time STREAMOFF(CAP,OUT) just flush buffers but doesn't stop the session. The other major change is that now the capture and output queues are completely separated. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: vdec: allow bigger sizeimage set by clientsStanimir Varbanov2019-08-051-5/+11
| | | | | | | | | | | | | | | | | | | | In most of the cases the client will know better what could be the maximum size for compressed data buffers. Change the driver to permit the user to set bigger size for the compressed buffer but make reasonable sanitation. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: vdec_ctrls: get real minimum buffers for captureStanimir Varbanov2019-08-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | Until now we returned num_output_bufs set during reqbuf but that could be wrong when we implement stateful Codec API. So get the minimum buffers for capture from HFI. This is supposed to be called after stream header parsing, i.e. after dequeue v4l2 event for change resolution. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: helpers: add three more helper functionsStanimir Varbanov2019-08-052-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds three more helper functions: * for internal buffers reallocation, applicable when we are doing dynamic resolution change * for initial buffer processing of capture and output queue buffer types All of them will be needed for stateful Codec API support. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: hfi: return an error if session_init is already calledStanimir Varbanov2019-08-051-0/+3
| | | | | | | | | | | | | | | | This makes hfi_session_init to return an error when it is already called without a call to hfi_session_deinit. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: venus: hfi: export few HFI functionsStanimir Varbanov2019-08-051-0/+4
| | | | | | | | | | | | | | | | Export few HFI functions 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>
* | media: venus: hfi: add type argument to hfi flush functionStanimir Varbanov2019-08-052-3/+3
| | | | | | | | | | | | | | | | 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>
* | media: venus: helpers: export few helper functionsStanimir Varbanov2019-08-052-12/+23
| | | | | | | | | | | | | | | | | | 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>
* | media: venus: venc: amend buffer size for bitstream planeMalathi Gottam2019-08-051-4/+9
| | | | | | | | | | | | | | | | | | | | 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>
* | media: via-camera: convert to the vb2 frameworkHans Verkuil2019-07-302-335/+159
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: vivid: add support for new pixelformatsHans Verkuil2019-07-301-3/+129
| | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Always setup controls when opening video deviceNiklas Söderlund2019-07-251-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Add support for RGB formats with alpha componentNiklas Söderlund2019-07-252-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Add control for alpha componentNiklas Söderlund2019-07-253-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Rename VNDMR_DTMD_ARGB1555 to VNDMR_DTMD_ARGBNiklas Söderlund2019-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: omap3isp: Rework OF endpoint parsingSakari Ailus2019-07-251-134/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: v4l2-async: Get fwnode reference when putting it to the notifier's listSakari Ailus2019-07-254-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: davinci-vpif: Don't dereference endpoint after putting it, fix ↵Sakari Ailus2019-07-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: Add support for Cadence CSI2TX 2.1Jan Kotas2019-07-251-29/+111
| | | | | | | | | | | | | | | | | | 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>
* | media: Fix Lane mapping in Cadence CSI2TXJan Kotas2019-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | media: Add lane checks for Cadence CSI2TXJan Kotas2019-07-251-2/+11
| | | | | | | | | | | | | | | | | | | | 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>
* | media: vivid: fix typo: use -> userHans Verkuil2019-07-251-2/+2
| | | | | | | | | | | | | | Fix typo in two comments. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: vivid: fix device init when no_error_inj=1 and fb disabledGuillaume Tucker2019-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: am437x: remove unused struct vpfe_pixel_formatHans Verkuil2019-07-251-6/+0
| | | | | | | | | | | | | | | | 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>
* | media: davinci/vpfe_capture.c: drop unused format descriptionsHans Verkuil2019-07-251-42/+9
| | | | | | | | | | | | | | | | | | 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>
* | media: sh_veu: convert to struct v4l2_fhHans Verkuil2019-07-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* | media: marvell-ccic: mmp: add MODULE_DEVICE_TABLELubomir Rintel2019-07-251-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | media: v4l: ctrls: Add debug messagesEzequiel Garcia2019-07-251-2/+2
| | | | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Centralize black listing of pixel formatsNiklas Söderlund2019-07-253-13/+16
| | | | | | | | | | | | | | | | | | | | 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>
* | media: rcar-vin: Clean up correct notifier in error pathNiklas Söderlund2019-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | media: vimc: stream: format comments as kernel-docAndré Almeida2019-07-231-14/+24
| | | | | | | | | | | | | | | | | | 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>
* | media: vimc: stream: fix style of argument descriptionAndré Almeida2019-07-231-4/+6
| | | | | | | | | | | | | | | | | | | | 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>