From: Wu Guoxing Date: Thu, 15 Mar 2012 02:54:26 +0000 (+0800) Subject: ENGR00176921:gpu-viv: set outstanding request number for all chips that using gc320 X-Git-Tag: v3.0.35-fsl_4.1.0~1496 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8e936ae2c12d21d8a87b7a6570a95d0e640268ce;p=karo-tx-linux.git ENGR00176921:gpu-viv: set outstanding request number for all chips that using gc320 this needs by all the chips(6dl, 6dq) that using gc320 this is vivante's IP bug, that when set outstanding number bigger than 16, it will have a chance for gc320 to dead lock the axi bus, which will lead to system hang. also, as our chip can only support axi outstanding of 8(for 6dl) and 4(6dq), this change have no performance impact. Signed-off-by: Wu Guoxing Acked-by: Lily Zhang --- diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c index 90308befdb04..1431b832f465 100644 --- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c +++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c @@ -23,7 +23,6 @@ #include "gc_hal.h" #include "gc_hal_kernel.h" -#include #define _GC_OBJ_ZONE gcvZONE_HARDWARE @@ -422,6 +421,7 @@ gckHARDWARE_Construct( gceSTATUS status; gckHARDWARE hardware = gcvNULL; gctUINT16 data = 0xff00; + gctUINT32 axi_ot; gctPOINTER pointer = gcvNULL; gcmkHEADER_ARG("Os=0x%x", Os); @@ -468,6 +468,10 @@ gckHARDWARE_Construct( case gcv300: case gcv320: hardware->type = gcvHARDWARE_2D; + /*set outstanding limit*/ + gcmkONERROR(gckOS_ReadRegisterEx(Os, Core, 0x00414, &axi_ot)); + axi_ot = (axi_ot & (~0xFF)) | 0x10; + gcmkONERROR(gckOS_WriteRegisterEx(Os, Core, 0x00414, axi_ot)); break; default: @@ -509,16 +513,6 @@ gckHARDWARE_Construct( #endif - if(cpu_is_mx6dl()) - { - /*set outstanding limit on mx6dl*/ - gctUINT32 data; - - gcmkONERROR(gckOS_ReadRegisterEx(Os, Core, 0x00414, &data)); - data = (data & (~0xFF)) | 0x10; - gcmkONERROR(gckOS_WriteRegisterEx(Os, Core, 0x00414, data)); - } - /* Set power state to ON. */ hardware->chipPowerState = gcvPOWER_ON; hardware->clockState = gcvTRUE;