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.

Am335x - Simple GUI Application takes 65% CPU

Hello all!

I am using TI's EVM Am335x.

It has Qt libraries it, as you all know.

I wrote a simple GUI application using Qt.

The application is pretty simple. I have a table widget with prepopulated data of about 50 rows in it.

I ran this application on the target. The CPU was showing 0% as the app was idle.

I dragged the scroll bar up and down continuously and the CPU usage was raising up drastically to 40% and then to 60% and still growing.

I have no idea on why.

Can someone please explain about it and also on how to keep it optimized?

Thanks,

Kumara

  • Hi,

    Which SDK are you using on your GP EVM?

    Also do you have the pvr driver installed?

    Best Regards,
    Yordan
  • TI-SDK-7.0

    What is that PVR driver? Can you please tell me bit more about it?

    Thanks!
    Kumara
  • On the AM335x running the SDK 7.00 binaries I can execute lsmod to see all modules installed:

    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    g_mass_storage          1787  0
    usb_f_mass_storage     32479  2 g_mass_storage
    libcomposite           30114  2 usb_f_mass_storage,g_mass_storage
    configfs               19119  3 libcomposite,usb_f_mass_storage
    bufferclass_ti          5405  0
    omaplfb                11426  0
    cryptodev              31027  1
    musb_dsps               6511  0
    musb_hdrc              52593  1 musb_dsps
    wlcore_sdio             4233  0
    pvrsrvkm              175491  2 bufferclass_ti,omaplfb
    snd_soc_omap            2494  0
    snd_pcm_dmaengine       2997  1 snd_soc_omap
    snd_soc_evm             7186  0
    snd_soc_tlv320aic3x    28998  1
    snd_soc_davinci_mcasp     9484  2
    snd_soc_davinci         5438  1 snd_soc_davinci_mcasp
    snd_soc_core           99221  5 snd_soc_davinci_mcasp,snd_soc_omap,snd_soc_davinci,snd_soc_tlv320aic3x,snd_soc_evm
    snd_compress            7419  1 snd_soc_core
    regmap_spi              1469  1 snd_soc_core
    snd_pcm                66734  5 snd_soc_core,snd_soc_omap,snd_soc_davinci,snd_soc_evm,snd_pcm_dmaengine
    snd_page_alloc          4843  1 snd_pcm
    lis3lv02d_i2c           2777  0
    btwilink                3560  0
    snd_timer              16028  1 snd_pcm
    snd                    45368  4 snd_soc_core,snd_timer,snd_pcm,snd_compress
    lm75                    3794  0
    tsl2550                 3484  0
    lis3lv02d              12765  1 lis3lv02d_i2c
    soundcore               4767  1 snd
    input_polldev           2384  1 lis3lv02d
    ti_am335x_adc           3183  0
    musb_am335x             1199  0
    industrialio           32701  1 ti_am335x_adc
    bluetooth             204293  2 btwilink

    The most important module (for graphics) is pvrsrvkm.

    In the console logs I could see the following messages displayed as it started up:

    Starting PVR
    Starting SGX fixup for ES8.x

    Those messages came from /etc/init.d/pvr-init which was invoked during the kernel boot.

    Brad

  • So here is my lsmod looks like - 

    root@kumara:~# lsmod
    Module Size Used by
    cmv 5825 0
    stkChk 2774 0
    apm 3724 0
    usb_f_ecm 6963 1
    g_ether 1783 0
    usb_f_rndis 7030 2 g_ether
    u_rndis 9846 1 usb_f_rndis
    libcomposite 30114 3 usb_f_ecm,usb_f_rndis,g_ether
    u_ether 10080 3 usb_f_ecm,usb_f_rndis,g_ether
    cfg80211 163054 0
    musb_dsps 6511 0
    musb_hdrc 52314 1 musb_dsps
    snd_soc_cpld 2627 0
    snd_soc_audtel 2919 0
    snd_soc_davinci_mcasp 9564 4
    snd_soc_gaudtel 1473 1
    snd_soc_gcpld 1435 1
    snd_soc_davinci 5438 1 snd_soc_davinci_mcasp
    snd_soc_core 99125 6 snd_soc_davinci_mcasp,snd_soc_cpld,snd_soc_davinci,snd_soc_gcpld,snd_soc_gaudtel,snd_soc_audtel
    regmap_spi 1469 1 snd_soc_core
    serial9bitdriver 36396 0
    musb_am335x 1199 0
    snd_pcm 62964 3 snd_soc_core,snd_soc_davinci,snd_soc_audtel
    snd_timer 15720 1 snd_pcm
    snd_page_alloc 4843 1 snd_pcm
    snd_compress 7119 1 snd_soc_core
    snd 37391 4 snd_soc_core,snd_timer,snd_pcm,snd_compress
    soundcore 688 1 snd

    I dont see pvrsrvkm running. As a side note, this is a trimmed rootfs, meaning, removed the unwanted libraries from the SD card.

    So this looks to be an interesting one.

    So what does this driver does? Will it help me in improving the performance and the CPU usage when we render graphics on the LCD?

    Thanks,

    Kumara

  • So I did a quick test.

    I started up my EVM with the default rootfs that comes up with the package.

    Now I see that pvrsrvskm is loaded.

    root@am335x-evm:~# lsmod
    Module Size Used by
    g_mass_storage 1787 0
    usb_f_mass_storage 32479 2 g_mass_storage
    libcomposite 30114 2 usb_f_mass_storage,g_mass_storage
    configfs 19119 3 libcomposite,usb_f_mass_storage
    bufferclass_ti 5405 0
    omaplfb 11426 0
    cryptodev 31027 0
    musb_dsps 6511 0
    musb_hdrc 52593 1 musb_dsps
    snd_soc_omap 2494 0
    snd_pcm_dmaengine 2997 1 snd_soc_omap
    pvrsrvkm 175491 2 bufferclass_ti,omaplfb
    snd_soc_evm 7186 0
    snd_soc_davinci_mcasp 9484 2
    snd_soc_davinci 5438 1 snd_soc_davinci_mcasp
    snd_soc_tlv320aic3x 28998 1
    snd_soc_core 99221 5 snd_soc_davinci_mcasp,snd_soc_omap,snd_soc_davinci,snd_soc_tlv320aic3x,snd_soc_evm
    snd_compress 7419 1 snd_soc_core
    regmap_spi 1469 1 snd_soc_core
    snd_pcm 66734 5 snd_soc_core,snd_soc_omap,snd_soc_davinci,snd_soc_evm,snd_pcm_dmaengine
    musb_am335x 1199 0
    snd_page_alloc 4843 1 snd_pcm
    snd_timer 16028 1 snd_pcm
    snd 45368 4 snd_soc_core,snd_timer,snd_pcm,snd_compress
    lis3lv02d_i2c 2777 0
    soundcore 4767 1 snd
    lis3lv02d 12765 1 lis3lv02d_i2c
    input_polldev 2384 1 lis3lv02d


    With this, I ran a demo application that has scroll bar in it. And I kept scrolling up and down and I see that CPU usage has hit 65%.
    And also I ran some example applications which comes with TI. I see that CPU usage is higher as good as 65% and also I see that it hits 99% at times.

    Probably, this driver might be useful for graphics rendering. May be if I have some animations in my applications, this might be useful.

    But my application is a simple one with scrollbar. I was doubting my application and tested the example applications which has scrollbar, no success though.


    This is still a puzzle for me.

    Any leads?

    Thanks,
    Kumara