Age | Commit message (Collapse) | Author |
|
do not set interruptable when from power management
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 751fbd840640ed4c9afcfca6d945bd941b50395a)
|
|
hasL2Cache is not defined in 6.2.4.p1 hardware structure,
use gcvFEATURE_64K_L2_CACHE to check L2 cache feature.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit c1fa3bd2fec7bb32dd500056fab6faef652e9324)
|
|
While investigating MLK-18894 ran a large number of suspend iterations
on imx6qp-sdb with rc2 kernel. After ~6 hours it hung while suspending
devices and sysrq-T showed the following trace for rtcwake:
The gckHARDWARE_SetPowerManagementState function seems hung waiting for
gckHARDWARE_QueryIdle. Inside the gckHARDWARE_QueryIdle there is a check
which looks like this:
rtcwake D 0 7090 561 0x00000001
[<809d5fc8>] (__schedule) from [<809d6380>] (schedule+0x48/0xb0)
[<809d6380>] (schedule) from [<809d9d3c>] (schedule_hrtimeout_range_clock+0xc8/0x13c)
[<809d9d3c>] (schedule_hrtimeout_range_clock) from [<809d9df0>] (schedule_hrtimeout+0x20/0x28)
[<809d9df0>] (schedule_hrtimeout) from [<807168c4>] (gckOS_Delay.part.3+0x64/0x6c)
[<807168c4>] (gckOS_Delay.part.3) from [<8071813c>] (gckOS_Delay+0x18/0x20)
[<8071813c>] (gckOS_Delay) from [<8073f08c>] (gckHARDWARE_SetPowerManagementState+0x838/0xb70)
[<8073f08c>] (gckHARDWARE_SetPowerManagementState) from [<8071df18>] (gpu_suspend+0x74/0xe4)
[<8071df18>] (gpu_suspend) from [<804fb9e8>] (dpm_run_callback+0x3c/0xdc)
/* Test if address is inside the last WAIT/LINK sequence. */
if ((address >= Hardware->lastWaitLink)
&& (address <= Hardware->lastWaitLink + 16)
Stepping through using the debugger (screenshot attached) this function
seems to return non-idle with both address lastWaitLink and being equal
to 0xFFFFFFF0. As far as I can tell the intention seems to be that the
check should pass but 0xFFFFFFF0 + 16 overflows back to zero so the
second part of the check fails because 0xFFFFFFF0 is not less than or
equal to 0.
Adding some prints to GPU code it seems that it's normal for these
values to be >0xFFFFe000. When they (randomly) hit 0xFFFFFFF0 exactly
the idle check will incorrectly fail and suspend will hang.
Actually, it is wrong when address reach to Hardware->lastWaitLink + 16,
because the address shall be either Hardware->lastWaitLink(wait command)
or Hardware->lastWaitLink + 8 (link command).
Fix the end address offset with 8 or 16 (extra 8 bytes for L2 flush).
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 536d8f09d04460fe4912a2514e98beb31251ee3d)
|
|
Add delay time and retry to make sure the Power state was changed.
Signed-off-by Yong Gan <yong.gan@ncp.com>
|
|
6sx gpu need reserve command to flush cache before power-off,
there is no way to perform force sync in power broadcast mode.
command buffer will be exhausted with repeat suspend/resume,
need pull up power to flush command buffer before suspend.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 6529b9b72a7020236e0f4860d6d1b0d558c02485)
|
|
only add the padding pages for user pageable memory,
Revert "MGS-4022 [#imx-1070] fix kernel panic with opencl test_buffers"
This reverts commit 9253786bcfd2fa17132c5057a18eb75b10ea3336.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
the user memory will add the padding pages to meet hardware alignment,
need set non-contiguous flag to avoid contigous mapping in GPU MMU.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
cherry-pick one patch to fix m845s suspend/resume hang:
6.2.4.p2-0018-BUG-19216-BUG-19230-CL151956-fix-synchronization-bet
BUG#19216 BUG#19230 CL151956 fix synchronization between isr
and clock state,fix kernel panic issue in bug #19216,
#19230. CL151956 Continue refine ISR and PM logic
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
Disable VIVANTE_ENABLE_DRM if not in the android platform.
Date: Jun 21, 2018
Signed-off-by: Yong Gan yong.gan@nxp.com
|
|
method for GC7000
Adapted from 7a3d1096aa0cc77e258. This brings back the ability for
gputop to read HW counter values.
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
|
|
Some 2D APIs were not compatible with 64bit, resulting in some memory
address not accessible, Refine them as internal usage.
Date: 19th Jun, 2018
Signed-off-by: Ella Feng <ella.feng@nxp.com>
|
|
Update GPU database, add some new features, gcvFEATURE_PE_TILE_CACHE_FLUSH_FIX ans so on.
Fix imx8mscale escts dEQP-GLES3.functional.fbo.* randomly fail. When gcvFEATURE_PE_TILE_CACHE_FLUSH_FIX is
not enabled, need to flush tile cache with blt.
Signed-off-by: Ella Feng <ella.feng@nxp.com>
Reviewed-by: Xianzhon Li <xianzhong.li@nxp.com>
|
|
g2d_buf_from_fd use gcoHAL_WrapUserMemory to wrap dmabuf handle,
and then use gcoOS_LockVideoMemory to retrieve physical address.
dmabuf is contiguous, need set contiguous flag to avoid MMU mapping,
otherwise g2d_buf_from_fd return the invalid physical address,
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
Signed-off-by: Chenyan Feng <ella.feng@nxp.com>
|
|
MX8 chips does not have GC355. So no need to build the drivers
Signed-off-by : Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by : Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
|
|
remove the obsolete code to fix build break for 4.14 kernel
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
"DRIVER_ATTR" no longer supported in 4.14 linux kernel,
using "DRIVER_ATTR_RW" to replace it.
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
|
|
there are 2 test failed on 8QXP FB. CL151757 fixed bug #20196,
for image objects using host ptr, set the cacheable flag correctly.
merged CL151774 fix build error cause by CL151757.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
threads
When pm is running power ON to OFF (not broadcast), gckCOMMAND_Stall is called for synchronization.
But it does not blocks more events.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
other threads
When power ON to other mode with broadcast (SUSPEND_BROADCAST,
IDLE_BROADCAST, OFF_BROADCAST), command->powerSemaphore is acquired after check idle.
code sequence:
check commit atom
check idle
>>> at this point, other thread may have new commits at this
>>> point.
Acquire command->powerSemaphore
... do clock off
This can cause unexpected interrupts after clock OFF or power
OFF.
To fix: try to acquire powerSemaphore before check commit atom,
abort when failure, because command commit is in progress.
fix bug #19216, #19230.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
When pm (SetPowerManagementState) is running power ON to
SUSPEND_BROADCAST, it only checks wait-link FE, but not Async FE. Clock
can be off when read AsyncFE Acknowledge register and other.
pm thread:
...
check commit atom ok
>> check idle OK
(former stopIsr before cl144673 is here)
set GPU clock off
...
isr:
gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_Address));
gckEVENT_Interrupt
>>> here, at this point, all interrupt comes, check idle in
>>> pm thread can pass.
gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address));
gckFE_UpdateAvaiable -> ReadRegister(GCREG_FE_ASYNC_STATUS_Address)
If gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address))
fail of clock off, then gckHARDWARE_Interrupt fails. In isrRoutine, it
won't wake up threadRoutine. Then it's stuck!
ReadRegister(GCREG_FE_ASYNC_STATUS_Address) failure can cause
unexpected behavior, too.
Former stopIsr (free_irq, before cl144673) can remove isr before
GPU clock off. So the issue is hidden.
To fix:
1. We should return success when either FE or AsyncFE reports
correct interrupts, so that isr can wake up threadRoutine for either FE.
That means, only need return ERROR when both FEs reports ERROR.
2. Add check for status of
ReadRegister(GCREG_FE_ASYNC_STATUS_Address).
Fix bug #19216, #19230.
merged BUG#19216 BUG#19230 CL152073 add missing part for CL151955
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
1. slightly increate performance for interrupt handler
2. refine powerMutex lock
3. remove obsolete power management mode
4. code refinement preparing fix for bug #19216, #19230
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
Using uninitialized value minf when calling snprintf.
Initilize it to fix.
Date: 25th Apr, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
|
|
Dump the error info only when there is an error. If the gcdALLOC_ON_FAULT is not enabled, still need to check
the HW status to decide whether to dump the exception info or not
Signed-off-by: Ella Feng <ella.feng@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
|
|
Save the meta data info in the _gcsVIDMEM_NODE.
DCSS can query the meta data, and get the tile statust buffer info.
Date: Apr 13, 2018
Signed-off-by: Yong Gan yong.gan@nxp.com
|
|
the original patch will skip CMA memory allocation with CMA_LIMIT flag,
that enforces GPU memory allocation from virtual pool with MMU mapping,
then both 2D and 3D performance will have performance regression on i.MX6.
Revert "6.2.4.p1-0044-CL142820-check-flag-match-even-try-to-allocate-from-"
This reverts commit 8a8cbf389ad56dc49685ea078698087be867655a.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
kernel panic when run opencl cts test_buffers on mScale850D,
use get_user and put_user to touch and validate user memory,
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
fix coverity high impact issue for 1477266
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
|
|
update gpu kernel version with 6.2.4.p1 official release.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
This feature is initialy created and enabled for 6.2.4 GPU driver,
Need re-enable GPU command commit worker for 6.2.4.p1 driver version.
i.MX8QM dual GPU SW workaround since no command sharing HW fix in B0,
optimized driver to improve GPU benchmark with better performance.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 2b20dff2514aa7f8f18a6c42451e43b637425e40)
|
|
for long time.
The root cause is that each time an application runs, the gpu driver will map reserved memory 128M to
the application virtual memory space, which means it need the system have at least 128M physical memory available,
otherwise the shmem_zero_setup will fail. Add MAP_NORESERVE flag to fix this problem.
Date: Jan 30, 2017
Signed-off-by: Yuchou Gan yuchou.gan@nxp.com
|
|
The GPU kernel driver file gc_hal_kernel_platform_imx.c license is incorrect,
Need fix it with GPL and MIT license statement.
Date: Jan 29, 2017
Signed-off-by: Yuchou Gan yuchou.gan@nxp.com
|
|
Update the gpu kernel to 6.2.4.p1.pre2
Date: Jan 26, 2017
Signed-off-by: Yuchou Gan yuchou.gan@nxp.com
|
|
unmap_attachment to free the sg_table when failed to call _DmabufAttach
Date: Jan 10, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
|
|
it is reproduced easily with multiple es11 cts tests,
gpu kernel panic in function _ConvertLogical2Physical.
need remove mdl from global list before destroy map list,
this can prevent the wrong access on the freed map data.
Date: Dec 22, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
CtsMediaTestCases module CTS test can't uncompleted due to native crash,
the crash is due to memory leak in drm gralloc, when total leak reach to
4GB it will report mmap fail and cause CTS thread crash.
Crash log:
12-02 08:14:51.982 1156 25401 E gralloc-viv: gralloc_vivante_lock#573: failed to mmap
12-02 08:14:51.982 1156 25401 E gralloc-viv: gralloc_lock#136: err=-25
12-02 08:14:51.982 1156 25401 E gralloc : gralloc_lock lock memory failed
12-02 08:14:51.982 1156 25401 W GraphicBufferMapper: lock(0xed4c2740, ...) failed: 5
12-02 08:14:51.982 1156 25401 F SoftwareRenderer: frameworks/av/media/libstagefright/
colorconversion/SoftwareRenderer.cpp:230 CHECK_EQ( 0,mapper.lock( buf->handle,
GRALLOC_USAGE_SW_WRITE_OFTEN, bounds, &dst)) failed: 0 vs. 5
Dec. 20, 2017
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
|
|
i.MX8QM dual GPU SW workaround since no command sharing HW fix in B0,
optimized driver to improve GPU benchmark with better performance.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
Support compression for GPU no resolve between client and compositor.
Enable gcdENABLE_RENDER_INTO_WINDOW_WITH_FC,
Implement enable_tile_status in viv protocol.
Signed-off-by: Yong Gan yong.gan@nxp.com
Reviewed-by: Xianzhong Li xianzhong.li@nxp.com
Reviewed-by: Y.c. Gan yuchou.gan@nxp.com
Reviewed-by: Prabhu Sundararaj prabhu.sundararaj@nxp.com
|
|
Fix monkey test reboot issue due to drm gem bug.
1. deref gem_obj in the end of funtion
2. replace async unlock with bottom half unlock.
Monkey commands:
while true;do monkey --pct-syskeys 0 -v 100000;done
Reboot log:
[ 884.062236] WARNING: CPU: 3 PID: 3987 at drivers/gpu/drm/drm_gem.c:776 drm_gem_object_release+0x40/0x48
[ 884.076072] Modules linked in: bcmdhd
[ 884.079760]
[ 884.081260] CPU: 3 PID: 3987 Comm: ReferenceQueueD Not tainted 4.9.56-00115-ge9a7131 #1
[ 884.089268] Hardware name: Freescale i.MX8QXP MEK (DT)
[ 884.094410] task: ffff80004cf6de80 task.stack: ffff800839838000
[ 884.100338] PC is at drm_gem_object_release+0x40/0x48
[ 884.105405] LR is at viv_gem_free_object+0x64/0x90
Date: Nov 27, 2017
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
|
|
only include busfreq header when CONFIG_PM is enabled
Date: Nov 29, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Reviewed-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Reviewed-by: Yuchou Gan <yuchou.gan@nxp.com>
|
|
Disable the depth compression on device tree for 8qm/8qxp/mscale
when the ddr4 is enabled.
Date: Dec 11, 2017
Signed-off-by Yuchou Gan yuchou.gan@nxp.com
|
|
Merge fix patch from VSI. Tested on wayland,the power could be cut
off in a few seconds, if ctrl + c to terminate a running program making
gpu idle
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Reviewed-by: Yuchou Gan <yuchou.gan@nxp.com>
Reviewed-by: Xianzhong <xianzhong.li@nxp.com>
|
|
include more GPU bug-fxings for Android DRM feature
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
need release user memory before close the drmfb handle,
there is no galcore kernel interface for immediate free.
add new interface to release the user memory by force,
[ 112.487090] [<ffff0000081748c0>] free_contig_range+0xa0/0xc0
[ 112.492757] [<ffff0000081d944c>] cma_release+0x94/0xc0
[ 112.497900] [<ffff0000085e344c>]
dma_release_from_contiguous+0x2c/0x38
[ 112.504432] [<ffff000008095ab8>]
__dma_free_coherent.isra.14+0x50/0xb8
[ 112.510962] [<ffff000008095b7c>] __dma_free+0x5c/0x90
[ 112.516022] [<ffff0000085c56b4>] drm_gem_cma_free_object+0xa4/0x130
[ 112.522293] [<ffff0000085a6384>] drm_gem_object_free+0x1c/0x58
[ 112.528130] [<ffff0000085a646c>]
drm_gem_object_unreference_unlocked+0x54/0x130
[ 112.535445] [<ffff0000085a65c0>]
drm_gem_object_handle_unreference_unlocked+0x60/0xb0
[ 112.543281] [<ffff0000085a6664>]
drm_gem_object_release_handle+0x54/0x90
[ 112.549989] [<ffff0000083c085c>] idr_for_each+0xb4/0x118
[ 112.555304] [<ffff0000085a73cc>] drm_gem_release+0x24/0x38
[ 112.560794] [<ffff0000085a62dc>] drm_release+0x28c/0x318
[ 112.566111] [<ffff0000081df344>] __fput+0x8c/0x1d0
[ 112.570906] [<ffff0000081df4ec>] ____fput+0xc/0x18
[ 112.575705] [<ffff0000080d7e84>] task_work_run+0xc4/0xe0
[ 112.581020] [<ffff0000080c0770>] do_exit+0x2d0/0x970
[ 112.585988] [<ffff0000080c0e78>] do_group_exit+0x38/0xa0
[ 112.591306] [<ffff0000080caf8c>] get_signal+0x1f4/0x508
[ 112.596536] [<ffff000008087970>] do_signal+0x70/0x550
[ 112.601591] [<ffff000008088080>] do_notify_resume+0x90/0xb0
[ 112.607168] [<ffff000008082ddc>] work_pending+0x8/0x10
Date: Nov 14, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Reviewed-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Reviewed-by: Yuchou Gan <yuchou.gan@nxp.com>
|
|
need remove IMX8_SCU_CONTROL to include busfreq-imx.h
Date: Nov 15, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
Since 4.1, linux kernel has dropped CONFIG_PM_RUNTIME macro. And
CONFIG_PM is used instead. GPU driver should be synced with the change.
Date Feb 22, 2016
Signed-off-by: Shawn Xiao <b49994@freescale.com>
|
|
on GPU0, GPU1 and bridged mode
cma limit feature is for gpu/dpu/vpu buffer sharing,
cma preempt feature is required for gpu mmu table setup.
remove cma limit flag for video memory since imx8 g2d use ion.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
|
|
fix coverity issue
Date: Nov 7, 2017
Signed-off-by Yuchou Gan <yuchou.gan@nxp.com>
|
|
Support GEM DRM feature for Android DRM and X11 DRI3,
Fixed GC7000XSVX OpenVX 1.1 CTS failures for i.MX8QM,
Add more performance optimization for GPU benchmarks.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
|
|
govern when rmmod galcore
When rmmod galcore.ko on boards that didn't support gpu govern,
some error message will be printed on console, do something to prevent this.
Date: Oct 16, 2017
Signed-off-by: Yuchou Ganyuchou.gan@nxp.com
Reviewed-by: Xianzhong xianzhong.li@nxp.com
Reviewed-by: Prabhu Sundararaj prabhu.sundararaj@nxp.com
|