summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Liu <r66033@freescale.com>2013-06-19 14:22:13 +0800
committerRichard Liu <r66033@freescale.com>2013-06-19 16:41:05 +0800
commit0f2d6ad7875b8cf1efc2d1f41b865ec5251770f1 (patch)
tree67c0da80a3a3156631c544ff4989a0e77cf60be1
parent3c1cf80c575c3aad2b8970e9ce308a47742327e0 (diff)
ENGR00266882 fix SabreAuto random system hang issuejb4.2.2_1.1.0-ga
fix SabreAuto random system hang issue, easy catch this hang by monkey test on 1080p display, monkey test command "while true;do monkey -v 100000;done". Signed-off-by: Richard Liu <r66033@freescale.com> Acked-by: Lily Zhang
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
index 8a442a2c4b0b..baf22044c943 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
@@ -1582,6 +1582,7 @@ _NeedVirtualMapping(
gctUINT32 end;
gcePOOL pool;
gctUINT32 offset;
+ gctUINT32 baseAddress;
gcmkHEADER_ARG("Node=0x%X", Node);
@@ -1601,10 +1602,16 @@ _NeedVirtualMapping(
else
#endif
{
- /* For cores which can't access all physical address. */
- gcmkONERROR(gckHARDWARE_ConvertLogical(Kernel->hardware,
- Node->Virtual.logical,
- &phys));
+ /* Convert logical address into a physical address. */
+ gcmkONERROR(
+ gckOS_GetPhysicalAddress(Kernel->os, Node->Virtual.logical, &phys));
+
+ gcmkONERROR(gckOS_GetBaseAddress(Kernel->os, &baseAddress));
+
+ gcmkASSERT(phys >= baseAddress);
+
+ /* Subtract baseAddress to get a GPU address used for programming. */
+ phys -= baseAddress;
/* If part of region is belong to gcvPOOL_VIRTUAL,
** whole region has to be mapped. */