summaryrefslogtreecommitdiff
path: root/drivers/mxc
AgeCommit message (Collapse)Author
2013-06-28ENGR00261814-4 gpu: use new PU power on/off interfaceRobin Gong
use new PU power on/off interface in GPU driver Cherry-pick from 3.5.7 branch. Signed-off-by: Robin Gong <b38343@freescale.com> Acked-by: Lily Zhang
2013-06-24ENGR00258998: mlb unit test should exit after click stop on mitbTerry Lv
This patch will do the following: 1. For mlb will not be able to know whether the final package is completely sent, add a delay for final package to be sent. 2. Adjust MLB's iram buffer usage. Old code will add addtional usage of iram buffer. 3. Code format change. 4. In resume function, calling init function after clock is enabled. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-06-19ENGR00266882 fix SabreAuto random system hang issuejb4.2.2_1.1.0-gaRichard Liu
fix SabreAuto random system hang issue, easy catch this hang by monkey test on 1080p display, monkey test command "while true;do monkey -v 100000;done". Signed-off-by: Richard Liu <r66033@freescale.com> Acked-by: Lily Zhang
2013-06-18ENGR00259411-3 fixed 073-base_cl6614_Add_a_gcdSUPPRESS_OOM_MESSAGEXianzhong
Add a gcdSUPPRESS_OOM_MESSAGE build option which can be used to enable an out-of-memory message in kernel. Signed-off-by: Loren Huang <b02279@freescale.com> Fixed Conflicts: drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c Acked-by: Lily Zhang
2013-06-14ENGR00267024 mx6q: Stop DMA memory fragmentationJay Monkman
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>
2013-06-08ENGR00265465 gpu:Add global value for minimum 3D clock exportLoren Huang
Add global value gpu3DMinClock so that minimum 3D clock can be change by user. When gpu min clock is too low, it may cause IPU starvation issue in certain case. Use echo x > /sys/module/galcore/parameters/gpu3DMinClock to change it. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
2013-06-04ENGR00265465 gpu:Add global value for minimum 3D clock exportLoren Huang
Add global value gpu3DMinClock so that minimum 3D clock can be change by user. When gpu min clock is too low, it may cause IPU starvation issue in certain case. Use echo x > /sys/module/galcore/parameters/gpu3DMinClock to change it. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
2013-06-03ENGR00265130 gpu:Correct section mismatch in gpu kernel driverLoren HUANG
-Remove the __devinit for suspend/resume function. -Replace __devinit to __devexit for remove function. Cherry-pick from 3.5.7 branch. Signed-off-by: Loren HUANG <b02279@freescale.com> Acked-by: Lily Zhang
2013-05-30ENGR00259411-2 073-base_cl6614_Add_a_gcdSUPPRESS_OOM_MESSAGE_build_option_whichLoren Huang
Add a gcdSUPPRESS_OOM_MESSAGE build option which can be used to enable an out-of-memory message in kernel. Signed-off-by: Loren Huang <b02279@freescale.com> Conflicts: drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c Acked-by: Lily Zhang
2013-05-30ENGR00264863 IPU: Fix interger overflow and check for invalid zero parameterWayne Zou
Fix interger overflow and check for invalid zero divider parameter Signed-off-by: Wayne Zou <b36644@freescale.com>
2013-05-29ENGR00264288-1 [GPU]Integrate 4.6.9p12 release kernel part codeLoren Huang
Integrate 4.6.9p12 release kernel part code. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
2013-05-27ENGR00264275 [GPU]Correct suspend/resume calling after adding runtime pm.Loren HUANG
After enabling runtime pm the suspend/resume entry is changed. -Add new entry for suspend/resume in runtime pm frame work. -Add static define for all runtime pm function. Cherry-pick from 3.5.7 kernel branch. Signed-off-by: Loren HUANG <b02279@freescale.com> Acked-by: Lily Zhang
2013-05-22ENGR00263304-3 IPUv3:Check NULL irq handler in ipu_request_irq()Liu Ying
To avoid NULL interrupt handler being called potentially in the IPU sync interrupt source handler, this patch adds sanity check on NULL interrupt handler in the function ipu_request_irq() for sync interrupts because the callers are likely to request a sync interrupt without specifying a handler. The error interrupts can still be enabled by this function without this kind of sanity check since we simply print out the relevant error interrupt register values in the IPU error interrupt source's handler. This patch also corrects _ipu_get() and _ipu_put() function call in the function ipu_request_irq() to make them be called in pair when handler has already been registered. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2013-05-22ENGR00263304-2 IPUv3:Check NULL irq handler in ipu_enable_irq()Liu Ying
To avoid NULL interrupt handler being called potentially in the IPU sync interrupt source handler, this patch adds sanity check on NULL interrupt handler in the function ipu_enable_irq() before the relevant interrupt is enabled in the sync interrupt registers. The error interrupts can still be enabled by this function without this kind of sanity check since we simply print out the relevant error interrupt register values in the IPU error interrupt source's handler. This patch also makes the function return error code to it's callers if any error happens. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2013-05-21ENGR00261884 fix system hang when thumbnail or playback interlace clipsRichard Liu
fix system hang when thumbnail or playback interlace clips Signed-off-by: Richard Liu <r66033@freescale.com>
2013-05-21ENGR00261884 fix system hang when thumbnail or playback interlace clipsRichard Liu
fix system hang when thumbnail or playback interlace clips Signed-off-by: Richard Liu <r66033@freescale.com>
2013-05-16ENGR00262748 Clean up regulator code for 3.5.7Loren HUANG
Remove gpu_regulator since 3.5.7 doesn't need it. Cherry-pick from 3.5.7 branch. Signed-off-by: Loren HUANG <b02279@freescale.com> Acked-by: Lily Zhang
2013-05-16ENGR00261814-4 gpu: use new PU power on/off interfaceRobin Gong
use new PU power on/off interface in GPU driver Cherry-pick from 3.5.7 branch. Signed-off-by: Robin Gong <b38343@freescale.com> Acked-by: Lily Zhang
2013-05-14ENGR00262270 IPUv3:Basic 16-bit generic data support for SMFC chanLiu Ying
This patch adds basic 16-bit generic data support for SMFC channel. Although we didn't verify capturing frames with 16-bit generic data, this could be a good starting point for developers to go on with. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2013-05-10ENGR00261749 IPU device: Fix potential uninitialized variable in split modeTristan Lelong
Fix potential uninitialized variable in split mode Signed-off-by: Tristan Lelong <b44337@freescale.com> Signed-off-by: Wayne Zou <b36644@freescale.com>
2013-05-10ENGR00261928 IPU device: Check invalid parameters for frame width/heightWayne Zou
Check invalid parameters for frame width or frame height, which might be equal to zero. Signed-off-by: Wayne Zou <b36644@freescale.com>
2013-05-10ENGR00261860 IPUv3 dev:Correct uv offset for non-tiled formatsLiu Ying
This patch corrects the formulae to calculate uv offset for several non-tiled planar yuv pixel formats: 1) NV12(partial interleaved): A part of the formula does math in this way: (width * pos_y)/2. This is wrong for odd crop pos_y. We should rigidly get half of crop pos_y and then have the result multiply stride(in this case, width) instead: width * (pos_y/2). The issue could be reproduced by the following unit test case: /unit_tests/mxc_v4l2_output.out -iw 1024 -ih 768 -cr 496, 377, 264, 195 -ow 1024 -oh 768 -fr 30 -f NV12 ./test_nv12_xga.yuv 2) YUV420/YVU420(non-interleaved): Similar to NV12, the wrong part '(width/2 * pos_y/2)' should be changed to '(width/2) * (pos_y/2)', otherwise, odd crop pos_y would cause wrong uv offset. Moreover, although height should be a muliply of 2 according to the IPUv3 spec, it still probably can process frames with odd height, i.e, the last y line might consume an additional line for u and v respectively. So, this patch rounds up height to even value by '(height+1)', which doesn't hurt in any way. The issue could be reproduced by the following unit test case: /unit_tests/mxc_v4l2_output.out -iw 1024 -ih 768 -cr 496, 378, 272, 195 -ow 1024 -oh 768 -fr 30 ./test_yuv420_xga.yuv 3) YUV422/YVU422(non-interleaved): Within the context, the width parameter in the function update_offset() is equal to stride line. The function ipu_init_channel_buffer() requires stride line to be 4-byte aligned, so, for this part, code change only is done without any logic modification to make the calculation be straightforward to be understood. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2013-04-28ENGR00260754 mxc: asrc: fix memory leakNicolin Chen
ASRC allocated memory for output buffer but didn't correctly free it. This patch removed the input-buffer's incorrect double-free code, and freed the output-buffer instead. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-18ENGR00259411 remove __GFP_NOWARN in gpu memory allocatorXianzhong
More information can be dumped when lower-mem killer is triggered Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Lily Zhang
2013-04-18ENGR00259411 remove __GFP_NOWARN in gpu memory allocatorXianzhong
More information can be dumped when lower-mem killer is triggered Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Lily Zhang
2013-04-17ENGR00259189 thermal:mx6: Make sure thermal alarm working safelyAnson Huang
The thermal sensor's value will be updated even it is power down, as thermal sensor's clock source is from PLL3, so there is chance that PLL3 is disabled before thermal driver is probed during kernel boot up, so the value in thermal sensor can be incorrect in this PLL3 disabled window. Previous flow of thermal driver probe routine will enable PLL3 clock, then set the thermal alarm value and enable the alarm irq, there is no delay or check about the thermal sensor's value, only when the thermal sensor's value is correct, its alarm function can be enabled. As adding delay in the probe routine is not a good option, so we move the enabling of thermal alarm function into the get temperature routine, as after the thermal value is read, the alarm function is safe enough, as the thermal sensor will be always working right after a read if its clock is enabled. Signed-off-by: Anson Huang <b20788@freescale.com>
2013-04-17Merge remote-tracking branch 'fsl-linux-sdk/imx_3.0.35_4.0.0' into ↵jb4.2.2_1.0.0-gaguoyin.chen
imx_3.0.35_android
2013-04-16ENGR00259008: mlb: reduce iram usage amount in async modeTerry Lv
In testing async mode on mx6q ard and mx6dl ard, driver always said "can not alloc rx buffer". Change async's ring buffer size from 2048 to 1536(MEP package size) and reduce the extra ring buffer for drop package, now the iram usage amount in async mode reduced from 34816 to 24576. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-16ENGR00259008: mlb: reduce iram usage amount in async modeTerry Lv
In testing async mode on mx6q ard and mx6dl ard, driver always said "can not alloc rx buffer". Change async's ring buffer size from 2048 to 1536(MEP package size) and reduce the extra ring buffer for drop package, now the iram usage amount in async mode reduced from 34816 to 24576. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-16ENGR00258651 thermal: update equation for i.MX6slAnson Huang
New thermal equation is working for all i.MX6 series SOCs, so update it for i.MX6SL as well. Signed-off-by: Anson Huang <b20788@freescale.com>
2013-04-15ENGR00258357-5: mlb: Use circle buf macros to replace old ringbuf mechanismTerry Lv
Use circle buf to replace old ringbuf mechanism. Change to use circle buffer in read, write, rx isr and tx isr functions. In first design of MLB, it's using it's own mechanism to manage ring buffer, like in mxc_mlb.c. And then, I saw that kernel already had a serials of circ buffer macros which can be used to manage ring buffers. This patch is to use circle buffer macros to manage mlb internal ring buffers. For detail of circle buffers, you can refer to linux-2.6-imx/Documentation/circular-buffers.txt. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-4: mlb: Group static variables to structure mlb_dataTerry Lv
Group static variables to structure mlb_data. Use mlb_data as platform data to be passed to file operation functions. Change accordingly functions for this change. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-3: mlb: Reset whole CDR in init functionTerry Lv
Reset whole CDR in init function. This will make mlb connection to MITB more stable. This is a missed part in mx6 rm's mlb section, but new in mlb's latest spec DS62420AP2.pdf 12.1.1-1. Without this patch, mlb may receive irq from MITB during initialization. It might cause some connection issue that mlb can't receive data sometimes. It was treat to be MITB's fault before we get the latest spec. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-2: mlb: Add more debug msgs in DEBUG modeTerry Lv
Changes are: 1. Use print_hex_dump to print buffer in DEBUG mode. 2. Add more debug msgs. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-1: mlb: Remove MLB150_ from macro define namesTerry Lv
Remove MLB150_ from macro define names to make code clean. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-5: mlb: Use circle buf macros to replace old ringbuf mechanismTerry Lv
Use circle buf to replace old ringbuf mechanism. Change to use circle buffer in read, write, rx isr and tx isr functions. In first design of MLB, it's using it's own mechanism to manage ring buffer, like in mxc_mlb.c. And then, I saw that kernel already had a serials of circ buffer macros which can be used to manage ring buffers. This patch is to use circle buffer macros to manage mlb internal ring buffers. For detail of circle buffers, you can refer to linux-2.6-imx/Documentation/circular-buffers.txt. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-4: mlb: Group static variables to structure mlb_dataTerry Lv
Group static variables to structure mlb_data. Use mlb_data as platform data to be passed to file operation functions. Change accordingly functions for this change. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-3: mlb: Reset whole CDR in init functionTerry Lv
Reset whole CDR in init function. This will make mlb connection to MITB more stable. This is a missed part in mx6 rm's mlb section, but new in mlb's latest spec DS62420AP2.pdf 12.1.1-1. Without this patch, mlb may receive irq from MITB during initialization. It might cause some connection issue that mlb can't receive data sometimes. It was treat to be MITB's fault before we get the latest spec. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-2: mlb: Add more debug msgs in DEBUG modeTerry Lv
Changes are: 1. Use print_hex_dump to print buffer in DEBUG mode. 2. Add more debug msgs. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-15ENGR00258357-1: mlb: Remove MLB150_ from macro define namesTerry Lv
Remove MLB150_ from macro define names to make code clean. Signed-off-by: Terry Lv <r65388@freescale.com>
2013-04-07Merge remote-tracking branch 'fsl-linux-sdk/imx_3.0.35_4.0.0' into ↵guoyin.chen
imx_3.0.35_android Conflicts: arch/arm/mach-mx6/board-mx6q_hdmidongle.c drivers/input/touchscreen/egalax_ts.c
2013-04-03ENGR00255518 ipu/ipu3: using the kernel common help function div_u64Jason Liu
We don't need invent the wheel to implement the wrap for the _do_div, we can use the kernel common helper function for the u64 divide with div_u64() function call This also fix the build break when CONFIG_DEBUG_SECTION_MISMATCH=y with GCC4.6.3 cross-compile toolchain. CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 drivers/built-in.o: In function `_do_div.part.1': clkdev.c:(.text+0x15c23c): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c25c): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c2bc): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c3ac): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c3d0): undefined reference to `__aeabi_uldivmod' This issue is caused by the wrongly optimized code produced by GCC, See the bug report here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783 The similar build break issue report at: http://lists.infradead.org/pipermail/linux-mtd/2012-May/041677.html Signed-off-by: Jason Liu <r64343@freescale.com>
2013-04-03ENGR00255518 ipu/ipu3: using the kernel common help function div_u64Jason Liu
We don't need invent the wheel to implement the wrap for the _do_div, we can use the kernel common helper function for the u64 divide with div_u64() function call This also fix the build break when CONFIG_DEBUG_SECTION_MISMATCH=y with GCC4.6.3 cross-compile toolchain. CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 drivers/built-in.o: In function `_do_div.part.1': clkdev.c:(.text+0x15c23c): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c25c): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c2bc): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c3ac): undefined reference to `__aeabi_uldivmod' clkdev.c:(.text+0x15c3d0): undefined reference to `__aeabi_uldivmod' This issue is caused by the wrongly optimized code produced by GCC, See the bug report here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783 The similar build break issue report at: http://lists.infradead.org/pipermail/linux-mtd/2012-May/041677.html Signed-off-by: Jason Liu <r64343@freescale.com>
2013-04-03ENGR00256918 IPUv3 common:Correct CSI_PRP_MEM disable routineLiu Ying
For both CSI_MEMx and CSI_PRP_VF(ENC)_MEM capture channels, we disable them with the following sequence: 1) Wait for an idmac channel eof interrupt. 2) Disable CSI by clearing CSIx_EN in IPU_CONF register. 3) Disable idmac channel by clearing relevant bit in IPU_IDMAC_CH_EN_1 register and other settings. However, currently, we don't do 3) until CSI_PRP_VF(ENC)_MEM's idmac channel being not busy by a while loop check. In case, an external sensor is plugged out from the system or the sensor is somehow broken, we will be unable to get out of that infinite while loop. Since this check is unnecessary(we've already waited for an idmac eof interrupt), this patch simply removes it from the disable routine of CSI_PRP_VF(ENC)_MEM channel. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 8136a50bd049d68f92604397f256e6067ef2b572)
2013-04-03Merge remote-tracking branch 'fsl-linux-sdk/imx_3.0.35_4.0.0' into ↵guoyin.chen
imx_3.0.35_android Conflicts: drivers/net/fec.c
2013-04-02ENGR00256543 mx6: Update equation for thermal sensor on i.MX6DLAnson Huang
Use universal equation and 25C's calibration data to get thermal sensor's ratio on i.MX6DL. Signed-off-by: Anson Huang <b20788@freescale.com>
2013-04-02ENGR00256543 mx6: Update equation for thermal sensor on i.MX6DLAnson Huang
Use universal equation and 25C's calibration data to get thermal sensor's ratio on i.MX6DL. Signed-off-by: Anson Huang <b20788@freescale.com>
2013-04-02ENGR00256918 IPUv3 common:Correct CSI_PRP_MEM disable routineLiu Ying
For both CSI_MEMx and CSI_PRP_VF(ENC)_MEM capture channels, we disable them with the following sequence: 1) Wait for an idmac channel eof interrupt. 2) Disable CSI by clearing CSIx_EN in IPU_CONF register. 3) Disable idmac channel by clearing relevant bit in IPU_IDMAC_CH_EN_1 register and other settings. However, currently, we don't do 3) until CSI_PRP_VF(ENC)_MEM's idmac channel being not busy by a while loop check. In case, an external sensor is plugged out from the system or the sensor is somehow broken, we will be unable to get out of that infinite while loop. Since this check is unnecessary(we've already waited for an idmac eof interrupt), this patch simply removes it from the disable routine of CSI_PRP_VF(ENC)_MEM channel. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2013-04-01ENGR00254106 Avoid incorrect GPU frequency scaling be overwrittenLoren Huang
Correct code to remove unnecessary GPU frequency scaling updte. This patch is from vivante. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
2013-04-01ENGR00254106 Avoid incorrect GPU frequency scaling be overwrittenLoren Huang
Correct code to remove unnecessary GPU frequency scaling updte. This patch is from vivante. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang