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.

Linux/AM3358: Display rotation

Part Number: AM3358
Other Parts Discussed in Thread: DA8XX

Tool/software: Linux

Hello!

I have TI EVM for AM335x, which is in lanscape mode by default.

When I run my Qt application in it, it runs in landscape mode. 

But, I would like to run my application in portrait mode, because of the requirement.

I can rotate my QWS Display by setting up the environment variable to rotate my application, but that looks costly. When I run the performance monitor tool on my application, I can see that processor is spending most of the time in rotating the framebuffer. If I understand correctly, when I rotate my QWS, it converts qvfb contents to frame buffer for the pixel mapping.

I would like to set the rotation by default at linux level, so that I don't need to rotate at the application level.

Please help me in this regard.

Thank you,

Kumara

  • The AM335x LCD controller does not support hardware rotation, this must be done in software.
  • Thank you Biser for the response.

    I did try by changing the value to /sys/class/graphics/fbcon/rotate - Observation is that, I can see the penguin icon that appears during boot up. By changing the rotate value, I can see the position of icon moves around. But I wonder, why not my application. Any thoughts?
  • Hi Kumara,

    If you are using AM335x part with SGX on it then SGX can be used for rotation using openGL programming. I do not have any reference example application to share for same.

    Alternately you can try weston windows manager (supported on Processor SDK) but it consume CPU cycle.

    To achieve 180 degree rotation using Weston, configure /etc/weston.ini file as below

    [output]
    name=<connector name ex: HDMI-A-1>
    transform=180

    you can get connector name running modetest application.
  • Hi Manisha,

    Thank you for the response.

    This looks interesting!

    Currently, I don't have SGX enabled for my board. If you can tell me how to enable SGX for my hardware and how to do the rotation, that will be awesome!

    And also, if you can tell me on the performance details of SGX, that will be great as well. That is, if I enable SGX what will be the impact on performance, will it improve or degrade? With the performance details, I can think about enabling this engine or not.

    Here are the more details: We are using TI SDK 0.0 PSP bundled with Qt 4.8.

    -Kumara

  • If you are using TI GP EVM and Processor SDK Linux, SGX should be on by default.

    Just enabling SGX is not going to impact the performance on the system. Using SGX for rotation compared to doing it in ARM, certainly it will be less MHz consumed by ARM when the rotation is done on SGX.

    SGX performance number is currently available for AM57x only. You can refer to the benchmarking numbers here -

    Also refer to below link -

  • To clarify (on Kumara's behalf), we are using ti-sdk-am335x-evm-07.00.00.00 and the QT that was bundled (QT 4.8).  We ran the gfx_check.sh and it appears pvr is not loaded.

    Here is the result

    WSEGL settings
    [default]
    WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1
    ------
    ARM CPU information
    processor       : 0
    model name      : ARMv7 Processor rev 2 (v7l)
    Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant     : 0x3
    CPU part        : 0xc08
    CPU revision    : 2

    Hardware        : Generic AM33XX (Flattened Device Tree)
    Revision        : 0000
    Serial          : 0000000000000000
    ------
    SGX driver information
    cat: can't open '/proc/pvr/version': No such file or directory
    ------
    Framebuffer settings

    mode "640x480-60"
        # D: 25.000 MHz, H: 31.250 kHz, V: 59.524 Hz
        geometry 640 480 640 960 32
        timings 40000 114 16 32 10 30 3
        rgba 8/16,8/8,8/0,8/24
    endmode

    Frame buffer device information:
        Name        : DA8xx FB Drv
        Address     : 0x8d900000
        Size        : 2457600
        Type        : PACKED PIXELS
        Visual      : TRUECOLOR
        XPanStep    : 0
        YPanStep    : 1
        YWrapStep   : 0
        LineLength  : 2560
        Accelerator : No
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    stkChk                  2774  0
    cmv                     5825  0
    apm                     3660  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              52356  1 musb_dsps
    snd_soc_audtel          2919  1
    snd_soc_cpld            2627  0
    snd_soc_davinci_mcasp     9604  4
    snd_soc_gcpld           1435  1
    snd_soc_davinci         5438  1 snd_soc_davinci_mcasp
    snd_soc_gaudtel         1473  1
    snd_soc_core           99125  6 snd_soc_davinci_mcasp,snd_soc_cpld,snd_soc_davinci,snd_soc_gcpld,snd_soc_gaudtel,snd_soc_audtel
    serial9bitdriver       37002  1
    regmap_spi              1469  1 snd_soc_core
    musb_am335x             1199  0
    snd_pcm                62968  4 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  5 snd_soc_core,snd_timer,snd_pcm,snd_compress
    soundcore                688  1 snd
    ------
    Boot settings
    console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait ip=off lpj=3590144 video=/dev/fb0:480x640@60 fbcon=rotate:1
    ------
    Linux Kernel version
    Linux Node00b01973d728 3.12.10-Edwards.00.00.20-ti2013.12.01 #2 Wed Aug 16 11:06:01 EDT 2017 armv7l GNU/Linux

    What do we need to do it enable the SGX?

  • We don't support that SDK version. It's too old. I won't be able to comment on it.
  • It was our understanding that the gfx was enabled by default on the 7.00.00 SDK but for some reason it doesn't seem to be in ours. We don't recall disabling it so we are asking for assistance to figure out why.

    Perhaps you have legacy documentation for the 7.00.00 that can you share.

  • Hi Peter,

    Sorry, there is no access to legacy documentation.
  • Thank you Manisha for the answers! Thank you Pete for taking the answers going out to Manisha!

    Manisha,
    If at all we need support on TI SDK 7, what would be the right approach? I ask this because, I am not sure that if we can update the TI SDK sooner. Down the line, we may plan for it, but not for now. However, we will need to get the solutions for the problems to keep going.

    Please let us know.

    Thank you,
    Kumara
  • Hi Kumara,

    TI SDK 7 has graphics enabled. You can find it by  launching Matrix demo and check for graphics demo there.  Graphics usage is via OpenGL ES 2.0.

    Only document that existed to enable SGX can be find using below link -

    .

    I won't be able to help much if you find issues with the document.

    Below is the link for example application with rotation using SGX but this is using our latest Processor SDK 4.1 -