MGS-2848-2 [#imx-523] fix gpu hang for flat mapping optimization
authorXianzhong <xianzhong.li@nxp.com>
Wed, 3 May 2017 14:09:44 +0000 (22:09 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:11 +0000 (15:22 -0500)
fix the logical offset to set the correct buffer for the slave tlb entries,
the pointers are defined with gctPHYS_ADDR and gctUINT32_PTR, not void*.

Date: May 03, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c

index 55ed46f..71ef299 100644 (file)
@@ -708,8 +708,8 @@ _FillFlatMapping(
 
             gcmkASSERT(stlbLogical);
 
-            stlb->logical = stlbLogical + stlb->size * stlbCount;
-            stlb->physical = stlbPhysical + stlb->size * stlbCount;
+            stlb->logical = (gctUINT32_PTR)(((gctPOINTER)stlbLogical) + stlb->size * stlbCount);
+            stlb->physical = (gctPHYS_ADDR)(((gctPOINTER)stlbPhysical) + stlb->size * stlbCount);
 
             if (pre == gcvNULL)
             {