summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXianzhong <b07117@freescale.com>2014-07-14 15:49:04 +0800
committerLoren Huang <b02279@freescale.com>2014-08-27 12:10:59 +0800
commit16acbfa2f52993075faf881c79018b1459a3fd6f (patch)
tree0820c9c1b8feff8cc51de6bf330990f12c65970a
parenta00c49b5e21e1616e7088136eb4c8116b38ec9d0 (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) (cherry picked from commit 615fd2029d18cf7f1bcbda9773f11f04cb93d4d4)
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c4
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)