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.

Building AM335x Linux SDK without Wayland

AM335x EVM
Proc SDK Linux 3.01

I'm trying to rebuild the file system without Wayland.  For a specific use case I don't want a full window system.  I would just like to run an app full screen using EGL/EGLFS.

I added this to bottom of conf/local.conf:

DISTRO_FEATURES_remove = "wayland"

I was able to successfully build:

MACHINE=am335x-evm bitbake tisdk-rootfs-image

Things are partially working.  I eventually see the Matrix GUI come up, but I'm getting lots of these sorts of messages:

[ 126.186252] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
[ 126.195144] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 126.196095] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost

How do I get this to work?

  • Hi Brad,

    The software team have been notified. They will respond here.
  • I was able to get the underflows to stop by executing this command from the console:

    devmem2 0x4C000054 w 0x00FFFF30

    Also, in order to get the touchscreen to work properly for matrix gui, I had to add a line to /etc/profile.d/qt_env.sh:

    export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=180"

    It seems to be behaving now...

  • Brad Griffis said:

    I was able to get the underflows to stop by executing this command from the console:

    devmem2 0x4C000054 w 0x00FFFF30

    A cleaner way of doing this same thing is to patch *u-boot* (not Linux) with the following:

    From 54fe62a49719fd719e89286416da7ec88bab3e45 Mon Sep 17 00:00:00 2001
    From: Brad Griffis
    Date: Tue, 13 Dec 2016 11:40:27 -0600
    Subject: [PATCH] [AM335x] Avoid EMIF command starvation

    Section 7.3.3.5.2 "Command Starvation" of the AM335x TRM
    discusses capabilities related to avoiding command starvation.
    There are a couple different options, CoS or a simple counter.
    This patch is enabling the simple counter mechanism.

    Any systems having serious latency issues related to DDR might
    consider either further reducing this timeout value or using the
    more sophisticated CoS methods instead. Note that reducing this
    value by too much will inhibit the EMIF's ability to optimally
    order commands. The goal is to keep this value as large as
    possible while still meeting all real-time deadlines.
    ---
    arch/arm/cpu/armv7/am33xx/ddr.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/arch/arm/cpu/armv7/am33xx/ddr.c b/arch/arm/cpu/armv7/am33xx/ddr.c
    index 6acf30c..00c72c1 100644
    --- a/arch/arm/cpu/armv7/am33xx/ddr.c
    +++ b/arch/arm/cpu/armv7/am33xx/ddr.c
    @@ -187,6 +187,10 @@ void config_sdram(const struct emif_regs *regs, int nr)
    */
    void set_sdram_timings(const struct emif_regs *regs, int nr)
    {
    +#ifdef CONFIG_AM33XX
    + /* Enable timeout feature to avoid command starvation */
    + writel(0x00FFFF30, &emif_reg[nr]->emif_l3_config);
    +#endif
    writel(regs->sdram_tim1, &emif_reg[nr]->emif_sdram_tim_1);
    writel(regs->sdram_tim1, &emif_reg[nr]->emif_sdram_tim_1_shdw);
    writel(regs->sdram_tim2, &emif_reg[nr]->emif_sdram_tim_2);
    --
    2.7.4

  • For completeness, it looks like TI's developers already beat me to the punch... Here's the commit that applies against u-boot from Proc SDK 3.01 that is the "official" fix for this underflow:

    git.ti.com/.../

    And in the u-boot mainline (i.e. "master" branch) they recently applied a similar patch there, though the directory structure is a bit different in the latest u-boot:

    git.denx.de/