diff options
author | Xianzhong <xianzhong.li@nxp.com> | 2018-05-17 03:07:43 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:31:47 +0800 |
commit | fe264c35ac24e1ff54f7697c6df92fc01c14c458 (patch) | |
tree | 24f4c6281c9ba5f213af861205543476e82b37b0 /drivers/mxc/gpu-viv/hal/os/linux | |
parent | 73813a858c54a6f80c59cc095f5adb4b94c59e47 (diff) |
MGS-3892 [#imx-1027] fix dmabuf physical mapping issue
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>
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_dmabuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c index 3883f5220edc..d07743be68ba 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c @@ -277,8 +277,8 @@ _DmabufAttach( Mdl->priv = buf_desc; - /* Always treat it as a non-contigous buffer. */ - Mdl->contiguous = gcvFALSE; + /* Need set it as true to avoid MMU mapping. */ + Mdl->contiguous = gcvTRUE; gcmkFOOTER_NO(); return gcvSTATUS_OK; |