diff options
author | Xianzhong <xianzhong.li@nxp.com> | 2018-07-20 22:11:11 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:32:57 +0800 |
commit | 6237540c2695c7ee536ccee4642d1422395e7ec5 (patch) | |
tree | a65e25e54190e29ee9351ef877b9f44e9a70c64f /drivers/mxc/gpu-viv/hal/os/linux | |
parent | 62531599fa57096a20b38154241a70c8d3f928d6 (diff) |
MGS-3255-41 gpu: fix 6.2.4.p2 test_buffer failures
fix read buffer fence node for hw copy,
add cpu cache line check for write buffer,
invalidate cache after pipeline complete,
flush head and tail pages for user memory.
fix 630a849f3a4087a98b0425c261f474d178150307
"MGS-3255-39 [#ccc] fix opencl cache issue"
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.c index 4293ac9fbc75..8258cf8597ad 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.c @@ -201,6 +201,21 @@ static int import_page_map(struct um_desc *um, goto error; } + if (addr & ~PAGE_MASK) + { + dma_sync_single_for_device(galcore_device, + page_to_phys(pages[0]), + PAGE_SIZE, + DMA_TO_DEVICE); + } + if (page_count > 1 && ((addr + size) & ~PAGE_MASK)) + { + dma_sync_single_for_device(galcore_device, + page_to_phys(pages[page_count-1]), + PAGE_SIZE, + DMA_TO_DEVICE); + } + um->type = UM_PAGE_MAP; um->pages = pages; |