diff options
author | Xianzhong <b07117@freescale.com> | 2013-08-13 23:16:24 +0800 |
---|---|---|
committer | Xianzhong <b07117@freescale.com> | 2013-08-14 01:04:26 +0800 |
commit | 8de6ee12573b6780d662ac20d3477801fd3ff690 (patch) | |
tree | 2166921468958a8a8cd51f28cc6672388bb0654e /drivers/mxc/gpu-viv | |
parent | eaa67b8feb7d97821fd08749430392eba2900091 (diff) |
ENGR00274782 fixed gpu crash when baseAddress is not 0 or 2G
The baseAddress of contiguousVidMem is the actual physical address
which is not subtracted by gpu baseAddress, but the allocated physical address
has been subtracted by gpu baseAddress in gckVIDMEM_Lock,
so the invalid offset is produced and used to calculate the logical address.
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Shawn Guo
Diffstat (limited to 'drivers/mxc/gpu-viv')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c index 22c4071d530d..de82c12f8617 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c @@ -332,9 +332,16 @@ gckKERNEL_MapVideoMemoryEx( else #endif { + gctUINT32 baseAddress = 0; + + if (Kernel->hardware->mmuVersion == 0) + { + gcmkONERROR(gckOS_GetBaseAddress(Kernel->os, &baseAddress)); + } + gcmkVERIFY_OK( gckHARDWARE_SplitMemory(Kernel->hardware, - device->contiguousVidMem->baseAddress, + device->contiguousVidMem->baseAddress - baseAddress, &pool, &base)); } |