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.

AM5728: Need to duplicate LCD output on HDMI

Part Number: AM5728

Hello,

We need to display the same output on both the LCD and HDMI. I can use u-boot optargs omapdrm.displays=0 and 1 to change the primary display output, which confirms both LCD and HDMI output are working correctly. Similarly, omapdrm.displays=0,1 and 1,0 also select the primary output (but don't change the end result)

When we run our application, some but not all of the images are displayed on both screens. I've tried adding "[output]" sections to /etc/weston.ini, but don't see all the images. (I've used "transform=180" to confirm weston is using the output sections)

Interestingly enough, I can completely remove the boot optargs omapdrm.displays and weston.ini output sections, and the end result is the same: some but not all of our application output is shown on both screens.

I've searched and searched these forums. Some responses say weston dual output works, some responses say it's not supported. I'd appreciate pointers where to look to figure out why it partially works.

In addition, I'd been reading the AM572x Technical Reference Manual. Multiple places mention the HDMI output can duplicate the LCD output. This is anr option if weston doesn't support dual output. However, I haven't found a TRM section with register settings and initialization sequence. Section numbers or example code would help.

Any help would be appreciated.

Thanks,

Scott

  • Hi Scott,

    The device does not support hardware cloning, however we do have a demo application that can be modified to accomplish your goal.

    Take a look here: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Examples_and_Demos/Application_Demos/Video_Graphics_Test.html

    You can find the source in the example-applications folder of the Linux SDK, i.e., ti-processor-sdk-linux-am57xx-evm-xxxxx/example-applications/video-graphics-test-1.0/

    Regards,
    Mike

  • Hi Mike,

    The description of the demo code sounds promising, but it doesn't run:

    # insmod /lib/modules/4.14.54-g34527933fc/extra/galcore.ko baseAddress=0x80000000 physSize=0x80000000
    # /etc/init.d/weston stop
    Stopping Weston
    # export QT_QPA_EGLFS_INTEGRATION=eglfs_km
    # ./video_graphics_test -platform eglfs
    qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_km"
    EGL library doesn't support Emulator extensions
    Aborted (core dumped)

    Is there documentation available? The "Video_Graphics_Test.html" page just mentions the commands to run it, but no information how set up the environment or what to do if there are problems.

    Thanks,

    Scott

  • Hello,

    Are there any working examples or any documentation for multiple displays?

    Thanks,

    Scott

  • Hi Scott,

    Apologies for the delay - let me take a look at what it will take to get the demo running, and get back with you.

    Edit: just noticed there might be a typo in the instructions: we might want to do the following:

    export QT_QPA_EGLFS_INTEGRATION=eglfs_kms

    (notice the 's' on "kms" is added).  I will check on my end as well, and wanted to pass along this in case you're able to test before I can.

    Regards,
    Mike

  • Scott,

    It looks like both eglfs_km and eglfs_kms will work, but the catch is the application is expecting a camera to be present.  I believe this is why the application is crashing for you - I saw the same behavior without the camera.

    You can modify the application to remove this requirement - it will need to be modified regardless to duplicate the framebuffer on both displays.

    Regards,
    Mike

  • Hi Mike,

    What code changes did you make to remove the camera requirement so the application runs and displays output on both screens?

    Thanks,

    Scott

  • Scott,

    Can you take a look and let me know if you have any difficulties?  The code is actually surprisingly well documented.  You will see some V4L2 function calls, and related buffers that hold the data.  That would all need to go.  You would then essentially copy the buffer for Display 1 to the Display 2 data structure.  Not sure it will be as simple as pointing both displays to a common buffer.

    Regards,
    Mike 

  • Hi Mike,

    I removed V4L2 function calls and the result is the same:

    qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_km"
    EGL library doesn't support Emulator extensions
    Aborted (core dumped)

    Since it's crashing without any output on either display, I'm not yet copying buffers.

    What changes did you make to get the code to work?

    Thanks,

    Scott

  • Hi Scott,

    Thank you for your patience.

    I have a working demo for you with both displays cloned.  There is probably a few minor tweaks that could be made to improve CPU loading (looks like we are continuously trying to refresh the display in the main thread, when we could be sleeping during the blanking period).

    At a high-level, I simply hacked out everything related to v4l2 and gc320, and then in main.cpp, we simply remove the if/ else statement in the addView function, causing both displays to be drawn with the same content (e.g., select the world clocks or the game).

    I am in contact with your FAE, and will be delivering the project to you tomorrow.  I will mark this thread as resolved, and can re-open if you have additional questions.

    Regards,
    Mike

  • Hi Mike,

    Is there a newer TI version of Weston available? One that supports cloning / duplicating? We're using version 2.0.0 from TI. The last change date (according to git) is from Karthik Ramanan <a0393906@ti.com> at Mar 12 10:56:28 2018 +0530: weston: Fix touch screen crash issue

    Thanks,

    Scott

  • Hi Scott,

    This is a limitation of the device, not weston, and is why we need to duplicate the display in software.

    Regards,
    Mike