Age | Commit message (Collapse) | Author |
|
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>
(cherry picked from commit 86c9372395b3752a6395639d1ce584b8c79759f7)
|
|
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>
(cherry picked from commit 226bc39341bc2526f4d36b88c65ad27c5fac157c)
|
|
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>
|
|
Adding a second CSI to memory instance to allow two simultaneous captures to memory.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
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>
|
|
Add s_power subdev api in vl42 capture open and close function.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
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>
|
|
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>
|
|
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>
|
|
cherry-pick some driver tree patch.
change interface funcation name.
Signed-off-by: Frank Li <Frank.Li@freescale.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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)
|
|
Add suspend/resume function in vadc driver.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
Add pm_runtime function in csi driver.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
YUV32 format in PXP actually is VUYA,
so change format define from AYUV to VUYA.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
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>
|
|
vadc source code have move to folder
drivers/media/platform/mxc/subdev,
so remove it.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
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>
|
|
-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>
|
|
-Add V4L2_FRMIVAL_TYPE_DISCRETE setting in vadc_enum_framesizes.
-Add s_parm function implement.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
-Add V4L2_FRMIVAL_TYPE_DISCRETE setting in ov5640_enum_framesizes.
-Correct pixelformat setting.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
Add YUYV output support to pxp v4l2 output.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
- 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>
|
|
Pass test on imx6sl and imx6sx platfrom.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
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>
|
|
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>
|
|
Add YUV444 support.
Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit 847fc84c870b16f92dfb2b9386e6f118137a29f2)
|
|
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>
|
|
This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
Adding local version of V4L2 internal device to MXC V4L capture.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
Initial port of the mxc V4L2 capture driver. Baseline copied from
imx_3.10.y branch:
commit ffd138854ba04970457ddfbb03c3945df94112ac
Author: Sandor Yu <R01008@freescale.com>
Date: Mon Aug 11 19:05:11 2014 +0800
e-n-g-r 00322859 CSI: some frames crrouption issue
Removed whitespace and line length warnings from review-commits.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
1. Add pxp-v4l2 dts support for imx6sx platform.
2. Add v4l2_device to the pxp-v4l2 driver to pass the WARN_ON()
check new added in 3.14 kernel.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
|
|
The second argument should be physical address rather than virtual address.
Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[shawn.guo: cherry-pick commit 29f1cdb0d0f2 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
|
|
Commit f90580ca0133 ([media] videodev2: Set vb2_rect's width and height
as unsigned) changes v4l2_rect's width and height from __s32 to __u32,
and thus we see the build error below.
CC drivers/media/platform/mxc/output/mxc_pxp_v4l2.o
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c: In function ‘pxp_try_fmt_output_overlay’:
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:605:16: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:607:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
Fix the error by changing __s32 to __u32.
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
|
|
Forward imx_3.10.y mxc video output drivers to 3.14 kernel.
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
|
|
commit 7818b0aab87b680fb10f68eccebeeb6cd8283c73 upstream.
Inspection shows that newlines are missing from several kernel messages
in em28xx-audio. Fix these.
Fixes: 1b3fd2d34266 ("[media] em28xx-audio: don't hardcode audio URB calculus")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 0418ca6073478f54f1da2e4013fa50d36838de75 upstream.
The lockdep splat addressed in a previous commit revealed that at
least one message in em28xx-input.c was missing a new line:
em28178 #0: Closing input extensionINFO: trying to register non-static key.
Further inspection shows several other messages also miss a new line.
These will be fixed in a subsequent patch.
Fixes: aa929ad783c0 ("[media] em28xx: print a message at disconnect")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 15e1ce33182d1d5dbd8efe8d382b9352dc857527 upstream.
A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK
but the endpoint otheriwse functions as interrupt.
Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit a8f29e89f2b54fbf2c52be341f149bc195b63a8b upstream.
Userspace expects to see a long space before the first pulse is sent on
the lirc device. Currently, if a long time has passed and a new packet
is started, the lirc codec just returns and doesn't send anything. This
makes lircd ignore many perfectly valid signals unless they are sent in
quick sucession. When a reset event is delivered, we cannot know
anything about the duration of the space. But it should be safe to
assume it has been a long time and we just set the duration to maximum.
Signed-off-by: Austin Lund <austin.lund@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 2228d80dd05a4fc5a410fde847677b8fb3eb23d7 upstream.
We've got a bug report at disconnecting a Webcam, where the kernel
spews warnings like below:
WARNING: CPU: 0 PID: 8385 at ../fs/sysfs/group.c:219 sysfs_remove_group+0x87/0x90()
sysfs group c0b2350c not found for kobject 'event3'
CPU: 0 PID: 8385 Comm: queue2:src Not tainted 3.16.2-1.gdcee397-default #1
Hardware name: ASUSTeK Computer INC. A7N8X-E/A7N8X-E, BIOS ASUS A7N8X-E Deluxe ACPI BIOS Rev 1013 11/12/2004
c08d0705 ddc75cbc c0718c5b ddc75ccc c024b654 c08c6d44 ddc75ce8 000020c1
c08d0705 000000db c03d1ec7 c03d1ec7 00000009 00000000 c0b2350c d62c9064
ddc75cd4 c024b6a3 00000009 ddc75ccc c08c6d44 ddc75ce8 ddc75cfc c03d1ec7
Call Trace:
[<c0205ba6>] try_stack_unwind+0x156/0x170
[<c02046f3>] dump_trace+0x53/0x180
[<c0205c06>] show_trace_log_lvl+0x46/0x50
[<c0204871>] show_stack_log_lvl+0x51/0xe0
[<c0205c67>] show_stack+0x27/0x50
[<c0718c5b>] dump_stack+0x3e/0x4e
[<c024b654>] warn_slowpath_common+0x84/0xa0
[<c024b6a3>] warn_slowpath_fmt+0x33/0x40
[<c03d1ec7>] sysfs_remove_group+0x87/0x90
[<c05a2c54>] device_del+0x34/0x180
[<c05e3989>] evdev_disconnect+0x19/0x50
[<c05e06fa>] __input_unregister_device+0x9a/0x140
[<c05e0845>] input_unregister_device+0x45/0x80
[<f854b1d6>] uvc_delete+0x26/0x110 [uvcvideo]
[<f84d66f8>] v4l2_device_release+0x98/0xc0 [videodev]
[<c05a25bb>] device_release+0x2b/0x90
[<c04ad8bf>] kobject_cleanup+0x6f/0x1a0
[<f84d5453>] v4l2_release+0x43/0x70 [videodev]
[<c0372f31>] __fput+0xb1/0x1b0
[<c02650c1>] task_work_run+0x91/0xb0
[<c024d845>] do_exit+0x265/0x910
[<c024df64>] do_group_exit+0x34/0xa0
[<c025a76f>] get_signal_to_deliver+0x17f/0x590
[<c0201b6a>] do_signal+0x3a/0x960
[<c02024f7>] do_notify_resume+0x67/0x90
[<c071ebb5>] work_notifysig+0x30/0x3b
[<b7739e60>] 0xb7739e5f
---[ end trace b1e56095a485b631 ]---
The cause is that uvc_status_cleanup() is called after usb_put_*() in
uvc_delete(). usb_put_*() removes the sysfs parent and eventually
removes the children recursively, so the later device_del() can't find
its sysfs. The fix is simply rearrange the call orders in
uvc_delete() so that the child is removed before the parent.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=897736
Reported-and-tested-by: Martin Pluskal <mpluskal@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 5d1f00a20d2d56ed480e64e938a2391353ee565b upstream.
Add a macro to simplify au0828 quirk table. That makes easier
to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit f85698cd296f08218a7750f321e94607da128600 upstream.
The mutex does not serialise anything in this case but avoids a lockdep
warning from the control framework.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|