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: LCDC FIFO underfow error

Part Number: AM3358


Tool/software: Linux

hi all:

CPU:am3358

SDK:ti-processor-sdk-linux-am335x-evm-03.02.00.05

filesystem:arago-base-tisdk-image-am335x-evm or tisdk-rootfs-image-am335x-evm

when i boot on my board,sometimes the lcd will display a error ,follow picture show the error.

when this error appear,the debug message will show below.

[ 2154.711045] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
[ 2154.726868] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.733636] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.743661] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.750484] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.759628] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.766446] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.776424] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.783188] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.793215] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2154.800045] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
[ 2155.029849] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost flood detected, disabling the interrupt.

if I use the filesystem from the SDK,I boot 10 times,this error will appear more 5 times.

I think some sprict in the filesystem is make this mistake,an find if i remove the file "/etc/systemd/system/getty.target.wants/getty@tty1.service",

I boot on more than 100 times,it only appear 1 times, when i run my qt project.

why?

  • The software team have been notified. They will respond here.
  • Hi,

    This comes from the tilcdc_crtc.c. Your device experiences a fifo underflow (explained in Section 13.3.7.2.1.3 Fifo Underflow Interrupt in the AM335x TRM) and then as a consequence you get sync lost.

    My suggestion is to check the value of th_fifo_ready (DMA FIFO threshold) and set this bit to a lower value described in 13.5.1.16 LCDDMA_CTRL Register (offset = 40h) [reset = 0h]. This is done in tilcdc_crtc.c, the specific function is tilcdc_crtc_mode_set():
    reg |= (info->fifo_th << 8);
    tilcdc_write(dev, LCDC_DMA_CTRL_REG, reg);

    Best Regards,
    Yordan

  • thanks for you reply.

    in my device tree file.see follow ,the fifo-th value is 2,should i set this value to 1?

    panel {
    compatible = "ti,tilcdc,panel";
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&lcd_pins_s0>;
    panel-info {
    ac-bias = <255>;
    ac-bias-intrpt = <0>;
    dma-burst-sz = <16>;
    bpp = <24>;
    fdd = <0x80>;
    sync-edge = <0>;
    sync-ctrl = <1>;
    raster-order = <0>;
    fifo-th = <2>;
    };

    in addition ,why this error appear when it run the getty@tty1.service sprict.

    test result:

    I set fifo-th value to 0,this mean when 8 data got,the DMA FIFO becomes ready.

    root@am335x-evm:~# devmem2 0x4830e040
    /dev/mem opened.
    Memory mapped at address 0xb6f20000.
    Read at address 0x4830E040 (0xb6f20040): 0x00000040

    but the when the board power on,this error still appear.

    [ 31.453429] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underfow
    [ 31.458684] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.459385] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.475484] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.476177] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.491487] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.492263] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.492983] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.508256] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.509051] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.509780] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 31.827365] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost flood detected, disabling the interrupt

  • hi yordan:

    do you have any other support to fixed this error?

  • Hi,

    Apologies for the delayed reply.

    Not sure what is the correlation between the getty service & the tilcdc or the touchscreen controller... I need to check this further.

    Have you verified your display-timings ?

    Best Regards,
    Yordan
  • hi: 

        thanks for your reply.

        I think the display-timings is right.

        in this website,it says this.how the "#define EMIF_OCP_CONFIG_AM335X_EVM             0x003d3d3d" the value is set to 0x003d3d3d.

    my board is used of ddr2,i set this value ,underlow error  becomes less,but still have this error. How to configure this bit .

    in this ,why the value is 0x003d3d3d.how could i set my value on my board?

    "Initialize EMIF OCP_CONFIG registers REG_COS_COUNT_1, REG_COS_COUNT_2,
    and REG_PR_OLD_COUNT field for Beaglebone-Black and am335x-evm. With
    the default values LCDC suffers from DMA FIFO underflows and frame
    synchronization lost errors. The initialization values are the highest
    that work flawlessly when heavy memory load is generated by CPU. 32bpp
    colors were used in the test. On BBB the video mode used 110MHz pixel
    clock. The mode supported by the panel of am335x-evm uses 30MHz pixel
    clock."

  • Hi,

    This is a prioritization to the emif/ddr traffic through the OCP, see Section 7.3.5.15 OCP_CONFIG Register (offset = 54h) [reset = 00FFFFFFh] of the AM335x TRM. Also an explanation how to set this register can be found in Section 7.3.3.5.2 Command Starvation & Section 7.3.3.5.4 Class of Service (COS) of the TRM.

    Best Regards,
    Yordan