diff options
author | Xianzhong <b07117@freescale.com> | 2014-07-14 15:49:04 +0800 |
---|---|---|
committer | Loren Huang <b02279@freescale.com> | 2014-08-15 13:50:08 +0800 |
commit | 77bb9f1558664adaff7c5f1f8927b182101cb190 (patch) | |
tree | a13cd5e6a1d6fc178b0540015ee5827077ef26b0 | |
parent | 9ba72a169cfe3a3dad6aac3b0ab389afea6e5af5 (diff) |
ENGR00322632 [#1243] fix memory type to avoid overwriting issue
fix invalid access issue in GPU kernel triggered with the certain condition,
memory extensive type exceed 256 and will cause memory overwriting issue
Date: Jul 14, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 0db530ceadb9e1559793c725d4ab576370ffb1c2)
-rw-r--r-- | drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c index 6a1d79e7ae16..a2ad58796927 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c +++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c @@ -1192,7 +1192,7 @@ gckKERNEL_Dispatch( break; case gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY: - type = Interface->u.AllocateLinearVideoMemory.type; + type = Interface->u.AllocateLinearVideoMemory.type & 0xFF; /* Allocate memory. */ gcmkONERROR( @@ -1200,7 +1200,7 @@ gckKERNEL_Dispatch( &Interface->u.AllocateLinearVideoMemory.pool, Interface->u.AllocateLinearVideoMemory.bytes, Interface->u.AllocateLinearVideoMemory.alignment, - Interface->u.AllocateLinearVideoMemory.type, + type, &node)); if (node->VidMem.memory->object.type == gcvOBJ_VIDMEM) |