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.

AM625: AM62x LCD logo smooth transition between uboot and kernel

Part Number: AM625

Hi:

        We need to realize the logo display of AM62x under uboot. Currently, the product logo can be displayed under uboot, but under the kernel, due to the re-initialization of the LCD controller and the re-setting of the video memory address of the framebuffer, the logo under the kernel disappears and a black screen is displayed. Refer to the video below:

        The next step is to add the display product logo to the kernel. The logo can be displayed under both uboot and kernel. The only drawback is that every time the kenel displays the logo, the screen will flash. Refer to the video below:

        After searching for the reason, I found that it was caused by the inconsistent memory address of the framebuffer under uboot and the framebuffer under kernel, as shown below, uboot is 0xbf700000, kernel is 0x83400000.

              

        The problem we are facing now is how to change the framebuffer address under the kernel to be the same as that under uboot? Please help TI reply.

  • Hi,

    The screen flash happens because of the following code: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/gpu/drm/tidss?h=ti-linux-6.1.y&id=c9b2d923befd8cee0b9d6cbd96128ec0bf44c881. Unfortunately, the Linux driver needs to reset before initializing itself. At the moment, our default driver is not designed to have a proper transition between Uboot and Linux. If you remove the reset code, Kernel will hang. We are looking into the above request and I do not have any timelines.

    Regards,

    Krunal

  • Hi, Krunal:

            I have deleted dispc_softreset in the tidss_dispc.c driver and made changes in tidss_irq.c according to the reference you gave, the kernel will not hang.  

    tidss_dispc.c:

    for (i = 0; i < dispc->feat->num_planes; i++) {
    r = dispc_iomap_resource(pdev, dispc->feat->vid_name[i],
    &dispc->base_vid[i]);
    if (r)
    return r;
    }


    /* K2G display controller does not support soft reset */
    //if (feat->subrev != DISPC_K2G)
    //dispc_softreset(dispc);

    for (i = 0; i < dispc->feat->num_vps; i++) {

    tidss_irq.c:

    static void tidss_irq_preinstall(struct drm_device *ddev)

    {
    struct tidss_device *tidss = to_tidss(ddev);

    spin_lock_init(&tidss->wait_lock);

    //tidss_runtime_get(tidss);

    dispc_set_irqenable(tidss->dispc, 0);
    dispc_read_and_clear_irqstatus(tidss->dispc);

    //tidss_runtime_put(tidss);
    }

    static void tidss_irq_postinstall(struct drm_device *ddev)
    {
    struct tidss_device *tidss = to_tidss(ddev);
    unsigned long flags;
    unsigned int i;

    //tidss_runtime_get(tidss);

    spin_lock_irqsave(&tidss->wait_lock, flags);

    tidss->irq_mask = DSS_IRQ_DEVICE_OCP_ERR;

    for (i = 0; i < tidss->num_crtcs; ++i) {
    struct tidss_crtc *tcrtc = to_tidss_crtc(tidss->crtcs[i]);

    tidss->irq_mask |= DSS_IRQ_VP_SYNC_LOST(tcrtc->vp_idx);

    tidss->irq_mask |= DSS_IRQ_VP_FRAME_DONE(tcrtc->vp_idx);
    }

    tidss_irq_update(tidss);

    spin_unlock_irqrestore(&tidss->wait_lock, flags);

    //tidss_runtime_put(tidss);
    }

            We can determine that the framebuffer address is inconsistent.

            When I force the framebuffer address to be the same, the screen will not flicker(removed dispc_softreset). However, I am forcing the framebuffer setting of the register of the LCD controller. I don’t know how the framebuffer driver under the kernel can force the framebuffer address of the kernel and uboot to be the same. Otherwise, after application, the address written to the framebuffer first cannot correspond to the LCD controller register framebuffer settings.

  • Hello,

    I am surprised your Kernel does not hang after few seconds with the above modifications because that was the behavior that I was observing. Anyways we currently do not have support for the above feature and our SW development team is looking into it.

    Regards,

    Krunal

  • Hi, Krunal:

            We use 24-Bit RGB LCD, which may be different from your application method. Check some information to display the logo smoothly under uboot and kernel. It is indeed necessary to achieve the same starting address of the framebuffer under uboot and kernel. Please consult your software team to see if there is a way to achieve this requirement. This is a very critical requirement in products using LCD.

  • Hello,

    I am checking internally and will get back to you by the end of the week.

    Regards,
    Krunal

  • Hello,

    Our dev team conducted the following experiment and had some success:

    1. Make simple-framebuffer node using same fb address/properties as set in uboot (patch attached): 
    +
    +                             framebuffer0: framebuffer@ff700000 {
    +                                             compatible = "simple-framebuffer";
    +                                             reg = <0x00 0xff700000 0x00 0x008ca000>;
    +                                             width = <1920>;
    +                                             height = <1200>;
    +                                             stride = <(1920 * 4)>;
    +                                             format = "x8r8g8b8";
    +                             };
     
     
    1. Make simple-framebuffer region as reserved-area (this is already present in current codebase)
     
               reserved-memory {
                    ….
     
                    framebuffer: framebuffer@ff700000 {
                            reg = <0x00 0xff700000 0x00 0x008ca000>;
                            no-map;
                    };
     
             }
     
    1. Enable simplefb in defconfig :
    $CONFIG_FB_SIMPLE=y
     
          4. As long as kernel fb logo size doesn't overshoot u-boot framebuffer it should be able to display the new framebuffer correctly.
    Regards,
    Krunal
  • Hi,Krunal:

            Thank you very much for your help. After using the simple framber driver, add fbcon=map:2 to the bootargs parameter under uboot to map the frame buffer console port to other interfaces. After the above changes, at present, the logo display on the LCD from uboot to kernel will no longer flicker, and can be continued until the app is started.
            At the same time, it was found that after using simple framber under the kernel, the LCD controller will not be initialized under the kernel, and the LCD controller under uboot will be initialized completely.

  • Hi Louis and Krunal,

    Where do I have to set the framebuffer node in u-boot, so that the same framebuffer is used in kernel as well. The above framebuffer node you mentioned is for kernel dts. Does the u-boot dts will have same framebuffer node. Also in am625x SOC in uboot there are few CONFIGS related to simple framebuffer as shown below:

    config VIDEO_SIMPLE
         bool "Simple display driver for preconfigured display"
         help
           Enables a simple generic display driver which utilizes the
           simple-framebuffer devicetree bindings.
     
           This driver assumes that the display hardware has been initialized
           before u-boot starts, and u-boot will simply render to the pre-
           allocated frame buffer surface.
     
     config VIDEO_DT_SIMPLEFB
         bool "Enable SimpleFB support for passing framebuffer to OS"
         help
           Enables the code to pass the framebuffer to the kernel as a
           simple framebuffer in the device tree.
           The video output is initialized by U-Boot, and kept by the
           kernel.
    

    Do I need to enable them in u-boot defconfig.

    For u-boot splash I followed this link

    Also, I have enabled CONFIG_FB_SIMPLE in kernel defconfig. I need to know the framebuffer settings in u-boot

    Also, I modified the drivers/video/logo/logo_linux_clut224.ppm file with my own file with the same name, and added CONFIG_LOGO_LINUX_CLUT224=y in kernel defconfig. Is this the correct approach or should i look into modifying the psplash which is present in yocto setup. 

    What was you approach for flicker free display from u-boot to kernel bootup. Please explain in detail

    Thanks & Regards

    Kamal