aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mxc/ipu3/ipu_device.c
Commit message (Collapse)AuthorAge
* ENGR00295201 ipuv3: vdic: kernel dump when run deinterlace stress testSandor Yu2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel will dump when run deinterlace stress test. It is caused by vditmpbuf being reallocated by another thread when one thread accesses it. Issue is fixed by putting these code in mutex. Kernel dump log: [Playing ][Vol=01][00:00:10/00:00:30][fps:32]Unable to handle kernel paging request at virtual address 607d6085 pgd = 80004000 [607d6085] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 PID: 50 Comm: ipu2_task Not tainted 3.10.17-02308-g3700819 #28 task: ac1dc700 ti: ac1ba000 task.ti: ac1ba000 PC is at __kmalloc+0x40/0x114 LR is at __kmalloc+0x14/0x114 pc : [<800bbd40>] lr : [<800bbd14>] psr: 200f0013 sp : ac1bbbc8 ip : 008cc000 fp : 00001e40 r10: ac772e00 r9 : 0057b255 r8 : 000000d0 r7 : 00000790 r6 : ac773800 r5 : 607d6085 r4 : ac001b00 r3 : 00000000 r2 : 814f92a0 r1 : 000000d0 r0 : 000398c9 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c53c7d Table: 3c4c004a DAC: 00000015 Process ipu2_task (pid: 50, stack limit = 0xac1ba238) Stack: (0xac1bbbc8 to 0xac1bc000) Signed-off-by: Sandor Yu <R01008@freescale.com>
* ENGR00293488 ipu: vdi: Support more memory typeSandor Yu2014-04-16
| | | | | | | | | | | | | | | | __va function only can handle frame buffer from low memory. Use page_address function to replace it, that can handle frame buffer from both lower and high memory. Use ioremap_nocache function to handle Frame buffer from GPU reserve memory pool. Correct vdi data save buffer size, save both luma and chroma part for interleaved YUV format. For non-interleaved and partial-interleaved YUV format, save luma part data, chroma part is not covered in the patch. Signed-off-by: Sandor Yu <R01008@freescale.com>
* ENGR00292585 IPUv3: Fix a horizontal line at the middle playing 1080iOliver Brown2014-04-16
| | | | | | | | | Added additional check to handle stripe limits differently for upscaling and downscaling. Upscaling requires relaxed checking because input stripe may fall slighty outside of the input window. Downscaling requires strict limit checking. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
* ENGR00290654 IPUv3 dev:Workaround split mode downsize overflowLiu Ying2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The downsizing ratio overflow check should cover every stripe in the split mode. We need to do the overflow check correctly by taking the width/height 8-pixel alignment requirement into consideration since the alignment would be done when every stripe is checked in it's own ipu task. This patch takes a workaround for the issue which can be reproduced by this unit test case: ================================================================== mxc_v4l2_output.out -iw 1920 -ih 1080 -ow 200 -oh 200 -v 1 mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22 mxc_ipu mxc_ipu: sp_task[0],no-0x12 fail state:-22, queue err:-22. mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x10,state 3: error mxc_ipu mxc_ipu: ERR: no-0x10,ipu_queue_task err:-125 mxc_v4l2_output v4l2_out.35: display work fail ret = -125 mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22 mxc_ipu mxc_ipu: sp_task[0],no-0x22 fail state:-22, queue err:-22. mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x20,state 3: error mxc_ipu mxc_ipu: ERR: no-0x20,ipu_queue_task err:-125 mxc_v4l2_output v4l2_out.35: display work fail ret = -125 mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22 mxc_ipu mxc_ipu: sp_task[0],no-0x32 fail state:-22, queue err:-22. mxc_ipu mxc_ipu: ERR: [0xac63c400] no-0x30,state 3: error mxc_ipu mxc_ipu: ERR: no-0x30,ipu_queue_task err:-125 mxc_v4l2_output v4l2_out.35: display work fail ret = -125 VIDIOC_QBUF failed -1 ================================================================== Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00289553 IPU dev:correct downsize overflow check in rot caseLiu Ying2014-04-16
| | | | | | | | | | | | | | In rotation cases, the width and height of IPUv3 IC scaling block's output should align with the width and height of IPUv3 IC rotation block. And, users only tell the IPUv3 device driver about the parameters of scaling block's input and rotation block's output. So, we need to swap the width and height of rotation block in cache before we do downsize(a functionality of the scaling block) overflow check. This patch fixes the issue which can be reproduced by this unit test case: /unit_tests/mxc_v4l2_output.out -iw 128 -ih 128 -ow 176 -oh 10 -r 90 Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00274166 - Split mode has artifactsOliver Brown2014-04-16
| | | | | | | | | - Need to use different multiple and index parameters for vertical and horizontal stripes - Use correct multiple and index based upon pixel format - Allow input crop and size to be larger than width by upto 16 pixels Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
* ENGR00272541 IPUv3 IC: Split Downsizing overflow for size greater than 1024Oliver Brown2014-04-16
| | | | | | | | | | | | | | For downscaling, it is possible that downscaler output is greater than 1024. Added a function, calc_split_resize_coeffs, based upon _calc_resize_coeffs to calculate resizing and downscaling coefficients. In ipu_ic.c, checks for the range of *_resize_ratio are no longer needed. Non split cases will always have *_resize_ratio of zero. In ipu_device, additional checks are needed to check for an error from ipu_calc_stripes_sizes if calc_split_resize_coeffs fails. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
* ENGR00285273-3 IPU dev:Remove unnecessary memset before kfreeLiu Ying2014-04-16
| | | | | | | | This patch removes unnecessary memset() before kfree(). Also, it fixes a potential NULL pointer dereference(writing to a freed block of memory). Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00285273-2 IPU dev:Remove an unnesessary checkLiu Ying2014-04-16
| | | | | | | This patch removes an unnesessary check before setting task ID to simplify the code. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00285273-1 IPU dev:Correct timeout setting from usersLiu Ying2014-04-16
| | | | | | | This patch corrects the logic to set timeout value specified by the users. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00280663-2 IPUv3 device: check downsize ratio overflowLiu Ying2014-04-16
| | | | | | | | IPUv3 IC task downsize scaling ratio cannot exceed or be equal to 8:1. This patch makes the code return error code if the ratio overflows. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
* ENGR00273500 IPUv3 dev: use wait_event_interruptible for ipu taskLiu Ying2014-04-16
| | | | | | | | | | | The ipu task thread checks outstanding tasks to be done on waiting event uninterruptibly on the function find_task()'s return value. However, sleeping on waiting event uninterruptibly contributes to system load average value. This patch changes wait_event() to wait_event_interruptible() to avoid the load average value inflation. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit ec9479ffc757eaefa9b8d4942c37e3634e15599c)
* ENGR00240987: ipu: port ipuv3 driver from 3.5.7 kernelShawn Guo2014-04-16
This is a fast-forward porting of ipuv3 driver from 3.5.7 kernel to kernel 3.10. The change set is kept as minimum as possible with only making necessary code changes to adapt 3.10 kernel internal API and framework updates. Everything else should be same as 3.5.7 one. The change set consists of the following. * Remove unused Kconfig options MXC_IPU_V3D, MXC_IPU_V3EX and MXC_IPU_V3H * Comment out busfreq calls * Move ipu-v3.h into include/linux/, and remove all <mach/*> includes * Drop __devinit and __devexit * Remove assignment of pltfm_data->pg = imx6q_ipu_pg; * Use generic device_reset() API rather than ipu_pltfm_data->init() hook to reset IPU * Includes <linux/sched/rt.h> ipu_device.c to fix undeclared MAX_USER_RT_PRIO error * Change compatible string to "fsl,imx6q-ipu" to align with community kernel * Define irq_sync before irq_err in DTS to align with community kernel * Drop "ipu1_" and "ipu2_" from clock names to save the handling of the second parameter of devm_clk_get() * Remove the buggy csi_clk setup in ipu_clk_setup_enable() and validate the clock before operate on it in ipu_csi_enable_mclk() * Replace iram API (linux/iram_alloc.h) with generic memory pool API (linux/genalloc.h) in VDOA driver Signed-off-by: Shawn Guo <shawn.guo@freescale.com>