This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SGX Lockup (AM3517)

Other Parts Discussed in Thread: AM3517, OMAP3530

I have an OpenGL ES1 application that has been run previously on OMAP3530 and now more recently on the AM3517.

With the latest set of drivers 3.1.0.6 and a 2.6.32 kernel it locks up after a fairly random amount of time (20 minutes to 20 hours+). The previous set I was using were 3.0.0.9.

I think it might be something to do with updating textures in a VBO periodically (approximately once a second) - this is a bit of a wild guess!

Adding "DisableHWTextureUpload=1" to /etc/powervr.ini seems to make the problem worse (locks up in 1 to 2 minutes) - it isn't clear to me what this means.

 

The lock up is:

#0  0x4024081c in ioctl () from /lib/libc.so.6
#1  0x400c0874 in PVRSRVBridgeCall (hServices=<value optimized out>, ui32FunctionID=3223086917, pvParamIn=<value optimized out>,
    ui32InBufferSize=<value optimized out>, pvParamOut=0xbebce308, ui32OutBufferSize=8)
    at /home/prabu/gfxsdkcreate_new/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/pvr_bridge_u.c:201
#2  0x400c01c4 in PVRSRVEventObjectWait (psConnection=<value optimized out>, hOSEvent=0xf)
    at /home/prabu/gfxsdkcreate_new/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/osfunc_um.c:307
#3  0x400c3ff4 in SGXKickTA (psDevData=0x0, psKickTA=0x436e28, psKickOutput=0x436fa8, pvKickPDUMP=<value optimized out>, pvKickSubmit=0x0)
    at /home/prabu/gfxsdkcreate_new/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/devices/sgx/sgxkick_client.c:1462
#4  0x4004c5e8 in ScheduleTA (gc=0x436e20, psRenderSurface=0x435d68, ui32KickFlags=0) at sgxif.c:1474
#5  0x400603fc in GLES1EmitState (gc=<value optimized out>, ui32NumIndices=3200051268, uIndexAddress={uiAddr = 28233728}, ui32IndexOffset=1074015596)
    at validate.c:5813
#6  0x4003a134 in glDrawArrays (mode=5, first=0, count=4) at drawvarray.c:2146
#7  0x0002dc50 in widget_button_render (w=0xc99b88, parent_props=0xbebce9b0) at phone_gui/src/widget-button.c:99

 

Digging through the source, the ioctl that it is blocked on is PVRSRV_BRIDGE_EVENT_OBJECT_WAIT.

 

Can anyone offer any insight into this? Currently updates to the VBO are done as follows:

Enter the render function ...

if(t->data_changed && t->gl_handle != 0)
{
  glBindTexture(GL_TEXTURE_2D, t->gl_handle);
  glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, t->texture_width, t->texture_height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, t->data);
  t->data_changed = false;
}

Render ...

 

 

This texture updating thing could be a complete red herring - I will try and make a smaller text case, but in the meantime any one have any bright ideas?

Thank you in advance!

Richard.

 

  • Richard, Did not see the VBO update code. If you have an application running on the EVM, can you share along with pseudo-code ?

     

     

  • Sorry that was a sloppy description. The texture is not in a VBO.

    So, I create the texture:

      glGenTextures(1, &t->gl_handle);
      glBindTexture(GL_TEXTURE_2D, t->gl_handle);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, t->texture_width, t->texture_height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, t->data);   
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

     

    The textures that are getting updated are text from freetype.

    I have a thread that is calling freetype to create the texture for a given string. This is then copied into t->data, this then sets the t->data_changed

    The other thread then repeatedly renders the text:

    glBindBuffer(GL_ARRAY_BUFFER, p->t_vbo);
    glTexCoordPointer(2, GL_SHORT, 0, NULL);
    glEnable(GL_TEXTURE_2D);

    if(t->data_changed && t->gl_handle != 0)
    {
      glBindTexture(GL_TEXTURE_2D, t->gl_handle);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, t->texture_width, t->texture_height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, t->data);
      t->data_changed = false;
    }
    glBindTexture(GL_TEXTURE_2D, t->gl_handle);
    glColor4x(COL_TO_FP(w->red), COL_TO_FP(w->green), COL_TO_FP(w->blue), alpha);

    glPushMatrix();

    glTranslatex(TO_FP(x), TO_FP(y), TO_FP(z));

    glScalex(TO_FP(width), TO_FP(height), TO_FP(1));

    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

    glPopMatrix();

     

    Again, there is a lot of other code running, this small snippet is only any use if there is a high certainty that this could cause the lockup.

  • One further observation, changing FLIP to FRONT or BLIT in /etc/powervr.ini seems to improve things?

    Running for 15 minutes so far, still with DisableHWTextureUpload=1 - I'll leave it going over night to see what happens ...

  • Hi, Richard!

    Did it help to you? 

    Regards