Age | Commit message (Collapse) | Author |
|
this crash issue is caused by kernel NULL pointer when access GPU database,
GPU database is shared by all kernels, it can be queried with any valid kernel.
this patch will find the valid kernel pointer to avoid GPU kernel crash.
the crash backtrace with 'cat /sys/kernel/debug/gc/vidmem' on i.mx6sl:
[<80480600>] (gckKERNEL_FindDatabase+0x8/0xec) from [<80478db0>] (vidmem_show+0x2c/0x60)
[<80478db0>] (vidmem_show+0x2c/0x60) from [<800e4d5c>] (seq_read+0x1dc/0x47c)
[<800e4d5c>] (seq_read+0x1dc/0x47c) from [<800c7164>] (vfs_read+0x98/0x144)
[<800c7164>] (vfs_read+0x98/0x144) from [<800c77c4>] (SyS_read+0x3c/0x78)
[<800c77c4>] (SyS_read+0x3c/0x78) from [<8000e080>] (ret_fast_syscall+0x0/0x30)
Date: Dec 18, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 5b59e9d67ee1ce25e43fcb8934fcf0c75abfd0e3)
|
|
1. Watermark level in sdma use byte as its unit. but asrc driver use
word, there is mismatch between them. Here fix this issue and sdma can
work more efficiency.
2. Enlarge the larst_period_size, when use small size, for some case,
the dma task will timeout, because sdma has no much data for output.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
-The issue is triggered by suspend/resume test
when doing bonnie++ which will consume lots of
memory.
-The root cause is vivante didn't report the allocation
failure to uplevel correctly which cause the improper
free.
-Correct the free logic to fix this issue.
Date: Nov 26, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
Tested-by: Peter Chen
(cherry picked from commit 2378f1c0b48f1c632a96c1e6c1107e2773f34170)
|
|
It's a specific requirement form customer.
Environmant variable VIV_FBO_PERFER_MEM is added.
When it's set, driver will free fbo shadow memory immediately
when it's switch out.
Original vivante patch name:cl29153.diff
Date: Nov 25, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit c9d486e75fc7059050604188334ea846a25b9d13)
|
|
patch 5.0.11.p4-0039-base-CL26176-Dump-whole-process-db
dropped idle sys interace.
And vivante didn't fully integrate patch
patch 5.0.11.p4-0039-base-CL26176-Dump-whole-process-db
The fix is add back the missed code and logic.
Date: Nov 10, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit dc397c3a4e150f18e68cf26350fa0aafe98d3e31)
|
|
Integrate 5.0.11.p4 kernel change.
Date: Nov 6, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 4d1f341c418d70a73cded239a2bba554e25de5ac)
|
|
Return value -ERESTARTSYS is not visible for user space according
to include/linux/errno.h. So use -EBUSY replace it.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
The reason of crach is that some variables are not protected in
function mxc_asrc_suspend(), when suspend, there is possibility to
access one NULL pointer.
Refine the spin lock usage, add protecting for pair_hold.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
The hardware ASRC version 1, used on i.MX35, has a limitation that even
pair can only process even channel data. However, after using version 2,
it actually can support odd number of channels now. So we drop the check
for non-v1 versions.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
For the case that, the input and output size are both 640x480,
but the video20's related framebuffer resolution is 1024x768,
so the output should be cropped. In this situation, the ipu
task should be set to IC_MODE to avoid 'IPU_CHECK_ERR_PROC_NO_NEED'
error reporting.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
|
|
/dev/video20 device
"
Use /unit_tests/mxc_v4l2_output.out.
./unit_tests/mxc_v4l2_output.out -d /dev/video20 -iw 320 -ih 240 -f RGBP -ow 320 -oh 240 anyfile.rgb
got following:
g_in_width = 320, g_in_height = 240
g_display_width = 320, g_display_height = 240
driver=mxc_vout, card=DISP4 BG, bus=, version=0x00030a1f, capabilities=0x04000002
fmt RGB565: fourcc = 0x50424752
fmt BGR24: fourcc = 0x33524742
fmt RGB24: fourcc = 0x33424752
fmt RGB32: fourcc = 0x34424752
fmt BGR32: fourcc = 0x34524742
fmt NV12: fourcc = 0x3231564e
fmt UYVY: fourcc = 0x59565955
fmt YUYV: fourcc = 0x56595559
fmt YUV422 planar: fourcc = 0x50323234
fmt YUV444: fourcc = 0x34343459
fmt YUV420: fourcc = 0x32315559
fmt YVU420: fourcc = 0x32315659
fmt TILED NV12P: fourcc = 0x50564e54
fmt TILED NV12F: fourcc = 0x46564e54
fmt YUV444 planar: fourcc = 0x50343434
cropcap.bounds.width = 1024
cropcap.bound.height = 768
cropcap.defrect.width = 1024
cropcap.defrect.height = 768
set format failed
but same command on /dev/video17 as following works well
/unit_tests/mxc_v4l2_output.out -d /dev/video17 -iw 320 -ih 240 -f RGBP -ow 320 -oh 240 anyfile.rgb
"
The 'IPU_PIX_FMT_RGB666' should be marked as RGB colorspace to
avoid unnecessary ipu task submit which will be considered to
be a 'IPU_CHECK_ERR_PROC_NO_NEED' error by IPU driver.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit ded526f58a54e293c1f030a32478cac63bc9331a)
|
|
In original logic, the CMA always allocate memory, but report
allocation failure, it will cause serious memory leak.
Correct logic to fix it.
Date: Oct 13, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
The GPU driver fails to build when the kernel is not built in-place,
KBUILD_OUTPUT is set to point to some other directory.
This patch fixes this issue.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
|
|
Integrate p2 and p3 kernel change together.
Date: Sep 22, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
-Add sys interface for changing 3DMinClock.
This feature is blocked by vivante kernel platform change.
Sys interface /sys/bus/platform/drivers/galcore/gpu3DMinclock
is used for configure this value.
It's important feature for thermal.
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
Add new API gcoOS_SetSwapIntervalEx.
Date: Aug 04, 2014
Signed-off-by Yong Gan <yong.gan@freescale.com>
|
|
it is not complete in the original implementation to query virtual command buffer,
it is necessary to this fix to get the correct GPU virtual memory result.
also include virtual command buffer database for Vivante gcDB tool.
Date: Aug 11, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 81fe8a98067132ba830be5220d554c7920b729ac)
|
|
virtual command buffer is enabled with virtual memory allocator.
but there is no interface to query virtual command buffer database.
with this solution, virtual command buffer can be queried with virtual memory pool.
Date: Jul 25, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 67bc44bd0fd9a4d3da0191b29447d980acb7387d)
|
|
The callback functions might be bypassed due to stopped SDMA channels.
So the dma_unmap_sg() might not be called at all. This would result
memory waste. So this patch moves the dma_unmap_sg() out of callback
functions and puts them after completion check instead.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
the root cause is video memory mutex is not global variable,
it will cause video memory managment problem with mixed 2D/3D/VG.
kernel panic with multiple instances stress test running glesx_viv.sh.
Date: Jul 31, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
-When system memory is less than 200M, we will block further
memory allocation for webgl.
It's for pass webgl 1.0.2 conformance case conformance/rendering/multisample-cor
ruption.html
It's a temperory patch from vivante, should be removed in 5.0.11p2.
Original patch name:5x_crash_patch.diff
Date: Jul 03, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 0d83d7e87d8d16a097c3c8bec6fa6ac25da225be)
|
|
Date: Jun 16, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
Since i.MX6SX doesn't supports MLB150 , it is not strictly explicit to
name driver module as mxc_mlb150.ko. Rename it to mxc_mlb.ko.It would be
more common.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
|
|
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, ASRC needs to save
all the values of registers before the system suspend and restore them after
the system resume.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
We actually do nothing to process input buffer. Thus simplify it.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
wait_for_compeltion code
After dropping the extra task for last period buffer fetching, we have a total
symmetrical wait_for_compeltion here so it's better to abstract a function to
make the driver neat.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
period data
The original design:
-> Input DMA task -> complete()
|
-> Output DMA task -> complete()
| |
| -> Last period polling work thread -> complete()
|
Main thread --------------> wait_for_completion() of Input and last period
It's too complicated and worthless to use an extra work thread for last period data.
So this patch just switches the flow into a simpler approach:
-> Input DMA task -> complete()
|
-> Output DMA task -> complete()
|
Main thread --------------> wait_for_completion() of In/Output -> Last period polling
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
The abnormal flow with the monkey test freeze problem is as below:
gckKERNEL_DestroyProcessDB--> aquire mutex --> gckCOMMAND_Detach(gckEVENT_FreeContiguousMemory) -->
___RemoveRecordFromProcessDB --> gckKERNEL_RemoveProcessDB --> aquire the same mutex
the fix is to disable mutex lock when perform record destory operations
Date: May 19, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
counterMutex is not necessary after refine dabase mutex
remove counterMutex to avoid duplicated mutex protection
Date: May 15, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
system hang in webGL conformance test with the following log
galcore daemon D 807430b4 0 105 2 0x00000000
[<807430b4>] (__schedule+0x34c/0x720) from [<807438c8>] (schedule_preempt_disabled+0x14/0x20)
[<807438c8>] (schedule_preempt_disabled+0x14/0x20) from [<80742328>] (__mutex_lock_slowpath+0x158/0x21c)
[<80742328>] (__mutex_lock_slowpath+0x158/0x21c) from [<80742434>] (mutex_lock+0x48/0x4c)
[<80742434>] (mutex_lock+0x48/0x4c) from [<8052aa68>] (gckOS_AcquireMutex+0x64/0x6c)
[<8052aa68>] (gckOS_AcquireMutex+0x64/0x6c) from [<80534e0c>] (gckKERNEL_AddProcessDB+0x30/0x37c)
[<80534e0c>] (gckKERNEL_AddProcessDB+0x30/0x37c) from [<8052d628>] (gckOS_Broadcast+0xe0/0xe8)
[<8052d628>] (gckOS_Broadcast+0xe0/0xe8) from [<80536fa8>] (_TryToIdleGPU+0x124/0x12c)
[<80536fa8>] (_TryToIdleGPU+0x124/0x12c) from [<8053887c>] (gckEVENT_Notify+0x520/0x574)
[<8053887c>] (gckEVENT_Notify+0x520/0x574) from [<80540468>] (gckHARDWARE_Interrupt+0x60/0x70)
[<80540468>] (gckHARDWARE_Interrupt+0x60/0x70) from [<805271cc>] (threadRoutine2D+0x20/0x78)
[<805271cc>] (threadRoutine2D+0x20/0x78) from [<80045728>] (kthread+0xa4/0xb0)
[<80045728>] (kthread+0xa4/0xb0) from [<8000e158>] (ret_from_fork+0x14/0x3c)
this is integration issue introduced by database mutex enhancement,
remove duplicated mutex unlock when remove database
Date: May 15, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
-ES11 conformance "Must Pass test" and "LogicOp Function test" failed b
-This patch from vivante. Vivante Comments:"If gcdCMD_NO_2D_CONTEXT is
Patch content
-Remove context->dirty2D flag setting when gcdCMD_NO_2D_CONTEXT is set.
Date: May 05, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
Move wl_surface_commit to work thread.
Add wl_display_sync after commit buffer.
Fix memory leak in wl_egl_window_resize.
Enable triple buffer rendering.
Disable skip worker in veglSwapWorker.
Date: Apr 21, 2014
Signed-off-by Yong Gan <B45748@freescale.com>
|
|
This patch is from Vivante (part of #831). It adds missing ioctls to VG
kernel driver. Now VG355 can be enabled for X11.
Date: Apr 24, 2014
Signed-off-by: Zhenyong Chen <b07273@freescale.com>
Acked-by: Jason Liu
|
|
this patch fix gpu database query failure with gmem_info
Date: Apr 28, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
this patch can fix NULL pointer issue in GPU kernel driver with the following log
[<7f240438>] (gckEVENT_AddList+0x0/0x810 [galcore]) from [<7f239ebc>] (gckCOMMAND_Commit+0xf28/0x118c [galcore])
[<7f238f94>] (gckCOMMAND_Commit+0x0/0x118c [galcore]) from [<7f2362dc>] (gckKERNEL_Dispatch+0x120c/0x24e4 [galcore])
[<7f2350d0>] (gckKERNEL_Dispatch+0x0/0x24e4 [galcore]) from [<7f222280>] (drv_ioctl+0x390/0x540 [galcore])
[<7f221ef0>] (drv_ioctl+0x0/0x540 [galcore]) from [<800facd0>] (vfs_ioctl+0x30/0x44)
The false code is at 0x217bc where the 0-pointer happens (r3 = 0)
gcuVIDMEM_NODE_PTR node = (gcuVIDMEM_NODE_PTR)(gcmUINT64_TO_PTR(Record->info.u.FreeVideoMemory.node));
217b8: e5953028 ldr r3, [r5, #40] ; 0x28
if (node->VidMem.memory->object.type == gcvOBJ_VIDMEM)
217bc: e5932000 ldr r2, [r3]
217c0: e5922000 ldr r2, [r2]
217c4: e152000a cmp r2, sl
{
gcmkVERIFY_OK(gckKERNEL_RemoveProcessDB(Event->kernel,
Date: Apr 23, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
fixed 3D context switch issue, the original comments from Vivante
Set command->using2D correctly when gcdCMD_NO_2D_CONTEXT = 1
this patch is to fix Android mess UI issue on GC400T
Date: Apr 21, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
gcvVERSION_STRING is not consistent with gcvVERSION_BUILD. Vivante
will provide a more flexible way in future release.
Date: Apr 18, 2014
Signed-off-by: Zhenyong Chen <b07273@freescale.com>
Acked-by: Jason Liu
|
|
-When allocation failed, the node will be null.
node->Virtual.type access will cause kernel panic
when forceContiguous is enabled.
Date: Apr 21,2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
Virtual command buffer is forcibly enabled and causes gpu hang on i.MX6SLX
- Android GPU hang
- X11 GPU hang when run es2gears
- Dfb 2D test case df_dok may cause gpu hang.
The safe fix is to disable virtual command buffer temporarily
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit f0aaa7521e0e58b4a7c9f104271343ab277fed56)
|
|
This issue could be reproduced on Android i.MX6SX with SD boot,
the root cause is memory allocator pointer is not created correctly.
gcsALLOCATOR is structure, while gckALLOCATOR is struct pointer
Date: Apr 18, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 5000ad55f9a27cba472e09a94189fa7018bc58c3)
|
|
database list corruption is caused by the extensive surface type(>=0x100)
some random kernel crash issues will be introduced by data corruption
this fix is to clear the extensive surface type with 0xFF mask, referring to
gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
/* Combinations. */
gcvSURF_NO_TILE_STATUS = 0x100,
gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
In Android, vidmem node is allocated by another process. */
gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 0f79bbd805402a8dcdf22bb119f99f05d8b9e4c3)
|
|
the potential risk is found in special case when application exit,
deleting record will cause the unexpected issue when process database is destoryed without atom protection
the enhanced database patch should be applied to avoid the unexpected kernel issue
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 00ef75b4f50933749a2fd569488510ab760de4a9)
|
|
-Fix a issue during cma 5.0.11 integration.
With this issue cma allocation will not return error when allocation failed.
Date: Apr 17, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
Integrated 5.0.11 kernel part change.
Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
When dma zone memory used up, gckOS_AllocateCMAMemoryFSL() will try to
free non paged memory cache and allocate again. Such operation will cause
twice memory mutex request and cause gpu driver hang.
The solution is free the memory mutex at first before trying to free non
paged memory cache.
Date: Feb 27, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 79ed8edd23f990f6c1429154c2ee773c83bfd72e)
|
|
Gpu kernel driver used spinlock in inerrupt context for debug
purpose. So when enabled debug mode in gpu kernel driver, it may
cause gpu kernel driver deadlock.
Changed spinlock to spinlock_irqsave to resolve this issue.
Patch from vivante.
Date: Apr 11, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
|
|
This issue happens when multiple thread is trying to idle GPU at the
same time, root cause is some wrong logic related with powerMutex which
cause cpu still access GPU AHB register after GPU is suspend(clock off),
that cause the bus lockup and make the whole system hang.
Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
|
|
-Update gpu kernel driver to 5.0.9.1 release
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
The optimal resize ratio should be used if the downscaler is not needed. This
will fix a vertical line in the center for some scaling ratios.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
2G above address will cause system reboot and fixed in original patch,
error check code is added based on the original logic.
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 7d85c98bf781eb047c2000bd82ea7559c24a2446)
|