summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2015-06-30MLK-10507: ov5640 mipi: Keep sensor in power up state after probeSandor Yu
Sometimes ov5640 can not working on iMX7D ARM2 board, ov5640 signal is not accepted by imx7d mipi csi phy. Remove power down function and keep ov5640 power up after driver probe, the issue is fixed. Signed-off-by: Sandor Yu <R01008@freescale.com> (cherry picked from commit d5e090bbfe9939a8e3c278ef86eddab0c9873fa9)
2015-06-11MLK-11083: ov5640 mipi: Fix build errorSandor Yu
Build error when ov5640 mipi driver build as build-in: drivers/media/platform/mxc/subdev/built-in.o: In function `OV5640_get_HTS': :(.text+0x5d08): multiple definition of `OV5640_get_HTS' drivers/media/platform/mxc/capture/built-in.o::(.text+0x6228): first defined here drivers/media/platform/mxc/subdev/built-in.o: In function `OV5640_get_light_freq': :(.text+0x5e6c): multiple definition of `OV5640_get_light_freq' drivers/media/platform/mxc/capture/built-in.o::(.text+0x638c): first defined here drivers/media/platform/mxc/subdev/built-in.o: In function `binning_on': :(.text+0x6bb4): multiple definition of `binning_on' It is cause by ov5640 mipi global function name conflict, Add static property to these functions to fix the issue. Signed-off-by: Sandor Yu <R01008@freescale.com> (cherry picked from commit 3826c16be99c1d1a432f914ca09808f0d4591edb)
2015-06-10MLK-10795-5 camera: use gpio_set_value_cansleep instead of gpio_set_valueRobby Cai
The reason is in spi gpio driver (drivers/gpio/gpio-74x164.c) the 'can_sleep' property is set true as follows. chip->gpio_chip.can_sleep = true; Then gpio_set_value() calls gpiod_set_raw_value(), in which it checkes 'can_sleep' property. WARN_ON(desc->chip->can_sleep); Use gpio_set_value_cansleep instead to avoid the kernel warning message. Signed-off-by: Robby Cai <r63905@freescale.com> (cherry picked from commit d0ce5d78c3ea0167f159687d726a5eaad2c76214)
2015-06-05MLK-10256-07: mipi csi: Enable mipi csi driverSandor Yu
Enable mipi csi driver. Driver implemented in subdev architecture. support YUYV format. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-05MLK-10256-06 ov5640 mipi: Re-architecture ov5640 mipi driver to subdevSandor Yu
Re-write ov5640 mipi driver to subdev architecture. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-05MLK-10256-04: csi: Add mipi input support to csiSandor Yu
-Add mipi input support. DTS property csi-mux-mipi use to enable csi working in mipi mode. -Set max video memory size 32M -Add rx fifo overflow interrupter handle Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-05MLK-10256-02 v4l2: Add v4l2_async_notifier_unregister recursively callSandor Yu
If anyone calls v4l2_async_notifier_unregister() recursively from device_release_driver(), code will deadlock at list_lock, so unlock list_lock when device_release_driver() called. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-06-05MLK-10570-01: ov5640 mipi: Rename driver from ov5640 to ov564xSandor Yu
Rename driver from ov5640 to ov564x. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-20MLK-10929 media: mxc: vout: fix the vout->task_lock dead lock issueJason Liu
with the task_lock mutext to avoid the open/release race condition, which will have the deadlock issue when the release process try to destory the workqueue while the display work queued want to get the task_lock to finish the pending work, this lead to the AB-BA dead lock. To simplify the design, let's use the dedicated mutext for open/release. Signed-off-by: Jason Liu <r64343@freescale.com>
2015-05-19MLK-10911: ov4560: Move mclk rate setting before clk onSandor Yu
Move mclk rate setting code before clk on function. The change is required by imx clk framework, otherwise clk_set_rate will failed. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-17MLK-10895: CSI: Add more time to wait frame SOF interrupterSandor Yu
For big frame size video mode, such as 1920x1080. CSI driver need more time to wait SOF interrupter. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-13MLK-10886 CSI: Fix iMX6SL camera frame data splitSandor Yu
i.MX6SL CSI IC have a limitation that DAM FIFO will auto start when camera sensor power up. In order to support camera sensor power up before CSI driver. DMA FIFO should reset right before DMA FIFO enable, otherwise FIFO will lost data and image will split. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-12MLK-10803 media: mxc: vout: fix the race condition for multiple disaplayJason Liu
There will some race condition such as the followings: - multiple open concurrence will cause the vout refer to the stall vout-> v4l_wq or the vout-> v4l_wq is not initialized correctly. - multiple open concurrence will cause the global fb setting race-condition, thus, it will have the “set_crop error exceeds width/height” or “mxc_v4l2_output v4l2_out.30: can not find output” This patch fix the above issue by adding the protection for the critical section. Reviewed-by: Liu Ying <b17645@freescale.com> Signed-off-by: Jason Liu <r64343@freescale.com>
2015-05-08MLK-10788-3 driver: misc: change busfreq head file nameAnson Huang
As busfreq head file name is changed from busfreq-imx6.h to busfreq-imx.h, change the drivers which include this head file accordingly. Signed-off-by: Anson Huang <b20788@freescale.com>
2015-05-08MLK-10696 media: pxp-v4l2: refine the bounds sanity check logicFancy Fang
The output image area bounds check should be moved to where the 'l', 't', 'w' and 'h' are finalized to avoid the drect area beyond the maximum fb display area which may cause overflow issue when calculating the PXP PS LRC or ULC. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-05-08MLK-10545-[V4L2 Capture]: IPU: Add second CSI to memory instanceRogerio Pimentel
Adding a second CSI to memory instance to allow two simultaneous captures to memory. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
2015-05-08MLK-10434-2: ov5640: Fix first frame black issueSandor Yu
The issue is caused by csi begin to work when ov5640 still in unstable state. Adjust ov5640 power up sequence: -Enable ov5640 power when device probe. -Remove ov5640 clock and power function from s_parm. -Remove s_stream function. -Remove regulator poweron/off from s_power function and only keep clk_enable/disable function in s_power. s_power will been called when v4l2 capture driver open/close. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-08MLK-10434-1: v4l2 capture: Add s_power subdev api in open/closeSandor Yu
Add s_power subdev api in vl42 capture open and close function. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-08MLK-10423: Capture: System hang if capture test app been killedSandor Yu
System will hang if csi unit test mx6s_v4l2_capture.out process been killed. In csi capture driver function mx6s_csi_enable/disable is called by vidioc_streamon/streamoff function. But when csi unit test process is killed, vidioc_streamon/streamoff will not been called, and csi function still working even the csi clock is gated. Move mx6s_csi_enable/disable function from mx6s_vidioc_streamon/streamoff function to mx6s_start_streaming/ mx6s_stop_streaming function to resolve the issue. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-05-08MLK-10402: v4l2 capture: Check NULL pointer before memory accessSandor Yu
Function vb2_plane_vaddr() will return NULL if there is no kernel virtual address mapping exist for a given plane. Check the function return value in v4l2 capture driver before access memory. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10371: ov5640: Rename int-device ov5640 driver to ov564xSandor Yu
There are two ov5640 driver in kernel, one is subdev ov5640 driver, the other is int-device ov5640 driver. Rename int-device ov5640 driver to ov564x. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10266-1 mxc: capture fix build errorFrank Li
cherry-pick some driver tree patch. change interface funcation name. Signed-off-by: Frank Li <Frank.Li@freescale.com>
2015-04-14[media] of: move common endpoint parsing to drivers/ofPhilipp Zabel
This patch adds a new struct of_endpoint which is then embedded in struct v4l2_of_endpoint and contains the endpoint properties that are not V4L2 (or even media) specific: the port number, endpoint id, local device tree node and remote endpoint phandle. of_graph_parse_endpoint parses those properties and is used by v4l2_of_parse_endpoint, which just adds the V4L2 MBUS information to the containing v4l2_of_endpoint structure. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2015-04-14[media] of: move graph helpers from drivers/media/v4l2-core to drivers/ofPhilipp Zabel
This patch moves the parsing helpers used to parse connected graphs in the device tree, like the video interface bindings documented in Documentation/devicetree/bindings/media/video-interfaces.txt, from drivers/media/v4l2-core/v4l2-of.c into drivers/of/base.c. This allows to reuse the same parser code from outside the V4L2 framework, most importantly from display drivers. The functions v4l2_of_get_next_endpoint, v4l2_of_get_remote_port, and v4l2_of_get_remote_port_parent are moved. They are renamed to of_graph_get_next_endpoint, of_graph_get_remote_port, and of_graph_get_remote_port_parent, respectively. Since there are not that many current users yet, switch all of them to the new functions right away. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2015-04-14MLK-10249: vadc: improve vadc video mode detectedSandor Yu
After enable dispmix function, vadc driver 50% failed to detect video mode. Add video signal state check before read the result of video mode detect, vadc driver detected correct video mode increase to 95%. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10232-1: vadc: Add vadc to generic pm domainSandor Yu
Vadc in the dispmix power domian, the register will been reset when dispmix power off, add vadc to generic pm domain, dispmix will not power off when vadc driver loading. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10182: cam :Module can't load/unload twice without camera connectedSandor Yu
If no camera connected, ov5640 driver loading failed, but the driver have register subdev by v4l2_async_register_subdev. v4l2_async_unregister_subdev function in remove function and not been called when module unloading. Same subdev can not register twice, v4l2 async driver will print error message in the second module loading. Move v4l2_async_register_subdev function after ov5640 is succeed found to fix the issue. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10137:csi: Return physical address in querybuffer callSandor Yu
GST application want to use physical address even video buffer allocated with type of V4L2_MEMORY_MMAP. So add a trick in querybuffer function, if video buffer flags is setting to V4L2_BUF_FLAG_MAPPED, overwirte m.offset with physical address. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10117-3:csi: remove runtime suspend/resume functionSandor Yu
CSI v4l2 capture driver have involved to generic pm domain, runtime_suspend/resume function will been called when system suspend/resume. It will cause request_bus_freq/release_bus_freq called counter mismatch. So move request_bus_freq/release_bus_freq function to device open/close function. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10115: ov5640:define function ov5640_turn_on_AE_AG() with staticSandor Yu
ov5640 driver will failed to build with build-in: drivers/media/platform/mxc/subdev/built-in.o: In function `ov5640_turn_on_AE_AG': ov5640.c:(.text+0x3890): multiple definition of `ov5640_turn_on_AE_AG' drivers/media/platform/mxc/capture/built-in.o:v4l2-int-device.c:(.text+0x783c): first defined here make[3]: *** [drivers/media/platform/built-in.o] Error 1 make[2]: *** [drivers/media/platform] Error 2 make[1]: *** [drivers/media] Error 2 make: *** [drivers] Error 2 make: *** Waiting for unfinished jobs.... It is caused by function of ov5640_turn_on_AE_AG define as global function, change it to static function to resolv the issue. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10092-1 ov5640: Rename compatible string from ov564x to ov5640Sandor Yu
There are two version ov5640 driver, one is written with v4l2 int-device architecture, and the other is written with v4l2 subdev architecture. Rename subdev ov5640 compatible string from ov5640x to ov5640 to distinguish with ov5640 int-device driver. so ov564x is used for int-device architecture and ov5640 is used for subdev architecture. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10084 media: mxc vout: Correct black color filling for interleaved formatsLiu Ying
In non-linear_bypass_pp and non-tiled_bypass_pp modes, the triple fbdev frame buffer would be rendered with video frames in turn. We need to fill all the three frame buffers with black color before streaming on instead of filling only one of them. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit e0155001082abc2432ec54ac86f56abbbb744fd3)
2015-04-14MLK-10082: vadc: Add suspend/resume functionSandor Yu
Add suspend/resume function in vadc driver. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10081: csi: Add pm_runtime functionSandor Yu
Add pm_runtime function in csi driver. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10068 pxp: Correct YUV32 format in PXPSandor Yu
YUV32 format in PXP actually is VUYA, so change format define from AYUV to VUYA. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10069: csi: remove fsl_csi.h head file from capture folderSandor Yu
fsl csi driver have move to mxc subdev folder, so remove fsl_csi.h file in mxc capture folder. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10063 vadc: Remove code from capture folderSandor Yu
vadc source code have move to folder drivers/media/platform/mxc/subdev, so remove it. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-10061 csi: correct YUV444 format in v4l2 driverSandor Yu
v4l2 define YUV444 and YUV32 format as followed: V4L2_PIX_FMT_YUV444 /* 16 xxxxyyyy uuuvvvv */ V4L2_PIX_FMT_YUV32 /* 32 YUV-8-8-8-8 */ VADC and PXP defined YUV444 as: YUV1P444 — 32-bit pixels, 1-plane XYUV so the format of YUV444 in PXP/VADC should V4L2_PIX_FMT_YUV32 in v4l2. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9997-3: csi v4l2 capture: function enhancementSandor Yu
-Add subdev function call enum_mbus_fmt from vidioc_enum_fmt_vid_cap. -Add mbus convert to v4l2 pixelformat function. -Return subdev function call result to ioctl function. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9997-2 vadc: enhancement vadc functionSandor Yu
-Add V4L2_FRMIVAL_TYPE_DISCRETE setting in vadc_enum_framesizes. -Add s_parm function implement. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9997-1 ov5640: function enhancementSandor Yu
-Add V4L2_FRMIVAL_TYPE_DISCRETE setting in ov5640_enum_framesizes. -Correct pixelformat setting. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9988 PXP V4L2 output: Add YUYV format supportSandor Yu
Add YUYV output support to pxp v4l2 output. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9779-05 csi: Remove csi driver source from mxc/capture folderSandor Yu
- Remove v4l2 csi capture driver, vadc driver and csi driver from mxc/capture folder. - Rename ov5640 module name from ov5640_camera.ko to ov5640_camera_int.ko Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14 MLK-9779-03 camera: Rearchitecture ov5640 driver with subdevSandor Yu
Pass test on imx6sl and imx6sx platfrom. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9779-01 camera: imx6sx/sl CSI/VADC driver in subdevSandor Yu
CSI and VADC driver rewrite with v4l2 subdev architecture. - mx6s_capture.c driver support imx6sx and imx6sl csi module. - No PXP function included in csi driver, csi driver not support csc, crop and resize function. - Both csi and vadc driver register device tree. - v4l2 subdev bridge device drivers register device with asynchronous. Signed-off-by: Sandor Yu <R01008@freescale.com>
2015-04-14MLK-9772-5 Fix kernel dump message in mxc_v4l2_probe.Oliver Brown
Fix the kernel dump in mxc_v4l2_probe() ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/media/v4l2-core/v4l2-dev.c:780 __video_register_device+0xefc/0xf90() Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.17-00964-geeb68eb #26 [<80014dec>] (unwind_backtrace) from [<80011858>] (show_stack+0x10/0x14) [<80011858>] (show_stack) from [<80672df8>] (dump_stack+0x78/0xc0) [<80672df8>] (dump_stack) from [<8002ae6c>] (warn_slowpath_common+0x68/0x8c) [<8002ae6c>] (warn_slowpath_common) from [<8002af2c>] (warn_slowpath_null+0x1c/0x24) [<8002af2c>] (warn_slowpath_null) from [<8042e15c>] (__video_register_device+0xefc/0xf90) [<8042e15c>] (__video_register_device) from [<80454eec>] (mxc_v4l2_probe+0x334/0x4a8) [<80454eec>] (mxc_v4l2_probe) from [<80315dec>] (platform_drv_probe+0x2c/0x5c) [<80315dec>] (platform_drv_probe) from [<8031461c>] (driver_probe_device+0x120/0x260) [<8031461c>] (driver_probe_device) from [<8031482c>] (__driver_attach+0x8c/0x90) [<8031482c>] (__driver_attach) from [<80312c2c>] (bus_for_each_dev+0x60/0x94) [<80312c2c>] (bus_for_each_dev) from [<80313dd8>] (bus_add_driver+0x140/0x1ec) [<80313dd8>] (bus_add_driver) from [<80314df8>] (driver_register+0x78/0xf8) [<80314df8>] (driver_register) from [<80cbe304>] (camera_init+0x10/0x34) [<80cbe304>] (camera_init) from [<800088cc>] (do_one_initcall+0xe8/0x144) [<800088cc>] (do_one_initcall) from [<80c8fc04>] (kernel_init_freeable+0x104/0x1c8) [<80c8fc04>] (kernel_init_freeable) from [<8066ed60>] (kernel_init+0x8/0xec) [<8066ed60>] (kernel_init) from [<8000e5f8>] (ret_from_fork+0x14/0x3c) ---[ end trace c868dc620cb4d626 ]--- ------------[ cut here ]------------ Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
2015-04-14ENGR00326248 pxp v4l2 output: Add YUV444 supportSandor Yu
Add YUV444 support. Signed-off-by: Sandor Yu <R01008@freescale.com> (cherry picked from commit 847fc84c870b16f92dfb2b9386e6f118137a29f2)
2015-04-14MLK-9704 videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity ↵Fancy Fang
check in vm_iomap_memory(). When user requests V4L2_MEMORY_MMAP type buffers, the videobuf-core will assign the corresponding offset to the 'boff' field of the videobuf_buffer for each requested buffer sequentially. Later, user may call mmap() to map one or all of the buffers with the 'offset' parameter which is equal to its 'boff' value. Obviously, the 'offset' value is only used to find the matched buffer instead of to be the real offset from the buffer's physical start address as used by vm_iomap_memory(). So, in some case that if the offset is not zero, vm_iomap_memory() will fail. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2015-04-14MLK-9662 [V4L2 Capture] Revert patch to re-add support for _G_CHIP_IDENTOliver Brown
This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
2015-04-14MLK-9661-2 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.yOliver Brown
Adding local version of V4L2 internal device to MXC V4L capture. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>