]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00289999 gpu: fixed gc880 invalid command state message
authorXianzhong <b07117@freescale.com>
Thu, 28 Nov 2013 14:37:16 +0000 (22:37 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:53 +0000 (10:06 +0200)
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 <b07117@freescale.com>
Acked-by: Jason Liu
drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c

index 42e69151ff130857352e9f375a12263149eb0801..e277a21a6097dda703709e53da559c20477775f2 100644 (file)
@@ -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);