aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/soc_camera
AgeCommit message (Collapse)Author
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>
2014-07-30[media] media: atmel-isi: add primary DT supportJosh Wu
This patch add the DT support for Atmel ISI driver. It use the same v4l2 DT interface that defined in video-interfaces.txt. Signed-off-by: Josh Wu <josh.wu@atmel.com> Cc: devicetree@vger.kernel.org Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] media: atmel-isi: convert the pdata from pointer to structureJosh Wu
Now the platform data is initialized by allocation of isi structure. In the future, we use pdata to store the dt parameters. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] media: atmel-isi: add v4l2 async probe supportJosh Wu
Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] rcar_vin: add devicetree supportBen Dooks
Add support for devicetree probe for the rcar-vin driver. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> [g.liakhovetski@gmx.de fix a typo, sort headers alphabetically] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] media: pxa_camera device-tree supportRobert Jarzmik
Add device-tree support to pxa_camera host driver. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> [g.liakhovetski@gmx.de: added of_node_put()] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] soc_camera: add support for dt binding soc_camera driversBen Dooks
Add initial support for OF based soc-camera devices that may be used by any of the soc-camera drivers. The driver itself will need converting to use OF. These changes allow the soc-camera driver to do the connecting of any async capable v4l2 device to the soc-camera driver. This has currently been tested on the Renesas Lager board. It currently only supports one input device per driver as this seems to be the standard connection for these devices. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> [g.liakhovetski@gmx.de add check for multiple subdevices] Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] V4L2: soc_camera: Add run-time dependencies to sh_mobile driversJean Delvare
The sh_mobile_ceu_camera and sh_mobile_csi2 drivers are only useful on SuperH and shmobile unless build testing. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] media: mx2_camera: Change Kconfig dependencyAlexander Shiyan
This patch change MACH_MX27 dependency to SOC_IMX27 for MX2 camera driver, since MACH_MX27 symbol is scheduled for removal. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] media: mx1_camera: Remove driverAlexander Shiyan
That driver hasn't been really maintained for a long time. It doesn't compile in any way, it includes non-existent headers, has no users, and marked as "BROKEN" more than year. Due to these factors, mx1_camera is now removed from the tree. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] V4L2: soc_camera: add run-time dependencies to R-Car VIN driverJean Delvare
The R-Car Video Input driver is only useful on shmobile unless build testing. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] rcar_vin: copy flags from pdataBen Dooks
The platform data is a single word, so simply copy it into the device's private data structure than keeping a copy of the pointer. This will make changing to device-tree binding easier as it is one allocation instead of two. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] V4L: soc-camera: explicitly free allocated managed memory on errorGuennadi Liakhovetski
devm_kzalloc() allocations are freed when the device is unbound. But if a certain path fails and the allocated memory cannot be used anyway it is better to free it explicitly immediately. This patch does exactly this if asynchronous group probing in scan_async_group() fails after memory has been allocated. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-24[media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart
The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-13[media] soc_camera: disable STD ioctls if no tvnorms are setHans Verkuil
If the sub-device did not report any tvnorms, then disable the STD ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-23[media] vb2: stop_streaming should return voidHans Verkuil
The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could actually fail, but that's really not the case. The pwc amd sdr-msi3101 drivers both had this construction: if (mutex_lock_interruptible(&s->v4l2_lock)) return -ERESTARTSYS; This has been updated to just call mutex_lock(). The stop_streaming op expects this to really stop streaming and I very much doubt this will work reliably if stop_streaming just returns without really stopping the DMA. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] media: soc_camera: rcar_vin: Add support for 10-bit YUV camerasPhil Edworthy
Add support for MBUS YUV10 BT656 and BT601 formats at rcar driver. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-05[media] v4l: Rename vb2_queue.timestamp_type as timestamp_flagsSakari Ailus
The timestamp_type field used to contain only the timestamp type. Soon it will be used for timestamp source flags as well. Rename the field accordingly. [m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255] Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07[media] media: soc_camera: rcar_vin: Add preliminary R-Car M2 supportValentine Barshak
This adds R-Car M2 (R8A7791) VIN support. Both H2 and M2 variants look the same from the driver's point of view, so use GEN2 id for both. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: removed changelog from commit message] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07[media] videodev2: Set vb2_rect's width and height as unsignedRicardo Ribalda
As discussed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields from __s32 to __u32. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> (documentation and smiapp) Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07[media] vb2: return ENOBUFS in start_streaming in case of too few buffersHans Verkuil
This works together with the retry_start_streaming mechanism to allow userspace to start streaming even if not all required buffers have been queued. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Tomasz Stanislawski <t.stanislaws@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kamil Debski <k.debski@samsung.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Should clear bits before set the hardware registerJosh Wu
In the ISI driver it reads the config register to get original value, then set the correct FRATE_DIV and YCC_SWAP_MODE directly. This will cause some bits overlap. So we need to clear these bits first, then set correct value. This patch fix it. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Fix color component orderingLaurent Pinchart
The ISI_CFG2.YCC_SWAP field controls color component ordering. The datasheet lists the following orderings for the memory formats. YCC_SWAP Byte 0 Byte 1 Byte 2 Byte 3 00: Default Cb(i) Y(i) Cr(i) Y(i+1) 01: Mode1 Cr(i) Y(i) Cb(i) Y(i+1) 10: Mode2 Y(i) Cb(i) Y(i+1) Cr(i) 11: Mode3 Y(i) Cr(i) Y(i+1) Cb(i) This is based on a sensor format set to CbYCrY (UYVY). The driver hardcodes the output memory format to YUYV, configure the ordering accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Make the MCK clock optionalLaurent Pinchart
ISI_MCK is the sensor master clock. It should be handled by the sensor driver directly, as the ISI has no use for that clock. Make the clock optional here while platforms transition to the correct model. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Reset the ISI when starting the streamLaurent Pinchart
The queue setup operation isn't the right place to reset the ISI. Move the reset call to the start streaming operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Defer clock (un)preparation to enable/disable timeLaurent Pinchart
The PCLK and MCK clocks are prepared and unprepared at probe and remove time. Clock (un)preparation isn't needed before enabling/disabling the clocks, and the enable/disable operation happen in non-atomic context. We can thus defer (un)preparation to enable/disable time. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: Use devm_* managed allocatorsLaurent Pinchart
This simplifies error and cleanup code paths. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] v4l: atmel-isi: remove SOF wait in start_streaming()Josh Wu
when a userspace applications calls the VIDIOC_STREAMON ioctl. The V4L2 core calls the soc_camera_streamon function, which is responsible for starting the video stream. It does so by first starting the atmel-isi host by a call to the vb2_streamon function, and then starting the sensor by a call to the video.s_stream sensor subdev operation. That means we wait for a SOF in start_streaming() before call sensor's s_stream(). It is possible no VSYNC interrupt arrive as the sensor hasn't been started yet. To avoid such case, this patch remove the code to wait for the VSYNC interrupt. And such code is not necessary. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>