From: Xianzhong Date: Thu, 28 Nov 2013 14:37:16 +0000 (+0800) Subject: ENGR00289999 gpu: fixed gc880 invalid command state message X-Git-Tag: KARO-TX6-2014-07-10~74 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=98ee4e4785dd4e1d1a47ebf53a11518929c94fd0;p=karo-tx-linux.git ENGR00289999 gpu: fixed gc880 invalid command state message gpu kernel dump the error message when enable DEBUG mode: gckCONTEXT_Update(1493): State 0x0518 is not mapped. gckCONTEXT_Update(1493): State 0x0520 is not mapped. gckCONTEXT_Update(1493): State 0x0518 is not mapped. gckCONTEXT_Update(1493): State 0x0520 is not mapped. align gpu kernel driver to fix the error message Signed-off-by: Xianzhong Acked-by: Jason Liu --- diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c index 42e69151ff13..e277a21a6097 100644 --- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c +++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c @@ -436,6 +436,7 @@ _InitializeContextBuffer( gctUINT i; gctUINT vertexUniforms, fragmentUniforms; gctUINT fe2vsCount; + gctBOOL halti0; #endif /* Reset the buffer index. */ @@ -457,6 +458,7 @@ _InitializeContextBuffer( #if !defined(VIVANTE_NO_3D) /**************************************************************************/ /* Build 3D states. *******************************************************/ + halti0 = (((((gctUINT32) (Context->hardware->identity.chipMinorFeatures1)) >> (0 ? 23:23)) & ((gctUINT32) ((((1 ? 23:23) - (0 ? 23:23) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 23:23) - (0 ? 23:23) + 1)))))) ); /* Query shader support. */ gcmkVERIFY_OK(gckHARDWARE_QueryShaderCaps( @@ -747,6 +749,8 @@ _InitializeContextBuffer( if (Context->hardware->identity.pixelPipes == 1) { + index += _State(Context, index, 0x01460 >> 2, 0x00000000, 8, gcvFALSE, gcvTRUE); + index += _State(Context, index, 0x01430 >> 2, 0x00000000, 1, gcvFALSE, gcvTRUE); index += _State(Context, index, 0x01410 >> 2, 0x00000000, 1, gcvFALSE, gcvTRUE); } @@ -754,14 +758,17 @@ _InitializeContextBuffer( { index += _State(Context, index, (0x01460 >> 2) + (0 << 3), 0x00000000, Context->hardware->identity.pixelPipes, gcvFALSE, gcvTRUE); - index += _State(Context, index, (0x01480 >> 2) + (0 << 3), 0x00000000, Context->hardware->identity.pixelPipes, gcvFALSE, gcvTRUE); - for (i = 0; i < 2; i++) { index += _State(Context, index, (0x01500 >> 2) + (i << 3), 0x00000000, Context->hardware->identity.pixelPipes, gcvFALSE, gcvTRUE); } } + if (Context->hardware->identity.pixelPipes > 1 || halti0) + { + index += _State(Context, index, (0x01480 >> 2) + (0 << 3), 0x00000000, Context->hardware->identity.pixelPipes, gcvFALSE, gcvTRUE); + } + /* Resolve states. */ index += _State(Context, index, 0x01604 >> 2, 0x00000000, 1, gcvFALSE, gcvFALSE); index += _State(Context, index, 0x01608 >> 2, 0x00000000, 1, gcvFALSE, gcvTRUE);