Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compiling QML app to use hardware acceleration on Sitara processors
Forum Updated to NodeBB v4.3 + New Features

Cross compiling QML app to use hardware acceleration on Sitara processors

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 889 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tim T
    wrote on last edited by
    #1

    Hi,

    We are developing a QML based application to run using embedded Linux on a Beagle Board X15 (Sitara AM5728). We are using the SDK provided by Ti, which has Qt5.11.3 installed, because we need other Ti driver support. We can successfully cross compile applications, however, we are unsure how to compile, or run them with hardware acceleration enabled. We know hardware acceleration is available because some of Ti's Qt demo apps function as expected.

    When we run our app without weston and using --platform eglfs it consumes 100% of the CPU even though there is no animation happening.

    So to rule out us doing something wrong in our simple program we did the same exercise with the "cube" example program provide by Qt.

    When we run cube without weston and using --platform eglfs it consumes 100% of the CPU even though there is no rotation happening.

    When we run cube inside of weston it consumes <5% of the CPU while rotating the cube. So this looks like hardware acceleration is working.

    How do we run a Qt QML app without a windowing system like weston and get hardware acceleration?

    Thanks,
    Tim

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Could it be possible that you are in fact using the Mesa software pipeline ?

      Did you check the configure output to see which hardware acceleration you had activated ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      0
      • T Tim T

        Hi,

        We are developing a QML based application to run using embedded Linux on a Beagle Board X15 (Sitara AM5728). We are using the SDK provided by Ti, which has Qt5.11.3 installed, because we need other Ti driver support. We can successfully cross compile applications, however, we are unsure how to compile, or run them with hardware acceleration enabled. We know hardware acceleration is available because some of Ti's Qt demo apps function as expected.

        When we run our app without weston and using --platform eglfs it consumes 100% of the CPU even though there is no animation happening.

        So to rule out us doing something wrong in our simple program we did the same exercise with the "cube" example program provide by Qt.

        When we run cube without weston and using --platform eglfs it consumes 100% of the CPU even though there is no rotation happening.

        When we run cube inside of weston it consumes <5% of the CPU while rotating the cube. So this looks like hardware acceleration is working.

        How do we run a Qt QML app without a windowing system like weston and get hardware acceleration?

        Thanks,
        Tim

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Tim-T
        you may also want to try with QSG_RENDER_LOOP=basic environment variable.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        T 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi and welcome to devnet,

          Could it be possible that you are in fact using the Mesa software pipeline ?

          Did you check the configure output to see which hardware acceleration you had activated ?

          T Offline
          T Offline
          Tim T
          wrote on last edited by
          #4

          @SGaist Thanks for your suggestion. I apologize but I don't know how to check if I am using the Mesa software pipeline or where to see the configure output for the hardware acceleration. Can you point me to something explaining how to do that?

          1 Reply Last reply
          0
          • raven-worxR raven-worx

            @Tim-T
            you may also want to try with QSG_RENDER_LOOP=basic environment variable.

            T Offline
            T Offline
            Tim T
            wrote on last edited by
            #5

            @raven-worx Good suggestion. I read up on that environment variable and it seems like it would be the culprit. Unfortunately I tested it and the cube example still consumes 100% of the CPU. To be clear this is what I did:

            /etc/init.d/weston stop
            export QSG_RENDER_LOOP=basic
            /usr/share/examples/opengl/cube/cube --platform eglfs &
            top
            

            The top command had these results:

            top - 22:43:03 up 5 min,  1 user,  load average: 0.82, 0.65, 0.31
            Tasks: 125 total,   3 running, 122 sleeping,   0 stopped,   0 zombie
            %Cpu(s): 19.0 us, 35.1 sy,  0.0 ni, 45.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
            MiB Mem :   1787.8 total,   1427.6 free,    133.6 used,    226.7 buff/cache
            MiB Swap:      0.0 total,      0.0 free,      0.0 used.   1604.8 avail Mem
            
              PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
             1190 root      20   0   98592  34268  29716 R 104.6   1.9   0:23.12 cube
                7 root      20   0       0      0      0 R   0.5   0.0   0:00.07 kworker/u4:0+events_unbound
              483 root      20   0       0      0      0 I   0.5   0.0   0:00.06 kworker/u4:3-pvr_workqueue
            ...
            
            raven-worxR 1 Reply Last reply
            0
            • T Tim T

              @raven-worx Good suggestion. I read up on that environment variable and it seems like it would be the culprit. Unfortunately I tested it and the cube example still consumes 100% of the CPU. To be clear this is what I did:

              /etc/init.d/weston stop
              export QSG_RENDER_LOOP=basic
              /usr/share/examples/opengl/cube/cube --platform eglfs &
              top
              

              The top command had these results:

              top - 22:43:03 up 5 min,  1 user,  load average: 0.82, 0.65, 0.31
              Tasks: 125 total,   3 running, 122 sleeping,   0 stopped,   0 zombie
              %Cpu(s): 19.0 us, 35.1 sy,  0.0 ni, 45.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
              MiB Mem :   1787.8 total,   1427.6 free,    133.6 used,    226.7 buff/cache
              MiB Swap:      0.0 total,      0.0 free,      0.0 used.   1604.8 avail Mem
              
                PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
               1190 root      20   0   98592  34268  29716 R 104.6   1.9   0:23.12 cube
                  7 root      20   0       0      0      0 R   0.5   0.0   0:00.07 kworker/u4:0+events_unbound
                483 root      20   0       0      0      0 I   0.5   0.0   0:00.06 kworker/u4:3-pvr_workqueue
              ...
              
              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by raven-worx
              #6

              @Tim-T
              just for clarification, top shows the % of CPU consumption in 100%*NUM_OF_CORES. So your effective CPU consumption is around 50% for your board. Bust still too hight, yes

              You may also want to read this: https://www.qt.io/blog/2017/01/18/opengl-implementation-qt-quick-app-using-today

              You could also use valgrind (callgrind) to check which methods causes the most execution time. It should give some hints if its rendering afterall or something else.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved