14 Jun, 2017
1 commit
-
Fixes the following build errors:
ERROR: "mipi_csi2_reset" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_set_datatype" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_enable" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_dphy_status" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_disable" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_set_lanes" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_get_status" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_get_info" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!
ERROR: "mipi_csi2_get_error1" [drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko] undefined!Signed-off-by: Octavian Purdila
09 Jun, 2017
4 commits
-
Some RGB formats fourcc definition are not precise
according to its original meaning. So make some
changes for them.Signed-off-by: Fancy Fang
(cherry picked from commit b0b4ad680e267bdf542d2c9a3202c0192bde9cb0) -
The following commit, in 4.9 kernel:
commit 2d7007153f0c ("[media] media: videobuf2: Restructure vb2_buffer")
added some changes to the v4l2 structures that were not properly
included in the existing driver after the rebase from 4.1. Hence, when a
new buffer was filled by the v4l2 core, the flags field in
vb2_v4l2_buffer structure contained a pointer and, depending on the
pointer value, the v4l2 core considered that the buffer was already
dequeued, signaling the error to userspace. The issue appeared
intermittently, after multiple reboots.This patch fixes it.
Signed-off-by: Laurentiu Palcu
-
Add set_fmt function to mxc vadc driver.
Signed-off-by: Sandor Yu
-
When use USERPTR mode to queue v4l2 buffer, field and timestamp info
needs to be stored.Signed-off-by: Haihua Hu
08 Jun, 2017
7 commits
-
Except i.MX6SL, all other i.MX6S serial SOC CSI module will been reset
to recovery from RX FIFO overflow error.
So add xx_fifo_rst flag in driver to distinguish i.MX6SL and other
i.MX6S SOC.Signed-off-by: Sandor Yu
-
Since commit ba3002045f8022f3a7e88511c4ebd9876a467ac8 the v4l2 core now
sets the v4l2_fmtdesc->description string based on numeric pixelformat
so that drivers no longer have to contain description strings.This happens even if the driver already filled the description and
prints an ugly warning if the pixelformat is unknown. Reduce this to
pr_debug if the driver provided a description string.Fixes https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsw-jira.freescale.net%2Fbrowse%2FMLK-13797&data=01%7C01%7Coctavian.purdila%40nxp.com%7C739251a045b045cfee0f08d4414a2972%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=cUsGBObv2wvVfE59KgLujwhlBeRdpR501GplYrYqVrk%3D&reserved=0
Signed-off-by: Leonard Crestez
-
Fix coverity CID 17624 uninitialized scalar variable
The 'fb_fmt' variable may be used before uninitialized
So initialize it at the begining.Signed-off-by: Guoniu.Zhou
-
running following vte stress test will meet "mx6s-csi 21c4000.csi: mx6s_csi_irq_handler Rx fifo overflow"
and cannot be stopped to capture again.i=0; while [ $i -lt 3000 ];do v4l2_capture_emma -D /dev/video1 -C 2 -M 0 -J 30,4 -W 640 -H 480;i=`expr $i + 1`;done
This patch adds the same handling as BIT_HRESP_ERR_INT for BIT_RFF_OR_INT
(RxFiFo OverFlow) to reset CSI as a recovery.Signed-off-by: Robby Cai
-
The 32 bpp pixel format which is passed to pxp should be
'PXP_PIX_FMT_RGB32' instead of 'PXP_PIX_FMT_RGB24', since
only 'PXP_PIX_FMT_RGB32' can be recognized by lcdif.Signed-off-by: Fancy Fang
-
Add more delay to wait sensor stable.
Signed-off-by: Sandor Yu
(cherry picked from commit c1d7c35b6d2c8b6ec69b90bac6febf673d04acc5) -
Mipi CSI PHY regulator will enabled in function of s_power.
So remove regulator enable code when driver probe.Signed-off-by: Sandor Yu
(cherry picked from commit c29dda8f4092cdeff7f7661f8ac2a05f98a71296)
23 Feb, 2017
22 commits
-
Add clk_settle variable to compliance more mipi sensor.
Mipi controller should setting by followed value
according mipi sensor support D-phy version.Slave Clock Lane Control Register for TCLK-SETTLE.
2'b0x = 110 ns to 280ns (v0.87 to v1.00)
2'b10 = 150 ns to 430ns (v0.83 to v0.86)
2'b11 = 60 ns to 140ns (v0.82)Signed-off-by: Sandor Yu
-
Combine csi image setting function for 32-bit,16-bit,8-bit format.
For parallel 8-bit sensor input, when bit per pixel is 16,
csi image width should been doubled.
But for mipi input, the csi image width and height should align
with mipi whatever data width.Signed-off-by: Sandor Yu
-
-Support no power and reset pins platform.
-Remove specific power and reset pin setting for ov5640 daughter card.
-Put sensor in software power down state when streamoff.
-Remove unsupported video modes, keep 640x480, 720x480, 720p, 1080p 30fps
video modes in driver.Signed-off-by: Sandor Yu
-
when do vte test it meets follow dump in small probability.
Add against-0 check to resovle this.$ v4l_emma.sh 1 1
$ v4l_emma.sh 1 9------------[ cut here ]------------
: /dev/video1 Set PARM sucessfulWARNING: CPU: 0 PID: 1123 at /home/bamboo/build/4.1.X-1.0.0_ga/fsl-
imx-fb/temp_build_dir/build_fsl-imx-fb/tmp/work-shared/imx6qdlsolo/kernel-source/mm/page_alloc.c:266
5 __alloc_pages_nodemask+0x3c8/0x894()
ly
v4l_capture_testapp 0 TINModules linked in:FO : /dev/video1 input formatti mx6s_captureng pass
v4l_capture_testapp 0 ov5640_camera TINFO : PRP_ENC_ON_D gpRGBcon evbugv_buf malloc pass!CPU: 0 PID: 1123 Comm: v4l2_capture_em Not tainted 4.1.8-1.0.0+g87e6c2f #1
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (dump_stack+0x84/0xc4)
[] (dump_stack) from [] (warn_slowpath_common+0x80/0xb0)
[] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
[] (warn_slowpath_null) from [] (__alloc_pages_nodemask+0x3c8/0x894)
[] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.isra.3+0x2c/0x84)
[] (__dma_alloc_buffer.isra.3) from [] (__alloc_remap_buffer.isra.6+0x1c/0x8c)
[] (__alloc_remap_buffer.isra.6) from [] (__dma_alloc+0x1fc/0x228)
[] (__dma_alloc) from [] (arm_dma_alloc+0x8c/0xa0)
[] (arm_dma_alloc) from [] (vb2_dc_alloc+0x68/0x100)
[] (vb2_dc_alloc) from [] (__vb2_queue_alloc+0x134/0x4d0)
[] (__vb2_queue_alloc) from [] (__reqbufs.isra.17+0x1a8/0x304)
[] (__reqbufs.isra.17) from [] (__video_do_ioctl+0x2b0/0x324)
[] (__video_do_ioctl) from [] (video_usercopy+0x1b8/0x480)
[] (video_usercopy) from [] (v4l2_ioctl+0x118/0x150)
[] (v4l2_ioctl) from [] (do_vfs_ioctl+0x3e8/0x608)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
---[ end trace 55ed68f89eca4805 ]---
mx6s-csi 21c4000.csi: dma_alloc_coherent of size 0 failedSigned-off-by: Robby Cai
-
For power saving, the camera is set ON/OFF by 'PWDN' pin.
However, the DQBUF timeout problems have been observed occasionally when
do the resolution switch for the camera. The reason could be that the power
for the camera is set to off then on when do the switch, but the delay time
is not enough for camera to go stable. The patch sets it to an empirical
value and it has passed over 3-day stress test.Signed-off-by: Robby Cai
-
Without the filter function, the dma_request_channel() API could possibly get
a sdma channel. The dma_request_channel() API does not return error but the
consequent operations on that channel will be invalid then the upper level
application expects to be stuck.The patch added the filter functions to get right dma channel for the fix.
Signed-off-by: Robby Cai
-
The patch is to fix the issue,
mipi csi unit test mx6s_v4l2_capture.out can not work in 2nd time.In ov5647 driver, clock and data lane will been setting to LP11 mode
when stream off. And the mode will been changed to LP00 mode
at the begin of ov5647 initialization.
If MIPI CSI DPHY in power on state, it will begin to work after
clock and data lane level changed, even ov5647 is not ready.
MIPI PHY may lose ov5647 signal.Fixed the issue with:
i. Stream off ov5647 when ov5647 driver probe.
ii. Add 5ms delay after software reset bit set.
iii.Setting both clock and data lane in LP00 when stream off.Signed-off-by: Sandor Yu
(cherry picked from commit d351a9b3ad46309354a30b256be1a39c339effcd) -
Comparing unsigned integer with 0 is meaningless. So
remove this kind of integer comparing.Signed-off-by: Fancy Fang
-
The code slice in the 'v4l2_fmt_to_pxp_fmt()' function:
"
else if (v4l2_pix_fmt == V4L2_PIX_FMT_RGB555)
pxp_fmt = PXP_PIX_FMT_RGB555;
"
appears twice continuously. And the second code slice
will become dead code which is never executed. So
remove the second one.Signed-off-by: Fancy Fang
-
The capture channel should be correctly disabled in ->suspend() and
enabled in ->resume() with ->enc_disable()/->enc_disable_csi() and
->enc_enable()/->enc_enable_csi() respectively.Signed-off-by: Liu Ying
-
Add s_stream interface for MIPI CSI and ov5647/ov5640 drivers.
Enable MIPI CSI sensor after MIPI CSI DPHY CLK enable
in case MIPI DPHY miss MIPI CSI sensor signal.Signed-off-by: Sandor Yu
(cherry picked from commit 26d81b416be6e3af203d1254a3116dbcf39a5605) -
Fill device_caps in pxp output driver.
Signed-off-by: Sandor Yu
-
Remove comment out code.
Signed-off-by: Sandor Yu
-
Initial port of the mxc V4L2 capture driver.
Baseline copied from imx_3.14.y branch:Signed-off-by: Sandor 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
(cherry picked from commit f0b54df4d1b58f8f6608e1b08a80a5acb8cc12ea) -
This reverts commit 5cf6f7f327c95f09be859889be39e78950516556.
-
As streamoff/streamon will reset all buffer list, video output count should
be reset to zero. Or timer will get wrong schedule time if input buffer time
stamp is 0.Signed-off-by: Song Bing b06498@freescale.com
-
Forward imx_3.14.y mxc video output drivers to 4.1 kernel.
The priv field of v4l2_pix_format is used to expand colorspace,
and can not use to pass IPU input crop size.
Add private IOCTL VIDIOC_S_INPUT_CROP and VIDIOC_G_INPUT_CROP
to pass input crop size.Signed-off-by: Sandor Yu
-
This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a.
Signed-off-by: Oliver Brown
(cherry picked from commit 5c74966c0e7deb0ac84b3fa8a84c6c942e7d434f)Conflicts:
drivers/media/v4l2-core/v4l2-compat-ioctl32.c
include/media/v4l2-subdev.h -
By using gstreamer plugin v4l2radio, it will call VIDIOC_S_CTRL with
V4L2_CID_AUDIO_MUTE, but return failed.So add V4L2_CID_AUDIO_MUTE CTRL support for radio-si476x.
Signed-off-by: Zidan Wang
(cherry picked from commit c18520adfd6de40dcc0659ddd778b0a2bd383cd4) -
When transfer rangelow and rangehigh from user space, the local variable
rangelow and rangehigh will not be initialized before using them.Signed-off-by: Zidan Wang
(cherry picked from commit c326f56005f0ee3d0c1fd6ebdebabda919c278dd) -
Porting the pxp-v4l2 output driver to imx_4.1.y branch.
Signed-off-by: Fancy Fang
01 Feb, 2017
5 commits
-
commit c739c0a7c3c2472d7562b8f802cdce44d2597c8b upstream.
A rare randconfig build failure shows up in this driver when
the CRC32 helper is not there:drivers/media/built-in.o: In function `s5k4ecgx_s_power':
s5k4ecgx.c:(.text+0x9eb4): undefined reference to `crc32_le'This adds the 'select' that all other users of this function have.
Fixes: 8b99312b7214 ("[media] Add v4l2 subdev driver for S5K4ECGX sensor")
Signed-off-by: Arnd Bergmann
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit 79d6205a3f741c9fb89cfc47dfa0eddb1526726d upstream.
The s_stream() handler incorrectly writes the whole MISC_CTL register to
enable or disable the outputs, overriding the output pinmuxing
configuration. Fix it to only touch the output enable bits.The CONF_SHARED_PIN register is also written by the same function,
resulting in muxing the INTREQ signal instead of the VBLK/GPCL signal on
the INTREQ/GPCL/VBLK pin. As the driver doesn't support interrupts this
is obviously incorrect, and breaks operation on other devices. Fix it by
removing the write.Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit b4b2de386bbb6589d81596999d4a924928dc119b upstream.
The FID/GLCO/VLK/HVLK and INTREQ/GPCL/VBLK pins are muxed differently
depending on whether the input is an S-Video or composite signal. The
comment that explains the logic doesn't reflect the code. It appears
that the comment is incorrect, as disabling the output data bus in
composite mode makes no sense. Update the comment to match the code.While at it define macros for the MISC_CTL register bits, the code is
too confusing with numerical values.Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit aff808e813fc2d311137754165cf53d4ee6ddcc2 upstream.
The tvp5150 doesn't support format setting through the subdev pad API
and thus implements the set format handler as a get format operation.
The single handler, tvp5150_fill_fmt(), resets the device by calling
tvp5150_reset(). This causes malfunction as the device can be reset at
will, possibly from userspace when the subdev userspace API is enabled.The reset call was added in commit ec2c4f3f93cb ("[media] media:
tvp5150: Add mbus_fmt callbacks"), probably as an attempt to set the
device to a known state before detecting the current TV standard.
However, the get format handler doesn't access the hardware to get the
TV standard since commit 963ddc63e20d ("[media] media: tvp5150: Add
cropping support"). There is thus no need to reset the device when
getting the format.However, removing the tvp5150_reset() from the get/set format handlers
results in the function not being called at all if the bridge driver
doesn't use the .reset() operation. The operation is nowadays abused and
shouldn't be used, so shouldn't expect bridge drivers to call it. To
make sure the device is properly initialize, move the reset call from
the format handlers to the probe function.Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit 48775cb73c2e26b7ca9d679875a6e570c8b8e124 upstream.
commit 73d5c5c864f4 ("[media] pctv452e: don't do DMA on stack") caused
a NULL pointer dereference which occurs when dvb_usb_init()
calls dvb_usb_device_power_ctrl() for the first time, before the
frontend has been attached. It also caused a recursive deadlock because
tt3650_ci_msg_locked() has already locked the mutex.So, partially revert it, but move the buffer to the heap
(DMA capable), not to the stack (may not be DMA capable).
Instead of sharing one buffer which needs mutex protection,
do a new heap allocation for each call.Fixes: commit 73d5c5c864f4 ("[media] pctv452e: don't do DMA on stack")
Signed-off-by: Max Kellermann
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman
26 Jan, 2017
1 commit
-
commit c0026c7bfb95c250c3e34fde59f96ad72fd730d6 upstream.
Clock control indirectly requires access to MFC device, so call it only
if we are sure that the device exists in s5p_mfc_release function.
s5p_mfc_remove() calls s5p_mfc_final_pm(), which releases all PM related
resources, including clocks, so any call to clocks related functions
is not valid after s5p_mfc_final_pm().Fixes: d695c12 ("[media] media: s5p-mfc fix invalid memory access from
s5p_mfc_release()")Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman