AM3358: PVR2d lib source code of old SDK

Part Number: AM3358

Kernel 3.2.0, 1G DDR, 1080P display.

call PVR2DBit PVR lib function, PVRSRV_BRIDGE_EVENT_OBJECT_WAIT return time out (9, PVRSRV_ERROR_TIMEOUT)

PVR version: "SGX_DDK_Linux_CustomerTI sgxddk 19 1.9.RC2@"  2139099

 The call trace is during failure: 

       #0  0x2bcc2aec in ioctl () from .\fs/lib/libc.so.6
       #1  0x2ab6faec in ?? () from .\fs/lib/libsrv_um.so
       Backtrace stopped: previous frame identical to this frame (corrupt stack?)

 Dump registers: 

r0             0x0      0
       r1             0xc01c6746       3223086918
       r2             0x7e859fd4       2122686420
       r3             0x1      1
       r4             0x31a6d30        52063536
       r5             0x7704   30468
       r6             0x1      1
       r7             0x36     54
       r8             0x1      1
       r9             0x1      1
       r10            0x251    593
       r11            0x3      3
       r12            0x0      0
       sp             0x7e859fd0       0x7e859fd0
       lr             0x2ab6faec       716634860                          0x2ab6faec:  add     sp, sp, #36     ; 0x24
       pc             0x2bcc2aec       0x2bcc2aec <ioctl+12>              0x2bcc2aec <ioctl+12>:       mov     r7, r12
       cpsr           0x20000010       536870928

Dump assembly code of function ioctl:

          0x2bcc2ae0 <+0>:     mov     r12, r7
          0x2bcc2ae4 <+4>:     mov     r7, #54 ; 0x36
          0x2bcc2ae8 <+8>:     svc     0x00000000
       => 0x2bcc2aec <+12>:    mov     r7, r12
          0x2bcc2af0 <+16>:    cmn     r0, #4096       ; 0x1000
          0x2bcc2af4 <+20>:    bxcc    lr
          0x2bcc2af8 <+24>:    b       0x2bc1c110 <__syscall_error>
       End of assembler dump.

 

ioctl(fd, request, argp) 
r0 = fd                  0                          
r1 = request          0xc01c6746           
r2 = argp              0x7e859fd4           

(gdb) x /32xw 0x7e859fd4
0x7e859fd4:     0xc01c6746      0x0000001c      0x7e85a000      0x00000008
                 ui32BridgeID     ui32Size              pvParamIn                ui32InBufferSize
0x7e859fe4:     0x7e85a008      0x00000008      0x00000001      0x2abfc000
                 pvParamOut         ui32OutBufferSize hKernelServices
0x7e859ff4:     0x2ab6f354      0x7e85a008      0x00000008      0x00006804

(gdb) x /32xw 0x7e85a000          pvParamIn     
0x7e85a000:     0x00006804      0x00000003      0x00000009      0x800000c5
0x7e85a010:     0x00000001      0x2ab74370      0x031a7660      0xeba5a988

(gdb) x /16xw 0x7e85a008          pvParamOut                                            
0x7e85a008:     0x00000009      0x800000c5      0x00000001      0x2ab74370
0x7e85a018:     0x031a7660      0xeba5a988      0x00000003      0x00000041
       
       PVR2DBlt(screen->deviceContext(), &blt_inf) arguments: 
       p *(PVR2DBLTINFO*)0x2ef3629c         //PVR2DBLTINFO            blt_inf;
       $1 = {
         CopyCode = 204,
         Colour = 0,
         ColourKey = 0,
         GlobalAlphaValue = 0 '\000',
         AlphaBlendingFunc = 0 '\000',
         BlitFlags = PVR2D_BLIT_DISABLE_ALL,
         pDstMemInfo = 0x31a6a00,
         DstOffset = 0,
         DstStride = 7680,
         DstX = 206,
         DstY = 499,
         DSizeX = 476,
         DSizeY = 65,
         DstFormat = 4,                
         DstSurfWidth = 1920,
         DstSurfHeight = 1080,
         pSrcMemInfo = 0x31a6a00,
         SrcOffset = 0,
         SrcStride = 7680,
         SrcX = 206,
         SrcY = 498,
         SizeX = 476,                           
         SizeY = 65,                      
         SrcFormat = 4,
         pPalMemInfo = 0x0,
         PalOffset = 0,
         SrcSurfWidth = 1920,
         SrcSurfHeight = 1080,
         pMaskMemInfo = 0x0,
         MaskOffset = 0,
         MaskStride = 0,
         MaskX = 0,
         MaskY = 0,
         MaskSurfWidth = 0,
         MaskSurfHeight = 0,
         pAlpha = 0x0,
         uSrcChromaPlane1 = 0,
         uSrcChromaPlane2 = 0,
         uDstChromaPlane1 = 0,
         uDstChromaPlane2 = 0,
         ColourKeyMask = 0,
         pPat = 0x0,
         PatX = 0,
         PatY = 0
       }

Based on dumping analysis, the call trace should be: 

--> PVR2DBlt --> PVR2DBltClipped --> AltBltClipped --> SGXQueueTransfer  ??? -->

       PVRSRVEventObjectWait --> OSEventObjectWait --> PVRSRVBridgeCall--> ioctl

 

Need PVR2D source code to help debugging.

PVR head file version defines:     

       #define PVRVERSION_MAJ               1
       #define PVRVERSION_MIN               9
       #define PVRVERSION_BRANCH            19

       #define PVRVERSION_FAMILY           "sgxddk"
       #define PVRVERSION_BRANCHNAME       "1.9.RC2"

       #define PVRVERSION_BUILD             2139099
       #define PVRVERSION_BSCONTROL        "SGX_DDK_Linux_CustomerTI"

       #define PVRVERSION_STRING           "SGX_DDK_Linux_CustomerTI sgxddk 19 1.9.RC2@" PVR_STR2(PVRVERSION_BUILD)
       #define PVRVERSION_STRING_SHORT     "1.9.RC2@" PVR_STR2(PVRVERSION_BUILD)

BTW: Not SGX source code from here: 

https://git.ti.com/cgit/graphics/omap5-sgx-ddk-linux/?h=ti_imgddk_1.9.0.12