aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/soc_camera
AgeCommit message (Collapse)Author
2018-07-19Merge tag 'v4.1.52' into standard/basestandard/tiny/common-pcstandard/tiny/basestandard/qemuarm64standard/fsl-mpc8315e-rdbstandard/edgerouterstandard/beagleboardstandard/baseBruce Ashfield
Linux 4.1.52 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-02-28media: soc_camera: soc_scale_crop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSEJesse Chan
[ Upstream commit 5331aec1bf9c9da557668174e0a4bfcee39f1121 ] This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/media/platform/soc_camera/soc_scale_crop.o see include/linux/module.h for more information This adds the license as "GPL", which matches the header of the file. MODULE_DESCRIPTION and MODULE_AUTHOR are also added. Signed-off-by: Jesse Chan <jc@linux.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
2016-04-22[media] media: rcar_vin: Reject videobufs that are too small for current formatRob Taylor
In videobuf_setup reject buffers that are too small for the configured format. Fixes v4l2-compliance issue. Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> Reviewed-by: William Towle <william.towle@codethink.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> (cherry picked from commit 4284118058b2b4f217a050908a555d0e1ed58641) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-22[media] media: rcar_vin: fill in bus_info fieldRob Taylor
Adapt rcar_vin_querycap() so that cap->bus_info is populated with something meaningful/unique. Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> Signed-off-by: William Towle <william.towle@codethink.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> (cherry picked from commit 734f3f238587ffb6938700c4495dd5b5a54c4125) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-22[media] media: soc_camera: rcar_vin: Add BT.709 24-bit RGB888 input supportWilliam Towle
This adds V4L2_MBUS_FMT_RGB888_1X24 input format support which is used by the ADV7612 chip. Modified to use MEDIA_BUS_FMT_* constants Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: William Towle <william.towle@codethink.co.uk> Reviewed-by: Rob Taylor <rob.taylor@codethink.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> (cherry picked from commit 920a1bf30a361fc2c6d713a26deb3a488639def3) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-22[media] rcar-vin: use monotonic timestampsHans Verkuil
Even though the rcar-vin driver tells userspace that it will give a monotonic timestamp, it is actually using gettimeofday. Replace this with a proper monotonic timestamp. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> (cherry picked from commit b9143e5ac5089561e857e223f7750b85a1951547) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-04-27[media] media: soc_camera: rcar_vin: Fix wait_for_completionKoji Matsuoka
When stopping abnormally, a driver can't return from wait_for_completion. This patch resolved this problem by changing wait_for_completion_timeout from wait_for_completion. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-21Merge branch 'drm-next-merged' of ↵Mauro Carvalho Chehab
git://people.freedesktop.org/~airlied/linux into v4l_for_linus * 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits) media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format hexdump: avoid warning in test function fs: take i_mutex during prepare_binprm for set[ug]id executables smp: Fix error case handling in smp_call_function_*() iommu-common: Fix PARISC compile-time warnings sparc: Make LDC use common iommu poll management functions sparc: Make sparc64 use scalable lib/iommu-common.c functions Break up monolithic iommu table/lock into finer graularity pools and lock sparc: Revert generic IOMMU allocator. tools/power turbostat: correct dumped pkg-cstate-limit value tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL tools/power turbostat: correct DRAM RAPL units on recent Xeon processors tools/power turbostat: Initial Skylake support tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile tools/power turbostat: modprobe msr, if needed tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2 tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names Bluetooth: hidp: Fix regression with older userspace and flags validation config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected perf/x86/intel/pt: Fix and clean up error handling in pt_event_add() ... That solves several merge conflicts: Documentation/DocBook/media/v4l/subdev-formats.xml Documentation/devicetree/bindings/vendor-prefixes.txt drivers/staging/media/mn88473/mn88473.c include/linux/kconfig.h include/uapi/linux/media-bus-format.h The ones at subdev-formats.xml and media-bus-format.h are not trivial. That's why we opted to merge from DRM.
2015-04-21Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab
* patchwork: (404 commits) [media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRL [media] uvcvideo: fix cropcap v4l2-compliance failure [media] media: omap3isp: remove unused clkdev [media] coda: Add tracing support [media] coda: drop dma_sync_single_for_device in coda_bitstream_queue [media] coda: fix fill bitstream errors in nonstreaming case [media] coda: call SEQ_END when the first queue is stopped [media] coda: fail to start streaming if userspace set invalid formats [media] coda: remove duplicate error messages for buffer allocations [media] coda: move parameter buffer in together with context buffer allocation [media] coda: allocate bitstream buffer from REQBUFS, size depends on the format [media] coda: allocate per-context buffers from REQBUFS [media] coda: use strlcpy instead of snprintf [media] coda: bitstream payload is unsigned [media] coda: fix double call to debugfs_remove [media] coda: check kasprintf return value in coda_open [media] coda: bitrate can only be set in kbps steps [media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove [media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init [media] coda: set allow_zero_bytesused flag for vb2_queue_init ...
2015-04-18Merge tag 'devicetree-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux Pull devicetree changes from Grant Likely: "Here are the devicetree changes queued up for v4.1. Nothing really exciting here. Rob has another few commits for big-endian attached UARTs, but those will be sent in a separate merge request since they haven't been as thoroughly tested as this batch. Here are the highlights: - lots of unittest cleanup from Frank Rowand - bugfixes and updates to the of_graph code - tighten up of_get_mac_address() code - documentation updates" * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: of/unittest: Fix of_platform_depopulate test case of/unittest: early return from test skips tests of/unittest: breadcrumbs to reduce pain of future maintainers of/unittest: reduce checkpatch noise - line after declarations of/unittest: typo in error string of/unittest: add const where needed of_net: factor out repetitive code from of_get_mac_address() drivers/of: Add empty ranges quirk for PA-Semi of: Allow selection of OF_DYNAMIC and OF_OVERLAY if OF_UNITTEST of: Empty node & property flag accessors when !OF of: Explicitly include linux/types.h in of_graph.h dt-bindings: brcm: rationalize Broadcom documentation naming of/unittest: replace 'selftest' with 'unittest' Documentation: rename of_selftest.txt to of_unittest.txt Documentation: update the of_selftest.txt dt: OF_UNITTEST make dependency broken MAINTAINERS: Pantelis Antoniou device tree overlay maintainer of: Add of_graph_get_port_by_id function of: Add for_each_endpoint_of_node helper macro of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint
2015-04-02[media] rcar-vin: Don't implement empty optional clock operationsLaurent Pinchart
The clock_start and clock_stop operations are now optional, don't implement empty stubs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] soc-camera: Make clock_start and clock_stop operations optionalLaurent Pinchart
Instead of forcing drivers to implement empty clock operations, make them optional. v4l2 clock registration in the soc-camera core should probably be conditionned on the availability of those operations, but careful review and/or testing of all drivers would be needed, so that should be a separate step. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] soc-camera: Unregister v4l2 clock in the OF bind error pathLaurent Pinchart
The v4l2 clock registered in soc_of_bind() must be unregistered if an error occurs and makes the function fail. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] media: soc-camera: use icd->control instead of icd->pdev for reset()Josh Wu
icd->control is the sub device dev, i.e. i2c device. icd->pdev is the soc camera device's device. To be consitent with power() function, we will call reset() with icd->control as well. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] V4L: remove clock name from v4l2_clk APIGuennadi Liakhovetski
All uses of the v4l2_clk API so far only register one clock with a fixed name. This allows us to get rid of it, which also will make CCF and DT integration easier. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-23[media] v4l2-subdev: add support for the new enum_frame_interval 'which' fieldHans Verkuil
Support the new 'which' field in the enum_frame_interval ops. Most drivers do not need to be changed since they always returns the same enumeration regardless of the 'which' field. Tested for ov7670 and marvell-ccic on a OLPC XO-1 laptop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] media: drop call to v4l2_device_unregister_subdev()Lad, Prabhakar
These drivers are moved to support asynchronous probing, v4l2_async_unregister_subdev() unregisters the subdev so there isn't a need to explicitly call v4l2_device_unregister_subdev(). Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] soc-camera: Fix devm_kfree() in soc_of_bind()Geert Uytterhoeven
Unlike scan_async_group(), soc_of_bind() doesn't allocate its soc_camera_async_client structure using devm_kzalloc(), but has it embedded inside the soc_of_info structure. Hence on failure, it must free the whole soc_of_info structure, and not just the embedded soc_camera_async_client structure, as the latter causes a warning, and may cause slab corruption: soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/base/devres.c:887 devm_kfree+0x30/0x40() CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-shmobile-08386-g37feb0d093cb2d8e #128 Hardware name: Generic R8A7791 (Flattened Device Tree) Backtrace: [<c0011e7c>] (dump_backtrace) from [<c0012024>] (show_stack+0x18/0x1c) r6:c05a923b r5:00000009 r4:00000000 r3:00204140 [<c001200c>] (show_stack) from [<c048ed30>] (dump_stack+0x78/0x94) [<c048ecb8>] (dump_stack) from [<c002687c>] (warn_slowpath_common+0x8c/0xb8) r4:00000000 r3:00000000 [<c00267f0>] (warn_slowpath_common) from [<c0026980>] (warn_slowpath_null+0x24/0x2c) r8:ee7d8214 r7:ed83b810 r6:ed83bc20 r5:fffffffa r4:ed83e510 [<c002695c>] (warn_slowpath_null) from [<c025e0cc>] (devm_kfree+0x30/0x40) [<c025e09c>] (devm_kfree) from [<c032bbf4>] (soc_of_bind.isra.14+0x194/0x1d4) [<c032ba60>] (soc_of_bind.isra.14) from [<c032c6b8>] (soc_camera_host_register+0x208/0x31c) r9:00000070 r8:ee7e05d0 r7:ee153210 r6:00000000 r5:ee7e0218 r4:ed83bc20 [<c032c4b0>] (soc_camera_host_register) from [<c032e80c>] (rcar_vin_probe+0x1f4/0x238) r8:ee153200 r7:00000008 r6:ee153210 r5:ed83bc10 r4:c066319c r3:000000c0 [<c032e618>] (rcar_vin_probe) from [<c025c334>] (platform_drv_probe+0x50/0xa0) r10:00000000 r9:c0662fa8 r8:00000000 r7:c06a3700 r6:c0662fa8 r5:ee153210 r4:00000000 [<c025c2e4>] (platform_drv_probe) from [<c025af08>] (driver_probe_device+0xc4/0x208) r6:c06a36f4 r5:00000000 r4:ee153210 r3:c025c2e4 [<c025ae44>] (driver_probe_device) from [<c025b108>] (__driver_attach+0x70/0x94) r9:c066f9c0 r8:c0624a98 r7:c065b790 r6:c0662fa8 r5:ee153244 r4:ee153210 [<c025b098>] (__driver_attach) from [<c025984c>] (bus_for_each_dev+0x74/0x98) r6:c025b098 r5:c0662fa8 r4:00000000 r3:00000001 [<c02597d8>] (bus_for_each_dev) from [<c025b1dc>] (driver_attach+0x20/0x28) r6:ed83c200 r5:00000000 r4:c0662fa8 [<c025b1bc>] (driver_attach) from [<c025a00c>] (bus_add_driver+0xdc/0x1c4) [<c0259f30>] (bus_add_driver) from [<c025b8f4>] (driver_register+0xa4/0xe8) r7:c0624a98 r6:00000000 r5:c060b010 r4:c0662fa8 [<c025b850>] (driver_register) from [<c025ccd0>] (__platform_driver_register+0x50/0x64) r5:c060b010 r4:ed8394c0 [<c025cc80>] (__platform_driver_register) from [<c060b028>] (rcar_vin_driver_init+0x18/0x20) [<c060b010>] (rcar_vin_driver_init) from [<c05edde8>] (do_one_initcall+0x108/0x1b8) [<c05edce0>] (do_one_initcall) from [<c05edfb4>] (kernel_init_freeable+0x11c/0x1e4) r9:c066f9c0 r8:c066f9c0 r7:c062eab0 r6:c06252c4 r5:000000ad r4:00000006 [<c05ede98>] (kernel_init_freeable) from [<c048c3d0>] (kernel_init+0x10/0xec) r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c048c3c0 r4:00000000 [<c048c3c0>] (kernel_init) from [<c000eba0>] (ret_from_fork+0x14/0x34) r4:00000000 r3:ee04e000 ---[ end trace e3a984cc0335c8a0 ]--- rcar_vin e6ef1000.video: group probe failed: -6 Fixes: 1ddc6a6caa94e1e1 ("[media] soc_camera: add support for dt binding soc_camera drivers") Cc: <stable@vger.kernel.org> # 3.17+ Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] media: atmel-isi: increase the burst length to improve the performanceJosh Wu
The burst length could be BEATS_4/8/16. Before this patch, isi use default value BEATS_4. To imporve the performance we could set it to BEATS_16. Otherwise sometime it would cause the ISI overflow error. Reported-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-23of: Decrement refcount of previous endpoint in of_graph_get_next_endpointPhilipp Zabel
Decrementing the reference count of the previous endpoint node allows to use the of_graph_get_next_endpoint function in a for_each_... style macro. All current users of this function that pass a non-NULL prev parameter (that is, soc_camera and imx-drm) are changed to not decrement the passed prev argument's refcount themselves. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-02[media] rcar_vin: move buffer management to .stop_streaming handlerWilliam Towle
This commit moves the "buffer in use" logic from the .buf_cleanup handler into .stop_streaming, based on advice that this is its proper logical home. By ensuring the list of pointers in priv->queue_buf[] is managed as soon as possible, we avoid warnings concerning buffers in ACTIVE state when the system cleans up after streaming stops. This fixes a problem with modification of buffers after their content has been cleared for passing to userspace. After the refactoring, the buf_init and buf_cleanup functions were found to contain only initialisation/release steps as are carried out elsewhere if omitted; these functions and references were removed. Signed-off-by: William Towle <william.towle@codethink.co.uk> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] rcar_vin: helper function for streaming stopIan Molton
The code that tests that capture from a stream has stopped is presently insufficient and the potential for a race condition exists where frame capture may generate an interrupt between requesting the capture process halt and freeing buffers. This patch refactors code out of rcar_vin_videobuf_release() and into rcar_vin_wait_stop_streaming(), and ensures there are calls in places where we need to know that capturing has finished. Signed-off-by: Ian Molton <ian.molton@codethink.co.uk> Signed-off-by: William Towle <william.towle@codethink.co.uk> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] soc-camera: remove redundant codeGuennadi Liakhovetski
A hunk, removing this code has been lost between versions 6 and 7 of patch "soc-camera: add V4L2-async support." The code is harmless, but redundant. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] soc_camera: use vb2_ops_wait_prepare/finish helperLad, Prabhakar
This patch drops driver specific wait_prepare() and wait_finish() callbacks from vb2_ops and instead uses the the helpers vb2_ops_wait_prepare/finish() provided by the vb2 core, the lock member of the queue needs to be initalized to a mutex so that vb2 helpers vb2_ops_wait_prepare/finish() can make use of it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Josh Wu <josh.wu@atmel.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-24Merge tag 'media/v3.19-4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - fix some race conditions caused by a regression on videobuf2 - fix a interrupt release bug on cx23885 - fix support for Mygica T230 and HVR4400 - fix compilation breakage when USB is not selected on tlg2300 - fix capabilities report on ompa3isp, soc-camera, rcar_vin and pvrusb2 * tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] omap3isp: Correctly set QUERYCAP capabilities [media] cx23885: fix free interrupt bug [media] pvrusb2: fix missing device_caps in querycap [media] vb2: fix vb2_thread_stop race conditions [media] rcar_vin: Update device_caps and capabilities in querycap [media] soc-camera: fix device capabilities in multiple camera host drivers [media] Fix Mygica T230 support [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry [media] tlg2300: Fix media dependencies
2015-01-21[media] rcar_vin: Update device_caps and capabilities in querycapNobuhiro Iwamatsu
The V4L2 API requires both .capabilities and .device_caps fields of struct v4l2_capability to be set. Otherwise the compliance checker complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill device_caps" a compile-time warning is issued. Fix this non-compliance in the rcar_vin driver. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-21[media] soc-camera: fix device capabilities in multiple camera host driversGuennadi Liakhovetski
The V4L2 API requires both .capabilities and .device_caps fields of struct v4l2_capability to be set. Otherwise the compliance checker complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill device_caps" a compile-time warning is issued. Fix this non-compliance in several soc-camera camera host drivers. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-18Merge tag 'media/v3.19-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull second set of media updates from Mauro Carvalho Chehab: - Move drivers for really old legacy hardware to staging. Those are using obsolete media kAPIs and are for hardware that nobody uses for years. Simply not worth porting them to the new kAPIs. Of course, if anyone pops up to fix, we can move them back from there - While not too late, do some API fixups at the new colorspace API, added for v3.19 - Some improvements for rcar_vin driver - Some fixups at cx88 and vivid drivers - Some Documentation fixups * tag 'media/v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal [media] tlg2300: move to staging in preparation for removal [media] vino/saa7191: move to staging in preparation for removal [media] MAINTAINERS: vivi -> vivid [media] cx88: remove leftover start_video_dma() call [media] cx88: add missing alloc_ctx support [media] v4l2-ioctl: WARN_ON if querycap didn't fill device_caps [media] vivid: fix CROP_BOUNDS typo for video output [media] DocBook media: update version number and document changes [media] vivid.txt: document new controls [media] DocBook media: add missing ycbcr_enc and quantization fields [media] v4l2-mediabus.h: use two __u16 instead of two __u32 [media] rcar_vin: Fix interrupt enable in progressive [media] rcar_vin: Enable VSYNC field toggle mode [media] rcar_vin: Add scaling support [media] rcar_vin: Add DT support for r8a7793 and r8a7794 SoCs [media] rcar_vin: Add YUYV capture format support
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-12[media] rcar_vin: Fix interrupt enable in progressiveKoji Matsuoka
The progressive input is captured by the field interrupt. Therefore the end of frame interrupt is unnecessary. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-12[media] rcar_vin: Enable VSYNC field toggle modeKoji Matsuoka
By applying this patch, it sets to VSYNC field toggle mode not only at the time of progressive mode but at the time of an interlace mode. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-12[media] rcar_vin: Add scaling supportKoji Matsuoka
Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> [g.liakhovetski@gmx.de: minor stylistic and formatting corrections] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-12[media] rcar_vin: Add DT support for r8a7793 and r8a7794 SoCsYoshihiro Kaneko
Based on platform device work by Matsuoka-san. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-12[media] rcar_vin: Add YUYV capture format supportKoji Matsuoka
Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] platform: Make use of media_bus_format enumBoris BREZILLON
In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-20media: platform: soc_camera: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-18Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds
Pull slave-dmaengine updates from Vinod Koul: "For dmaengine contributions we have: - designware cleanup by Andy - my series moving device_control users to dmanegine_xxx APIs for later removal of device_control API - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma etc" * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits) serial: atmel: add missing dmaengine header dmaengine: remove FSLDMA_EXTERNAL_START dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method carma-fpga: move to fsl_dma_external_start() carma-fpga: use dmaengine_xxx() API dmaengine: freescale: add and export fsl_dma_external_start() dmaengine: add dmaengine_prep_dma_sg() helper video: mx3fb: use dmaengine_terminate_all() API serial: sh-sci: use dmaengine_terminate_all() API net: ks8842: use dmaengine_terminate_all() API mtd: sh_flctl: use dmaengine_terminate_all() API mtd: fsmc_nand: use dmaengine_terminate_all() API V4L2: mx3_camer: use dmaengine_pause() API dmaengine: coh901318: use dmaengine_terminate_all() API pata_arasan_cf: use dmaengine_terminate_all() API dmaengine: edma: check for echan->edesc => NULL in edma_dma_pause() dmaengine: dw: export probe()/remove() and Co to users dmaengine: dw: enable and disable controller when needed dmaengine: dw: always export dw_dma_{en,dis}able dmaengine: dw: introduce dw_dma_on() helper ...
2014-10-15V4L2: mx3_camer: use dmaengine_pause() APIVinod Koul
The drivers should use dmaengine_pause() API instead of accessing the device_control which will be deprecated soon Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-26[media] soc_camera: Support VIDIOC_EXPBUF ioctlKazunori Kobayashi
This patch allows for exporting a dmabuf descriptor from soc_camera drivers. Signed-off-by: Kazunori Kobayashi <kkobayas@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] mx2-camera: potential negative underflow bugDan Carpenter
My static checker complains: drivers/media/platform/soc_camera/mx2_camera.c:1070 mx2_emmaprp_resize() warn: no lower bound on 'num' The heuristic is that it's looking for values which the user can influence and we put an upper bound on them but we (perhaps accidentally) allow negative numbers. I am not very familiar with this code but I have looked at it and think there might be a bug. Making the variable unsigned seems like a safe option either way and this silences the static checker warning. The call tree is: -> subdev_do_ioctl() -> mx2_camera_set_fmt() -> mx2_emmaprp_resize() The check: if (num > RESIZE_NUM_MAX) can underflow and then we use "num" on the else path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] rcar_vin: fix error message in rcar_vin_get_formats()Sergei Shtylyov
The dev_err() call is supposed to output <width>x<height> in decimal but one of the format specifiers is "%x" instead of "%u" (most probably due to a typo). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-09[media] disable COMPILE_TEST for omap1_cameraMauro Carvalho Chehab
This driver depends on a legacy OMAP DMA API. So, it won't compile-test on other archs. While we might add stubs to the functions, this is not a good idea, as the hole API should be replaced. So, for now, let's just remove COMPILE_TEST and wait for some time for people to fix. If not fixed, then we'll end by removing this driver as a hole. Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] soc_camera: remove uneeded semicolonsMauro Carvalho Chehab
We don't use semicolons after curly braces in the middle of the code. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] soc_camera: use kmemdup()Mauro Carvalho Chehab
Instead of calling kzalloc and then copying, use kmemdup(). That avoids zeroing the data structure before copying. Found by coccinelle. Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] be sure that HAS_DMA is enabled for vb2-dma-contigMauro Carvalho Chehab
vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take it into account at select. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] enable COMPILE_TEST for media driversMauro Carvalho Chehab
There are several arch-specific media drivers that don't require asm-specific includes and can be successfully compiled on x86. Add COMPILE_TEST dependency for them, in order to allow a broader test on those drivers. That helps static analysis tools like Coverity to discover eventual troubles there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] atmel-isi: get rid of a warningMauro Carvalho Chehab
drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming': drivers/media/platform/soc_camera/atmel-isi.c:387:6: warning: variable 'sr' set but not used [-Wunused-but-set-variable] u32 sr = 0; ^ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] mx2_camera: get rid of a warningMauro Carvalho Chehab
drivers/media/platform/soc_camera/mx2_camera.c: In function 'mx27_camera_emma_prp_reset': drivers/media/platform/soc_camera/mx2_camera.c:812:6: warning: variable 'cntl' set but not used [-Wunused-but-set-variable] u32 cntl; ^ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] atmel-isi: Fix a truncate warningMauro Carvalho Chehab
drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming': drivers/media/platform/soc_camera/atmel-isi.c:397:26: warning: large integer implicitly truncated to unsigned type [-Woverflow] isi_writel(isi, ISI_INTDIS, ~0UL); ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] atmel-isi: tag dma_addr_t as suchMauro Carvalho Chehab
Instead of using u32 for DMA address, use the proper Kernel type for it. drivers/media/platform/soc_camera/atmel-isi.c: In function 'atmel_isi_probe': >> drivers/media/platform/soc_camera/atmel-isi.c:981:26: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type isi->p_fb_descriptors = dma_alloc_coherent(&pdev->dev, ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>