• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Linux » Linux forum » EGLImageKHR destruction
Share
Linux
  • Forum
Options
  • Subscribe via RSS

EGLImageKHR destruction

EGLImageKHR destruction

This question is not answered
Jeje35
Posted by Jeje35
on Feb 08 2012 10:52 AM
Intellectual475 points

Using OMAP SDK 4.05.00-03 on DM3730, I notice that multiple eglCreateImageKHR/eglDestroyImageKHR (type EGL_NATIVE_PIXMAP_KHR) leads to memory leak.

And after 36 eglCreateImageKHR/eglDestroyImageKHR, eglCreateImageKHR return an error 0x300c (EGL_BAD_PARAMETER).

It looks as if eglDestroyImageKHR does not do any desallocation.

Here below the loop I tested:

for (i=0; i< NB_REPEAT; i++) {

mDrawable = 0;
  mDrawable = XCreatePixmap(x11Display, x11Window,
                         disp_w, disp_h,
                         depth);
  if (!mDrawable)
        printf("XCreatePixmap failed!\n");
  else        
        printf("loop %d drawable = %d\n",i,mDrawable);
 
  XSync(x11Display, False);
 
  //create an KHR image
  khrImage = 0;
  khrImage = peglCreateImageKHR(dpy,
                        EGL_NO_CONTEXT,
                        EGL_NATIVE_PIXMAP_KHR,
                        mDrawable,  
                        NULL);
   
  if((!khrImage) || (err = eglGetError()) != EGL_SUCCESS){
    printf("Error after peglCreateImageKHR!, error = %x\n", err);
  } else {
    printf("peglCreateImageKHR Success! \n");
  }

    XFreePixmap (x11Display, mDrawable);
    XSync(x11Display, False);

    peglDestroyImageKHR(dpy, khrImage);


  if((err = eglGetError()) != EGL_SUCCESS){
    printf("Error after peglDestroyImageKHR!, error = %x\n", err);
  } else {
    printf("peglDestroyImageKHR Success! \n");
  }        
} 

Why is the virtual memory size of the process increasing during this loop ? It isn't if no EGLImageKHR is created but only the pixmaps.

Why does eglCreateImageKHR fail (with error 0x300c) after 36 iterations ?

Thank you for your answers.

Output of script sgxperf_check.sh on our plateform:

~ # sgxperf_check.sh
WSEGL settings
[default]
WindowSystem=libpvrPVR2D_DRIWSEGL.so
DisableHWTextureUpload=1
------
ARM CPU information
Processor       : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 912.72
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : OMAP3 Bsm200 Board
Revision        : 0020
Serial          : 0000000000000000
------
SGX driver information
Version 1.6.16.4117 (release) /usr/software/embedded-systems/subsystems/ti/omap/
sdk/4.05.00-03/build-innes.playzilla-and-elinux.sm2/GFX_Linux_KM
System Version String: SGX revision = 1.2.5
------
Framebuffer settings
------
Rotation settings
0
------
Kernel Module information
sierra 8125 0 - Live 0xbf158000
libertas_sdio 7919 0 - Live 0xbf150000
libertas 55044 1 libertas_sdio, Live 0xbf139000
bufferclass_ti 4978 0 - Live 0xbf132000
pvrsrvkm 163978 3 bufferclass_ti, Live 0xbf0f9000
drm 137309 3 pvrsrvkm, Live 0xbf0c3000
cmemk 21002 0 - Live 0xbf0b7000
lpm_omap3530 6381 0 - Live 0xbf0af000
dsplinkk 122621 1 lpm_omap3530, Live 0xbf083000
omap_vout 17448 0 - Live 0xbf077000
omap3_isp 90844 0 - Live 0xbf055000
videobuf_dma_contig 3234 1 omap_vout, Live 0xbf04f000
videobuf_core 13997 2 omap_vout,videobuf_dma_contig, Live 0xbf045000
omapfb 24671 2 - Live 0xbf038000
panel_sharp_ls037v7dw01 2069 0 - Live 0xbf032000
generic_bl 1783 0 - Live 0xbf02c000
panel_generic 1655 1 - Live 0xbf026000
omapdss 98581 4 omap_vout,omapfb,panel_sharp_ls037v7dw01,panel_generic, Live 0xb
f000000
------
Boot settings
smsc95xx.mac=00ffd20d7a04 psn=00000-00004 console=ttyO0,115200n8 consoleblank=0
mpurate=auto mem=414M@0x80000000 root=/dev/mmcblk0p3 rw rootfstype=ext4 rootwait
------
Linux Kernel version
Linux sma200 2.6.37-INNES_patched #1 Mon Jan 23 12:04:20 CET 2012 armv7l GNU/Linux

   

DM3730
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • AnBer
    Posted by AnBer
    on Mar 02 2012 06:03 AM
    Genius9605 points

    Seems that the latest graphics SDK Release engineering drop 04.06.00.01 that fixes this issue.
    Please give it a try.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jeje35
    Posted by Jeje35
    on Mar 08 2012 11:15 AM
    Intellectual475 points

    I confirm that SDK 04.06.00.01 fixes the issue. Thank you.

    But is this version official ? Many libraries (for example in gfx_rel_es5.x directory) are very smaller than in SDK 04.05.00.03. Why ? 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prathap Srinivas
    Posted by Prathap Srinivas
    on Apr 09 2012 07:20 AM
    Expert4050 points

    Hi,

    Thanks for the confirmation that 04.06.00.01 fixes the issue. We have the graphics SDK 04.06.00.01 official version available for download at -

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html

    Also as mentioned/already confirmed by you above , can you please close this query by clicking on verify answer for this post?

    Thanks,

    Prathap.

    If my reply answers your question then please click on the "Verify Answer" button.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prathap Srinivas
    Posted by Prathap Srinivas
    on Apr 20 2012 10:25 AM
    Expert4050 points

    Hi,

    Can you please mark the above post as verified answer as it will help/benefit other users when they run into similar problem.

    Thanks,

    Prathap.

    If my reply answers your question then please click on the "Verify Answer" button.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use