MA-9931 [#imx-667] use kzalloc instead of kmalloc during fence_init.
authorJessie Hao <juan.hao@nxp.com>
Mon, 17 Jul 2017 09:52:34 +0000 (17:52 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:33:39 +0000 (15:33 -0500)
Fix cts android.app.uiautomation.cts.UiAutomationTest#testWindowContentFrameStats fail.
This case check fence getSignalTime, which is get from fence->timestamp.
If use kmalloc, timestamp value is not guaranteed and can't be updated during fence_signal.

Date: Jul 17, 2017
Signed-off-by: juan.hao <juan.hao@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c

index 9750219..66da1dc 100644 (file)
@@ -313,7 +313,7 @@ struct fence * viv_fence_create(struct viv_sync_timeline *timeline,
     struct fence *old_fence = NULL;
     unsigned seqno;
 
-    fence = kmalloc(sizeof(struct viv_fence), gcdNOWARN | GFP_KERNEL);
+    fence = kzalloc(sizeof(struct viv_fence), gcdNOWARN | GFP_KERNEL);
 
     if (!fence)
         return NULL;