i.mx8m: Display content of MIPI DSI panel becomes disordered after upgrading to Yocto 2.4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx8m: Display content of MIPI DSI panel becomes disordered after upgrading to Yocto 2.4

5,818 Views
richard_hu
Contributor V

Dear NXP FAE:

I encounter a strange problem on the display content of MIPI DSI panel after upgrading to Yocto 2.4(Rocko).

We have 5" inch (720x1280) MIPI DSI panel and it works pretty well on Yocto 2.2(Morty) on our custom i.mx8m board.

After we upgrade to Yocto 2.4, the display content becomes disordered, and the disordered pattern changes periodically.

We use exact same 4.9.88 kernel in buildroot and it doesn't have this problem.

So i suspect this problem might result from the weston compositor. It manipulates the display content via DRM or KMS periodically. It looks like that the bpp settings or resolution is changed periodically.

The situation is like:

When i boot into yocto, the display content looks like:

P80907-165123.jpg

After 40~50 seconds, the pattern changes to:

P80907-165207.jpg

It just keep changing the pattern like random every 40~50 sec.

I upload a video clip on youtube to let you understand this situation easily.

disordered pattern on MIPI DSI panel - YouTube 

Do i need to modify the settings in weston somewhere to fit in the panel we use?

BR,

Richard

12 Replies

3,621 Views
nandishguruling
Contributor III

Hello Dmitriy .

Congrats for problem solved.

Please share the solution here what you did.

Best regards.

Nandish SG

0 Kudos

3,621 Views
dreamway89
Contributor I

You understood me wrong. I asked if anyone found a solution? 

But, during this time, I found a solution to the problem.

Problem was in mixel_phy_mipi_set_phy_speed function:

4.9.51 - mixel_phy_mipi_set_phy_speed:192000000,372000000, ref_clk=24000000 numerator=32, denominator=2
4.18.11 - mixel_phy_mipi_set_phy_speed:186000000,372000000, ref_clk=24000000 numerator=31, denominator=2

My solution you can find here

0 Kudos

3,621 Views
diegoadrian
NXP Employee
NXP Employee

Hello, 

I apologize for the late answer.

This is a known problem for the i.MX8MQ in our latest BSP. This problem is not presented in the version L4.9.51.

Hope this can help you.

Best Regards,

Diego.

3,621 Views
dreamway89
Contributor I

Hello,

Much time passed, the problem was solved?

Best Regards, Dmitriy!

0 Kudos

3,621 Views
richard_hu
Contributor V

Hello, Nandish:

Thanks for your detailed explanation.

Unfortunately, our problem isn't solved.

The example that you take is based on i.mx6.

Our problem is on i.mx8mq.

The display driver on i.mx6 is based on fbdev, but the display driver on i.mx8mq is based on DRM.

The framebuffer you see in i.mx8mq is created by drm.

So, there is no device node in device tree called mxcfb in fsl-imx8mq.dtsi and fsl-imx8mq-evk.dts.

We find the same problem also happens on imx8mqevk with HDMI output. (We flash the prebuilt linux 4.9.88 yocto image.)

We will try to stop weston service in Yocto to see if this issue is caused in wayland layer.
Before we find the root cause, i'd like to keep this discussion as "open" status.

BR,

Richard

0 Kudos

3,621 Views
nandishguruling
Contributor III

hello Richard,

1. yes  i am talking about linux device driver layer,

2. Are you enable the <>MXC MIPI_DSI driver in the Kernel Space? Please find the attached Screen shot,

3. Check the Uboot Parameters, and you can check the below parameters in  your source code, below example code

    for imx6 processor with MIPI Display interface,

1)     mxcfb1: fb@0 {
        compatible = "fsl,mxc_sdc_fb";
        disp_dev = "mipi_dsi";
        interface_pix_fmt = "RGB24";
        mode_str ="TRULY-WVGA";
        default_bpp = <24>;
        int_clk = <0>;
        late_init = <0>;
        status = "okay";
    };

2) &mipi_dsi {
    compatible = "fsl,imx6dl-mipi-dsi";
    reg = <0x021e0000 0x4000>;
    interrupts = <0 102 0x04>;
    gpr = <&gpr>;
    clocks = <&clks 138>, <&clks 204>;
    clock-names = "mipi_pllref_clk", "mipi_cfg_clk";
    dev_id = <0>;
    disp_id = <1>;
    lcd_panel = "TRULY-WVGA";
    disp-power-on-supply = <&reg_mipi_dsi_pwr_on>;
    resets = <&mipi_dsi_reset>;
    rst-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
    status = "okay";
};

3) static struct fb_videomode truly_lcd_modedb[] = {
    {
     "TRULY-WVGA", 60, 400, 400, 79643,
     40, 20,
     12, 20,
     20, 4,
     FB_SYNC_OE_LOW_ACT,
     FB_VMODE_NONINTERLACED,
     0,
    },
};

 4)  &mipi_dsi {
    ipu_id = <0>;
    sec_ipu_id = <0>;
};
&mxcfb1 {
    status = "okay";
};

mipi1.png

0 Kudos

3,621 Views
nandishguruling
Contributor III

Hello Richard,

I hope the above issue is solved, if it is solved please share your solution here, if not please let me know,

thanks and best regards,

Nandish  SG

0 Kudos

3,621 Views
nandishguruling
Contributor III

Hello  Richard,

There is one file which you can set the display parameter like hsync, vsync etc.. there you can check the clock rate, frame refresh rate(60 MHZ)  and one more file *.dts there you can set the RGB888 format,

Best regards

Nandish SG

0 Kudos

3,621 Views
richard_hu
Contributor V

Hello, Nandish:

Thanks for your reply.

But i still can't get your point.

Can you make it clear?
What you are talking about is wayland layer or linux device driver layer?

The panel we use is MIPI-DSI interface.

Take "fsl-imx8mq-evk-dcss-rm67191.dts" as example, there is no pixel format settings, like "RGB888 format".

As my first post, we use the same mipi-dsi driver on yocto 2.2, and we don't have this kind of problem.

We only have this problem on yocto 2.4. So we don't think this problem is caused by MIPI-DSI driver in kernel space.

BR,

Richard

0 Kudos

3,621 Views
nandishguruling
Contributor III

Hi Richard,

one can check the Clock rate and RGB888 frame format (or RGB565 etc..) and refresh Rate ,

best regards

Nandish SG

0 Kudos

3,621 Views
richard_hu
Contributor V

Hello, Nandish:

Thanks for your quick reply~


one can check the Clock rate and RGB888 frame format (or RGB565 etc..) and refresh Rate ,

Do you mean the clock rate and frame format for MIPI-DSI display ?

But we use the same MIPI-DSI driver on Yocto 2.2(Morty), and it works quite well.
We use the same 4.9.88 kernel on buildroot, and it also works well.

Once the disordered pattern happens, then it can be blanked by gstreamer camera preview command.

# gst-launch-1.0 v4l2src io-mode=3 device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! kmssink

This command sets up KMS.

From the results above, I suspect this issue results from weston compositor more than MIPI-DSI driver.


How do you think ?

BR,

Richard

0 Kudos

3,621 Views
richard_hu
Contributor V

I try to add "gbm-format=rgb888" at section [core] in /etc/xdg/weston/weston.ini , but there is even no weston desktop on display.

Here is the information from command "weston-info":

=======================================================================================

/# weston-info
interface: 'wl_compositor', version: 4, name: 1
interface: 'wl_subcompositor', version: 1, name: 2
interface: 'wp_viewporter', version: 1, name: 3
interface: 'wp_presentation', version: 1, name: 4
        presentation clock id: 1 (CLOCK_MONOTONIC)
interface: 'zwp_relative_pointer_manager_v1', version: 1, name: 5
interface: 'zwp_pointer_constraints_v1', version: 1, name: 6
interface: 'wl_data_device_manager', version: 3, name: 7
interface: 'wl_shm', version: 1, name: 8
        formats: 'YUYV'(0x56595559) 'NV12'(0x3231564e) 'YU12'(0x32315559) RGB565 XRGB8888 ARGB8888
interface: 'wl_viv', version: 1, name: 9
interface: 'wl_seat', version: 5, name: 10
        name: default
        capabilities: keyboard
        keyboard repeat rate: 40
        keyboard repeat delay: 400
interface: 'zwp_linux_dmabuf_v1', version: 3, name: 11
        formats:
        'BA24'(0x34324142), modifier: 0x0000000000000000
        'RA24'(0x34324152), modifier: 0x0000000000000000
        'AB24'(0x34324241), modifier: 0x0000000000000000
        'AR24'(0x34325241), modifier: 0x0000000000000000
        'BA24'(0x34324142), modifier: 0x0000000000000000
        'RX24'(0x34325852), modifier: 0x0000000000000000
        'XB24'(0x34324258), modifier: 0x0000000000000000
        'XR24'(0x34325258), modifier: 0x0000000000000000
        'BG16'(0x36314742), modifier: 0x0000000000000000
        'RG16'(0x36314752), modifier: 0x0000000000000000
        'AB15'(0x35314241), modifier: 0x0000000000000000
        'AR15'(0x35315241), modifier: 0x0000000000000000
        'XB15'(0x35314258), modifier: 0x0000000000000000
        'XR15'(0x35315258), modifier: 0x0000000000000000
        'AB12'(0x32314241), modifier: 0x0000000000000000
        'AR12'(0x32315241), modifier: 0x0000000000000000
        'XB12'(0x32314258), modifier: 0x0000000000000000
        'XR12'(0x32315258), modifier: 0x0000000000000000
        'GR88'(0x38385247), modifier: 0x0000000000000000
        'R8  '(0x20203852), modifier: 0x0000000000000000
interface: 'wl_output', version: 3, name: 12
        x: 0, y: 0, scale: 1,
        physical_width: 62 mm, physical_height: 110 mm,
        make: 'unknown', model: 'unknown',
        subpixel_orientation: unknown, output_transform: normal,
        mode:
                width: 720 px, height: 1280 px, refresh: 60.218 Hz,
                flags: current preferred
interface: 'zwp_input_panel_v1', version: 1, name: 13
interface: 'zwp_input_method_v1', version: 1, name: 14
interface: 'zwp_text_input_manager_v1', version: 1, name: 15
interface: 'zxdg_shell_v6', version: 1, name: 16
interface: 'xdg_shell', version: 1, name: 17
interface: 'wl_shell', version: 1, name: 18
interface: 'weston_desktop_shell', version: 1, name: 19
interface: 'weston_screenshooter', version: 1, name: 20

=======================================================================================

I attach the /var/log/weston.log to original post.

Here is the information of pixel format in /var/log/weston.log.

It looks the pixel format is RGBA8888?

=====================================

[09:20:51.730] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 1 - 60

=====================================

Can anyone here give us a clear suggestion?

Thank you ~!!!

BR,

Richard

0 Kudos