From 0497c2e4f6fae17b446e7c931b5561dccaf6a67f Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Thu, 10 Mar 2016 17:53:59 +0800 Subject: [PATCH] MA-7715 fix GPU kernel panic reported by android CTS The patch removes the dependence between cache flush operation and node. Node is not used anymore when flush cache. Cache flush can work with only logical address passed into underlying functions does not need physical address. Signed-off-by: Richard Liu (cherry picked from commit ad65770512d2baeb45f5d0622d985f9856b7cc1e) --- .../mxc/gpu-viv/hal/kernel/gc_hal_kernel.c | 30 ------------------- 1 file changed, 30 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 7d673d372d6e..6258f1f01ea4 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c +++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c @@ -1611,7 +1611,6 @@ gckKERNEL_Dispatch( #endif gckVIRTUAL_COMMAND_BUFFER_PTR buffer; - gckVIDMEM_NODE nodeObject; gctBOOL powerMutexAcquired = gcvFALSE; gcmkHEADER_ARG("Kernel=0x%x FromUser=%d Interface=0x%x", @@ -2417,35 +2416,6 @@ gckKERNEL_Dispatch( case gcvHAL_CACHE: logical = gcmUINT64_TO_PTR(Interface->u.Cache.logical); - - if (Interface->u.Cache.node) - { - gcmkONERROR(gckVIDMEM_HANDLE_Lookup( - Kernel, - processID, - Interface->u.Cache.node, - &nodeObject)); - - /* Verify the nodeObject. */ - if ((nodeObject == gcvNULL) - || (nodeObject->node == gcvNULL) - || (nodeObject->node->VidMem.memory == gcvNULL) - ) - { - /* Invalid object. */ - gcmkONERROR(gcvSTATUS_INVALID_OBJECT); - } - - if (nodeObject->node->VidMem.memory->object.type == gcvOBJ_VIDMEM - || nodeObject->node->Virtual.contiguous - ) - { - /* If memory is contiguous, get physical address. */ - gcmkONERROR(gckOS_UserLogicalToPhysical( - Kernel->os, logical, &paddr)); - } - } - bytes = (gctSIZE_T) Interface->u.Cache.bytes; switch(Interface->u.Cache.operation) { -- 2.17.1