Age | Commit message (Collapse) | Author |
|
There's an interim buffer which should only be used when PxP CSC is used.
Otherwise the video buffer gets incorrect data by copying the content of
interim buffer. The patch fixes this by moving the memcpy to the right place.
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 8e0b8ff485dd7cdeabc653f1e27c271ac923710e)
|
|
The driver should inform the upper-lever application the exact size of
the image. PAGE_ALIGN macro should be removed.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
add the strict check for crop setting in S_CROP ioctl
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
- add the CROPCAP ioctrl support
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
Fixed code so condition causing the warning never occurs.
Signed-off-by: Jay Monkman <jay.monkman@freescale.com>
|
|
We need 2 video buffers to get a deinterlaced frame in VDI low motion
mode or medium motion mode. When there is no enough video buffer in
the active list, no one triggers the video buffer timer, then users
may be blocked at dqueue buffer ioctrl if they are in blocking mode.
In order to fix this issue, we may peek the first available video
buffer in the queue list so that the buffer may be taken as a reference
video buffer to do deinterlacing. If there is no video buffer in the
queue list, we should make users be able to trigger the timer again
when they queue buffers to the driver.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 52d0e3f01afbf49d8d16225dede18cc71daa0570)
|
|
Use ePxP to do the horizontal/vertical flip and rotation support
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit d0b9c741601b766213af1332329963f4267cd0c6)
|
|
- the root cause is pxp input/output buffer for csi post-processing is
same one, some part of content is overridded.
- use S_CROP ioctl to control crop, S_FMT to control output size.
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 9f3685ea1cd4e56b5d89bfbaf48920ba862edb49)
|
|
Some expiring video buffers may have been rendered to
display triple buffers for display. The relevant triple
buffers are set to be ready and depend on the display
hardware engine to switch them to be active on screen in
turn automatically. So, we need to wait for at least 2
vsyncs to make sure all of the expiring video buffers be
shown on display already.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit f7479db43eb2fa9bdb03c1ce99239a3136345105)
|
|
We hope the queued works can be done before streamoff, since the
works will render expiring video buffers to display. But, the
function cancel_work_sync() cannot guarantee this. Instead, it
may cancel some queued works before they starts to work. This
patch removes the function call cancel_work_sync() when streamoff.
We rely on the function flush_workqueue() right after it to make
sure queued works be done before streamoff.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit d88f6f7eaf3b78e667de46aa355cf366a1142e47)
|
|
This patch disables framebuffer ywrap flag when we enable overlay,
because the display double buffers are not ywrapped. This may avoid
wrong preview pictures on platforms which use NV12 pixel format for
overlay framebuffer.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
Applied patch from customer to prevent DMA memory
fragmentation. Customer reported system crashes due to running out of
DMA-able memory while playing videos. Reported in CT42391649.
Signed-off-by: Jay Monkman <jay.monkman@freescale.com>
|
|
We currently call cancel_work_sync() to have all left work be done. But,
this is not safe to make sure all left work being done successfully.
Instead, chances are that some work may be cancelled before starting
to be done, which may cause frame lost and make us hang at upcoming
wait_event_interruptible() in videobuf_waiton() called from video buffer
core v1 framework's dqbuf API. This patch replaces the function
call cancel_work_sync() with flush_workqueue() to fix the issue.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
Users may call VIDIOC_S_CTRL ioctrl to do rotation, such as 90 degree
rotation, when a video is streaming in IC bypass mode. The runtime
rotation setting may make the vout driver lose the track for a previous
video buffer and finally cause the streaming hang. This patch releases
that video buffer in this case and invalidates previous video buffers
when necessary.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
There could be two v4l2 internal master devices with the same name in
the system if the name is in 'mxc_v4l2_cap<csi>' fashion, since there
are two IPUs embedded in i.MX6Q and each IPU has two CSI ports. This
patch changes the name to be in 'mxc_v4l2_cap<pdev->id>' fashion to
fix the naming issue.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
This patch replaces the old classical timer(low resolution timer)
with high resolution timer. This change improves the accuracy of
time point we put/activate buffers on display flow. For example,
we intend to show several frames in a framerate of 30fps(constant
interval bewteen 2 adjacent frames should be 33.33ms), the classical
timer would introduce a 10ms error in the interval which may
downgrade the video quality(jitter can be seen).
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
In ic bypass case, we put video buffers at a framebuffer display
channel directly. The display channel works at triple buffer
mode. To make sure a video buffer(buf N) has been shown on display
device, we at least need to wait for the second video buffer(buf N+2)
after the current buffer(buf N) is put on the display channel. Then,
the current buffer(buf N) can be added to the dequeue list, otherwise,
the user may get the buffer too early so that the buffer being shown
can be overwritten - screen tearing issue happens.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
In ic bypass mode, the display framebuffer pixel format will be
changed to the pixel format of the buffer queued by user. It could
be all the planar pixel formats. We will fall back to the wrong
black filling logic for UYVY and RGB pixel formats if the planar
pixel format is not NV12. This patch corrects the black filling
logic for the following planar pixel formats:
IPU_PIX_FMT_YUV420P2
IPU_PIX_FMT_YUV420P
IPU_PIX_FMT_YVU420P
IPU_PIX_FMT_YUV422P
IPU_PIX_FMT_YVU422P
IPU_PIX_FMT_YUV444P
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
After doing video playback with Bypass IC mode on HDMI display, there is
a green bar at the bottom of the display, it is caused by resetting
miscalculated display buffer size.
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
Add strict input parameters check for v4l2 output drivers. The part of window
inside the display boundary is shown if pulling window out of screen.
About this issue: video playback error if pulling window out of screen
Using totem to play a video and using the mouse to pull the video window
out of the screen, it will print the follow errors:
imx-ipuv3 imx-ipuv3.0: ERR:[0xbad85200]-no:0x15c0 "wait_for_comp_timeo
ut" ret:0,line:2768
imx-ipuv3 imx-ipuv3.0: ERR: [0xbad85200] no-0x15c0, timeout:1000ms!
imx-ipuv3 imx-ipuv3.0: ERR: no-0x15c0,ipu_queue_task err:-110
mxc_v4l2_output mxc_v4l2_output.0: display work fail ret = -110
imx-ipuv3 imx-ipuv3.0: warning: disable ipu dma channel 21 during its busy state
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
There is annoying ipu warning when doing preview
by using v4l2 fg overlay component:
/unit_tests/mxc_v4l2_overlay.out -iw 320 -ih 240 -ow 1280
-oh 720 -r 0 -fg -t 5
imx-ipuv3 imx-ipuv3.0: IDMAC12's EBA0 is not 8-byte aligned
This warning can be seen only when preview size is bigger
than 1024*1024(ipu device driver split mode is enabled).
After debug, it appears that the unaligned buffer address
is caused by input cropping for left strip, and this
cropping is triggered by the split mode algrithm. The
algrithm is complex, so currently this patch only changes
the input pixel format of the ipu task from UYVY to NV12
to workaround this warning.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
When doing video playback on video16, which is also the first framebuffer
and used for fb console as well, there is a color bar on top of 1080p screen.
We need to make sure the correct vmode when doing pan display.
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
According to the OV FAE, the image quality(iq) setting is
from 0x5000 register to 0x3a1f register in the camera's
initialization setting. This patch aligns image quality
setting of ov5640 dvp camera to ov5640 mipi camera.
The registers whose values are changed are 0x5001, 0x5189,
0x518b, 0x518d, 0x518e, 0x518f, 0x5199, 0x519c and 0x519d.
This change may improve the image quality of 5M/1M/VGA/QVGA
taken pictures in Android according to test team observation.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
Fix the kernel modules building error for mx6q/mx6dl as follows:
LD [M] drivers/usb/gadget/g_serial.o
Building modules, stage 2.
MODPOST 48 modules
ERROR: "csi_enable_mclk" [drivers/media/video/mxc/capture/ov5640_camera.ko]
undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
Confirmed from OV, the missed setting for light_frequency need to be added.
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 3c4d081940ec00fecd87a55721e14116dc01e481)
|
|
After the patch of auto-detection for sensor pushed, there's a need to
read sensor ID in probe function. But on MX6SL, MCLK is not enabled at
that time. So need to enable it before read sensor ID.
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 78ad8b6f9d18cf5595cb532b7e08804aff158815)
|
|
Need power on the sensor for its initialization, otherwise the sensor can
not work properly.
Signed-off-by: Sheng Nan <b38800@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 24ef6f52c717b9f2288d1c66ec6efd284935e23e)
|
|
This patch removes unnesessary header files in the driver.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
ADV7180 power down/on can be controlled by a gpio
pin or i2c register setting. The PDBP bit in 0x0f
register chooses the control source, and the PWRDWN
bit in 0x0f register chooses to power down the chip
or power on the chip if control source is i2c.
This patch removes all gpio pin power down/on code
after probe function and uses i2c to do power down/on
operation, as some boards may choose to not connect
ADV7180 power down pin with AP, however, AP's i2c bus
has to be connect with the ADV7180 chip.
Moveover, this patch also adds a 400ms sleep after
the chip is powered on, which is a workaround for
preview scrolling issue(we suspect that the chip
needs some time to in a stable status, so that it
may sends correct data to AP).
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 introduced an
annoying kernel log by changing a pure debug info to error level.
This patch reverts that change.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 added a hard
coding for csi_parma.mclk setting to 27MHz. The comment added by
that commit is totally wrong by telling that csi_param.mclk
would be a kind of 'pixel clock' set in 'csi_data_dest' register.
This patch removes the unnecessary mclk setting for csi_param.mclk
variable, since it is only valid for CSI test mode.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
This patch adds device attribution for video device to
show csi number to userspace. The pattern is in "ipux_csix"
fashion, which tells which ipu and csi is relevant to a
specific video device. In this way, userspace may figure
out different cameras even if they have the same type,
especially, android may use this to know back/front
cameras.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|
|
The following warning information should be displayed
only when the format is XGA and frame rate is 30fps:
pr_warning("ov5640: actual frame rate of XGA is 22.5fps\n");
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
ov5642 and ov5640 are inside choice "prompt "Select Camera/TV Decoder""
It prevents some modules are set as build-in at the same time.
All the cameras inside the choice are parallel cameras. There is no need to
include all of them inside a choice.
Know issues:
ADV7180 (out of the choice) and mipi ov camera (inside the choice)
can not be both selected for ARM2 board:
CSI0_MCLK pad is conflicted between adv7180 and mipi camera ext port.
Developers should know this.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
ov5640_probe always return -1 when error happens. Actually we should use the
correct return value. For example, -ENODEV when no ov5640 is found.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
Because ov5642 and ov5640 changes the probe information due to auto detect,
ov5640_mipi should keep the same.
- Add found information to tell user ov5640_mipi is found.
- Use the same "not found" information as ov5642/ov5640.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
Both ov5642 and ov5640 need to be supported for parallel port of
validation board and no code change is needed when change from one sensor
to another.
- Add additional common i2c id for ov5640 and ov5642 for auto dectection
- Since two sensors will be checked because of auto detection, so use warning
instead of error if sensor id don't match.
- Add found information to tell user which camera is found.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
The following formats have quality issue:
- 30fps: 720p
- 15 fps: 1080p,qsxga
Quality issue happens on high resolutions.
So, increase the drive capability of ov5640 can fix this problem.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
Fix the review commit warning such as "line over 80 characters",
"no space before tabs".
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
Support interlace field format or progressive format changes
on the frame by frame base for V4L2 output
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
Each VPU decoded frame is de-interlaced twice inside v4l2 output driver,
and show twice also to achieve IPU/VDI double frame rate output.
This feature is disable by default.
Signed-off-by: Wayne Zou <b36644@freescale.com>
|
|
The method for change between scaling and subsampling mode is different
from ov5640_mipi.
(image bigger than 1280*960 is scaling mode, smaller is subsampling).
According to OV5640 Auto Focus Camera Module Application Notes
(with DVP Interface) R2.14.pdf,
change back from QSXGA to VGA, don't need to do exposure calculation.
According to the test result, if we do exposure calculation when change
back from scaling to subsampling mode, the image would be dark.
So the method is:
Change to scaling mode, go through exposure calcuation.
Change to or back to subsampling mode, change mode directly.
Supported mode:
- QSXGA@7.5fps
- 1080P@7.5fps
Can't make 1080P works at 15fps. Here is a reply from ov fae:
because of scaling down, max frame for 1080P is the same as 5M, both are 15fps.
so if 5M can runs up to 7.5fps on your demo, then 1080P is the same 7.5fps max.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
Supported the following modes, verified image quality and frame rate
- VGA 30/15fps
- QVGA 30/15fps
- NTSC 30/15fps
- PAL 30/15fps
- 720P 30/15fps
Note: use the same setting as app note of ov5640 dvp
- QCIF 30/15fps
- XGA 22.5/15fps
Note: cannot make XGA work on 30fps. Just a reference of ov5640 datasheet:
1280*960 YUV422 maximum at 22.5fps.
1280*720 YUV422 maximum at 30fps.
Need to confirm later.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
ov5640 ioctl_enum_fmt_cap only returns value of index = 0;
before support other formats, correct the behavior of this ioctl.
- ENUM_FMT returns all the supported format.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
The current code struct of parallel ov5640 set mode directly.
The newest settings need to go through global initialization.
New settings are provided by ov company
So this patch does:
- Make parallel ov5640 mode settings go through global initialization.
- Only VGA (640 * 480) are provided as a validation of the new setting.
- Other modes will be provided in the later patches.
Signed-off-by: Sheng Nan <b38800@freescale.com>
|
|
This patch fixed the cam_fmt uninitialization issue.
Signed-off-by: LiGang <b41990@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 48a48ea30c6e55e44c9eacaad316b5caa04a3dda)
|
|
Flickering issue happens when there's no buffer to be processed(e.g., the
pace of QBUF is much slower than DQBUF). The cause is the hardware is using
double buffering, while the driver has no good protection at above case and
thus the CSI will fill the buffer not in the right order. The way to fix is
refining the output of the working_q buffer list, that is, if there's no buffer
to be processed then output to a dummy buffer.
Another important change is to only do DMA reflash operation when SOF is
detected in streamon. Remove this operation is CSI interrupt handler because
it violates to the SPEC (only do DMA reflash before DMA is enabled but NOT at
the time or after DMA's enabled).
Signed-off-by: LiGang <b41990@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 0c4584763fa44b01a2f48198fa27c9206a116164)
|
|
Move ADV7180 out of choice to make it be enabled with other
camera config simultaneously
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit a6becd9a87da4fe0bdcc0e96d690377078c856b9)
|
|
Add ioctl_enum_framesizes function to align the requirement
of Camera HAL in Android
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit fd0a1be3e55c3ca5b16f5bf89a24c62b1f3f3abe)
|
|
In android, IPU fills the I420 buffer. And GPU shows the buffer to display.
mx6's GPU has 32 Y-stride alignment for I420. The stride alignment will
be passed through by bytesperline. This update is only for
csi->smfc->mem channel.
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit 4708dc1999ed4857799100434e4f46f68f4e7c13)
|