7703 Commits

Author SHA1 Message Date
Matt Sealey
2e6cfa8350 IPU Triple Buffering support 2011-06-28 17:20:21 -05:00
Matt Sealey
7ea11d0c97 sync minor framebuffer and overlay twiddlings to 11.01 BSP 2011-04-11 20:28:49 -05:00
Jason Chen
202aa76653 ENGR00138270-2 ipuv3: change ipu_check_buffer_busy to ipu_check_buffer_ready
Change ipu_check_buffer_busy to ipu_check_buffer_ready.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 3e60177e176d78e41351c9d51bc4889762c44627)
2011-02-12 02:51:46 -06:00
Liu Ying
e18adb3f1d ENGR00137783-1 MXC V4L2 capture:Add several ioctrl support
This patch supports VIDIOC_ENUM_FMT, VIDIOC_ENUM_FRAMESIZES
and VIDIOC_DBG_G_CHIP_IDENT ioctrls.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit 90fdf1cded2ce26ac6e8c81944a78a3f998ddaf2)
2011-02-12 02:48:06 -06:00
Liu Ying
d2ba6ce83b ENGR00137733 MXC V4L2 overlay:Fill black data to fb before preview
This patch fills black data to overlay fb before preview to get rid
of dirty data splashing the screen.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit 3dd91a35a55263252ab5d4bb63762713c138b567)
2011-02-12 02:47:38 -06:00
Liu Ying
a7553845cd ENGR00137624 MXC V4L2 capture:Don't enable mclk after resume
We used to enable mclk in resume function of mxc v4l2 capture
driver even if overlay or catpture is off when entering suspend
mode. This patch disables mclk after resume in this case.

Signed-off-by: Liu Ying <b17645@freescale.com>
2011-02-12 02:46:24 -06:00
Liu Ying
4100e61a89 ENGR00137557 MXC V4L2 overlay:Fix preview issue on DI1 BG fb
1) Add DISP3 BG-DI1 output support.
2) Remove ADC output support.

Signed-off-by: Liu Ying <b17645@freescale.com>
2011-02-12 02:42:59 -06:00
Liu Ying
3ac0117c12 ENGR00137517 MXC V4L2 capture:Improve streaming capture
1) Remove skip frame support.
2) Add dummy buffer support for CSI_PRP_ENC_MEM and
   MEM_ROT_ENC_MEM channel to get rid of lost frame
   error.
3) Clear buffer ready bit for one time whenever we fail
   to update buffer address.
4) Fix potential tearing issue by sync the working buf
   with EOF interrupt.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit f35a2d44710fe0f73516d52f67f7d063eef87097)
2011-02-12 02:41:35 -06:00
Liu Ying
91cb774f78 ENGR00137559 MXC V4L2 overlay:Don't clear FG position after preview
The FG window will go to the left-top corner of the display panel
after preview. So, remove the code to clear FG position when we
stop preview.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit 29a459e692e4dde9f3dee64aba176a357dfd0062)
2011-02-12 02:41:16 -06:00
Matt Sealey
b9267874b6 overlay driver: remove unused platform device (it's in mach-mx5/devices.c now) 2010-12-21 17:08:58 -06:00
Matt Sealey
f6ecf7665b drag mxc_v4l2_output video overlay code into the modern world (BSP 10.11.01)
drag mxc_ipuv3_fb with it (remove final efikamx specific stuff)
update some IPU stuff and ioctls for it all to interoperate

notes:
	that line_length bug is still there, I really can't find why it's 0...
	doesn't register because the platform_device isn't in a/a/p-mxc/devices.?
2010-12-18 01:09:45 -06:00
Sammy He
bbaaecc647 ENGR00132971 Workaround for imx5x M4IF burst len errata for armv7 neon
Workaround for imx5x M4IF burst len errata when armv7 neon enabled, use
pgprot_writecombine instead of pgprot_noncached, to avoid burst len > 8.

Signed-off-by: Sammy He <r62914@freescale.com>
2010-12-13 14:01:20 -06:00
Matt Sealey
9fb3a4d079 ENGR00132543 v4l2 output: fill black in streamoff
Fill black data in streamoff, otherwise the last frame will keep in fb.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-12-13 09:57:03 -06:00
Matt Sealey
a64c5f15de VPU allocation fails for some reason - actually the reason is that fbi->fix.line_length can be zero. In this situation, DON'T try and dma_alloc_writecombine with 0 length, or it'll OOPS.
As a side effect of not doing this, the V4L driver would happily go off and touch a framebuffer address that was invalid, and there may have been a slight SNAFU with a divide by zero on the VPU framebuffer.

Arnaud Patard from Mandriva noticed these a long while ago, but now here they are.

BUG: these are temporary hacks, let's try and work out why line_length is 0..
2010-09-09 12:41:12 -05:00
Jason Chen
3399b82cef ENGR00125374 v4l2 output: work-around VDI NFB4EOF error
If set both double buffer ready for VDI case, there will come out
NFB4EOF error.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 24c1d799767732a7d654c1acd526c63acbe397fe)
2010-08-10 11:52:02 -05:00
Jason Chen
a6c2a9685d ENGR00125275 v4l2 output:disable icbypass for input right crop case
If do input right-side crop and input/output are in the same size, v4l2
driver will enable ic_bypass, but after enable it, the output is not
correct.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:51:59 -05:00
Liu Ying
a1815ec2e8 ENGR00124761 V4L2 still:Support to capture QXGA still image
1) Add OV3640 camera QXGA configuration at 7.5fps support.
2) Use double buffer to workaround tearing issue when capturing
   still image.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:51:23 -05:00
Jason Chen
359587f268 ENGR00124828 v4l2 output: close overlay for ic bypass mode
After streamoff, ic bypass mode should close overlay like others

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:51:20 -05:00
Sammy He
9fe0e34c9f ENGR00124683-1 Add CCIR interlaced mode for TV decoder
Add CCIR interlaced mode for TV decoder. And add pwdn callback
function in mxc_camera_platform_data.

Signed-off-by: Sammy He <r62914@freescale.com>
2010-08-10 11:51:15 -05:00
Liu Ying
9fd34ae2e0 ENGR00124082-2 V4L2 output:Rework VDI V4L2 output implementation
1)Medium motion and low motion:
  Frame(n)'s even field is used for Previous channel,
  Frame(n+1)'s odd field is used for Current channel and
  Frame(n+1)'s even field is used for Next channel to generate
  de-interlaced Frame(n+1).
2)High motion:
  Frame(n)'s odd field is used for Current channel to generate
  de-interlaced Frame(n).

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:51:12 -05:00
Jason Chen
6a487d0bde ENGR00124360 v4l2 output: rework v4l2 output
1. remove ADC support.
2. remove work queue for not ic bypass mode which improve the
performance.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:51:09 -05:00
Jason Chen
4fd83bff23 ENGR00124023 v4l2 output:modify the operation of ic-bypass mode
/unit_test//unit_tests/mxc_v4l2_output.out -iw 1920 -ih 1080 -ow 1920
-oh 1080 -d 3 -l 600 -fr 80 /dev/shm/1920_1080_E18_c2.yuv

Error information:
It report the following error:
video4linux video16: unable to update buffer 0 address rc=-13

Fix above issue by modify the operation of ic-bypass mode.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:50:48 -05:00
Jason Chen
2fd7c9b4be ENGR00123841 v4l2 output: crop issue for ic bypass mode
If set crop for input image, and ic bypass mode enabled (after crop,
input and output video have the same size), video will play uncorrect if
input is non-interleaving format. Need set u/v offset for this case.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:50:40 -05:00
Jason Chen
d46cc8f6c6 ENGR00123807 v4l2 output: fix ic_bypass case for 720p playback
If play a video by using ic bypass mode, and the resolution is
bigger than IC limitation(1024x720), will come out DQUEUE timeout issue.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:50:40 -05:00
Liu Ying
1c45f63f2d ENGR00123717 V4L2 capture:Support more YUV pixel formats
1) Support YUYV for CSI->MEM capture.
2) Support YUYV and UYVY for CSI->PRP_ENC->MEM capture.
3) Support YUYV for still capture.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:50:39 -05:00
Robby Cai
876965b8f7 ENGR00123734 fix PxP hang issue when streamon and streamoff frequently
There might be some corners case which causes PxP hang up.
This is just a workaround to fix this.

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:50:36 -05:00
Jason Chen
a7d43cd67d ENGR00123558 v4l2 output: add own workqueue for v4l output
During v4l2 output playback, there is performance issue after below
commit:

UBUNTU: SAUCE: (upstream) netdev/fec: fix performance impact from
mdio poll operation

Use common workqueue cause this issue, so create an own workqueue for
v4l2 output.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:50:27 -05:00
mark gutman
b70ba43911 ENGR00123294 MX53: 4 stripes algorithm for support resizing for big screen
The updated algorithm allows output frame size up to 2048x2048

Signed-off-by: Mark Gutman <Mark.Gutman@freescale.com>
2010-08-10 11:50:24 -05:00
Ran Ferderber
5bbef6d718 ENGR00120671 H264Dec: Video dithering is serious on the interlaced streams
iMX53 was not in list of parts that include VDI, iMX53 was add.

Signed-off-by: Ran Ferderber r53561@freescale.com
2010-08-10 11:49:44 -05:00
Jason Chen
82552243db ENGR00122694 v4l2 output: set correct bits_per_pixel for fbi
Uncorrect bits_per_pixel will make wrong fb memaloc size, which will
cause Oops for filling black color operation.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:49:26 -05:00
Jason Chen
678ca1e01f ENGR00122043 v4l2 output: enable fb channel before buf select
Enable fb display channel before buffer select, it avoid display frame
lost for small windows between timming of buffer select and channel
enalbe.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:49:13 -05:00
Liu Ying
27cdb1ada9 ENGR00122388-2 V4L2 capture:Support camera's MCLK from SSI_EXT1_CLK
This patch supports camera's MCLK be derived from SSI_EXT1_CLK.

Signed-off-by: Liu Ying <b17645@freescale.com
2010-08-10 11:49:10 -05:00
Robby Cai
1798310855 ENGR00121974 [MXS] Set the limit for PxP down scaling factor
For MX23, the maximum down scaling factor is 1/2.
For MX28, it's 1/4.

If the scaling factor is below the factor, PxP may not function as expected.

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:47 -05:00
Robby Cai
4b60ff6d32 ENGR00119644-2 [MXS] Change name to eliminate the confusion
change rgbbuf to outbuf, etc. to eliminate confusion for MX28

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:22 -05:00
Robby Cai
36679e0b0f ENGR00119644-1 [MXS] PXP/v4l: 90/270 degree rotation output is not correct.
correct the setting of HW_PXP_OLnSIZE and HW_PXP_RGBSIZE(or HW_PXP_OUTSIZE)

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:22 -05:00
Robby Cai
842d13fff3 ENGR00121574-4 rename filename for pxp to mxs_pxp
Copied back the pxp.[ch] from branch 2.6.31

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:18 -05:00
Robby Cai
14ed59c3b1 ENGR00121574-2 rename filename for pxp to mxs_pxp
pxp.[ch] to mxs_pxp.[ch]

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:16 -05:00
Robby Cai
645bb03a9d ENGR00121274-2 [MX23] Porting PxP driver to new MSL
Adjust PxP driver for MX23

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:48:11 -05:00
Robby Cai
516114960f ENGR00117731 MX28: PxP and V4L2 driver Porting
Porting PxP(combined with V4L2) driver onto MX28

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:47:55 -05:00
Liu Ying
b7a90ba172 ENGR00120807 V4L2 capture:Change the mechanism for CSI->MEM capture
As CSI->MEM channel keeps on writing the buffer which is set to
ready latestly and raising up end of frame interrupts, the current
v4l2 capture realization mechanism is not appropriate for this channel.
This patch will update the idmac buffer to a dummy buffer whenever
there is no buffers queued by the user.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:47:00 -05:00
Liu Ying
6f8c313e76 ENGR00119169 V4L2 capture:enable CSI after PRP channels are setup
To preview with V4L2 overlay and capture at the same time may fail.
This patch implements workaround for this issue by enabling CSI after
PRP channels are setup.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:47:00 -05:00
Jason Chen
4f8fb2ae79 ENGR00120805 v4l2 output: fill black color to disp fb before streamon
There is a short show of previous played frame if not fill black color
to display fb.
Because fb device will unblank ahead of real data come.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:46:57 -05:00
Jason Chen
cbc4ebdbd4 ENGR00120507 v4l2 output: fix dqueue fail for ic_bypass mode
if dqueue buffer before the third frame queue, dqueue will failed.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:46:49 -05:00
Liu Ying
e603df439e ENGR00120500 V4L2 overlay:Unblank overlay fb before enable PRP_VF channel
This change makes us get rid of DIx_SYNC_DISP_ERR. The error sometimes
causes the backgound framebuffer reinitialized automatically, even if
we preview captured video on overlay framebuffer.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:46:43 -05:00
Robby Cai
7a5f1cc19f ENGR00120447-2 FIX: MX23 PXP set wrong RGBBUF and RGBSIZE after TV/LCD switch
After TV/LCD switch, PXP uses wrong old FB info to set RGBBUF/RGBSIZE.
This patch fixes this problem by notifying PXP to adjust when FB changed.

Signed-off-by: Robby Cai <R63905@freescale.com>
2010-08-10 11:46:41 -05:00
Jason Chen
d8b8e1e7d9 ENGR00120428 v4l2 output: jitter after blank/unblank fb
blank/unblank fb during v4l2 playback, unblank will cause current buffer
of display channel to be 1. This patch make the sequence of select
display buffer correct.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:46:38 -05:00
Jason Chen
6a73a12e8e ENGR00120370 v4l2 output: fix display fail for blank fb during video play
1. Blank BG during video play on FG:
./mxc_v4l2_output.out -iw 320 -ih 240 -ow 1024 -oh 768 -d 3 qvga.yuv
echo 1 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb0/blank

2. The same input and output (ic_bypass):
./mxc_v4l2_output.out -iw 320 -ih 240 -ow 320 -oh 240 -d 3 qvga.yuv
echo 1 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb0/blank

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:46:36 -05:00
Jason Chen
bd50dbbbaa ENGR00119976 v4l2 output: use mannual buffer select for display channel
To use manually buffer select instead of channel link, which resolve fb
blank during v4l2 running issue.

Signed-off-by: Jason Chen <b02280@freescale.com>
2010-08-10 11:46:36 -05:00
Liu Ying
46e0dd8d8d ENGR00119034 V4L2 overlay:Use DP to do CSC for preview on DPFG
Use DP to do CSC for preview on DPFG instead of using IC channel
so that we can get better performance. This change can make us
get rid of IC channel bandwidth limitation when using IC channel
to do upsizing from low resolution to high resolution and CSC.
This change doesn't touch V4L2 overlay for DPBG, because using DP
to do CSC will change the pixel format for DPBG(usually for GUI).
This change doesn't touch V4L2 capture, because users rarely do
upsizing with high multiple in this case.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:46:32 -05:00
Liu Ying
af4f8336b7 ENGR00119710 MXC V4L2 output:Support YUYV and UYVY input pixel format
Support YUYV and UYVY input pixel format for mxc V4L2 output.

Signed-off-by: Liu Ying <b17645@freescale.com>
2010-08-10 11:46:31 -05:00