Why does imx_sec_dsim_drv output EPROBE_DEFER?

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

Why does imx_sec_dsim_drv output EPROBE_DEFER?

Jump to solution
4,898 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community.

We are making a display driver according to the following thread.

Which driver should I use for "Lattice MIPI-DSI to LVDS Soft IP"? 

I have compiled the device-tree.
However, I got the following error. 

imx-drm display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[imx_sec_dsim_bind (252)] encoder=ffff800027af6488
imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[sec_mipi_dsim_bind (1922)] TP
[sec_mipi_dsim_bind (1923)] encoder = ffff800027af6488, bridge=ffff800026dee780
[drm_bridge_attach (137)] TP
[sec_mipi_dsim_bridge_attach (799)] TP
[sec_mipi_dsim_bridge_attach (842)] TP
[drm_bridge_attach (140)] TP
imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[imx_sec_dsim_bind (268)] TP
imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
imx-drm display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -517
imx-drm display-subsystem: master bind failed: -517

And I found that the following functions output errors.

  • drivers/gpu/drm/bridge/sec-dsim.c sec_mipi_dsim_bridge_attach L842

/* For the panel driver loading is after dsim bridge,
* defer bridge binding to wait for panel driver ready.
* The disadvantage of probe defer is endless probing
* in some cases.
*/
if (!next)
{
printk("[%s (%d)] TP\n", __func__, __LINE__);
return -EPROBE_DEFER;
}

Why does imx_sec_dsim_drv output EPROBE_DEFER?

Is the device-tree file written incorrectly?

&mipi_dsi {
status = "okay";

port@1 {
dsi_to_lvds: endpoint {
remote-endpoint = <&lvds_from_dsi>;
};
};
panel@0 {
status = "okay";
compatible = "teac,custom-lcd";
reg = <0>;
dsi-lanes = <4>;
video-mode = <2>; /* 0: burst mode
* 1: non-burst mode with sync event
* 2: non-burst mode with sync pulse
*/
panel-width-mm = <1547>;
panel-height-mm = <871>;
display-timings {
timing {
clock-frequency = <33000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <40>;
hsync-len = <48>;
hback-porch = <40>;
vfront-porch = <13>;
vsync-len = <3>;
vback-porch = <29>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
port {
lvds_from_dsi: endpoint {
remote-endpoint = <&dsi_to_lvds>;
};
};
};
};

Best Regards,

T.Kashiwagi

1 Solution
4,593 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi T.Kashiwagi,

   I don't know you are using FPGA or ICN6211 to do convertion from MIPI DSI To Parallel RGB. Anyway , you need a bridge to reach the purpose, so FPGA or ICN6211 act as bridge, FPGA(lattice) or ICN6211, anyone of them both act as a bridge. if you are using FPGA, after finishing FPGA code, you will have to write a linux driver for your convertion logic, at this time your FPGA will be a chip.

  if you are using FPGA, it is better way to refer to driver souce code of ICN6211.

  if you are using ICN6211, you had better ask for linux driver source code of ICN6211 from provider.

  Inaddtion, by default MIPI DSI's output is 1080P resolution.

Hope above information is helpful for you.

Have a nice day!

BR,

Weidong

View solution in original post

6 Replies
4,593 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community.

I modified the kernel config and device tree. Wayland is running.

But the Custom LCD displays nothing.

The result of "# dmesg | grep drm" is as follows. 

[ 0.890195] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.895524] [drm] No driver support for vblank timestamp query.
[ 0.900243] imx-drm display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 0.912417] imx-drm display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[ 0.935206] imx-drm display-subsystem: fb0: DRM emulated frame buffer device
[ 0.941265] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0

and var/log/weston.log is as follows.

# cat /var/log/weston.log
Date: 2020-02-06 JST
[19:41:01.179] weston 6.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 6.0.0-33-g81b11811-dirty compositor-drm: Bypass the check of the libinput (2019-06-06 17:54:16 +0800)
[19:41:01.179] Command line: /usr/bin/weston --log=/var/log/weston.log
[19:41:01.179] OS: Linux, 4.19.85-imx8mm+ge4452f4458e4, #1 SMP PREEMPT Thu Feb 6 09:59:56 UTC 2020, aarch64
[19:41:01.180] Using config file '/etc/xdg/weston/weston.ini'
[19:41:01.181] Output repaint window is 16 ms maximum.
[19:41:01.181] Loading module '/usr/lib/libweston-6/drm-backend.so'
[19:41:01.187] initializing drm backend
[19:41:01.194] logind: session control granted
[19:41:01.198] using /dev/dri/card0
[19:41:01.198] DRM: supports universal planes
[19:41:01.198] DRM: supports atomic modesetting
[19:41:01.198] DRM: supports picture aspect ratio
[19:41:01.199] Loading module '/usr/lib/libweston-6/gl-renderer.so'
[19:41:01.223] EGL client extensions: EGL_EXT_client_extensions
EGL_EXT_platform_base EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_KHR_platform_gbm
[19:41:01.228] EGL version: 1.5
[19:41:01.228] EGL vendor: Vivante Corporation
[19:41:01.228] EGL client APIs: OpenGL_ES OpenVG
[19:41:01.228] EGL extensions: EGL_KHR_fence_sync EGL_KHR_reusable_sync
EGL_KHR_wait_sync EGL_KHR_image EGL_KHR_image_base
EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
EGL_EXT_image_dma_buf_import
EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_lock_surface
EGL_KHR_create_context EGL_KHR_no_config_context
EGL_KHR_surfaceless_context EGL_ANDROID_native_fence_sync
EGL_WL_bind_wayland_display
EGL_WL_create_wayland_buffer_from_image
[19:41:01.229] EGL_KHR_surfaceless_context available
[19:41:01.242] GL version: OpenGL ES 2.0 V6.4.0.beta.207593
[19:41:01.242] GLSL version: OpenGL ES GLSL ES 1.0.0
[19:41:01.242] GL vendor: Vivante Corporation
[19:41:01.242] GL renderer: Vivante GC7000NanoUltra
[19:41:01.242] GL extensions: GL_OES_vertex_half_float
GL_OES_element_index_uint GL_OES_mapbuffer
GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture GL_OES_texture_npot
GL_OES_rgb8_rgba8 GL_OES_depth_texture
GL_OES_depth_texture_cube_map GL_OES_depth24 GL_OES_depth32
GL_OES_packed_depth_stencil GL_OES_fbo_render_mipmap
GL_OES_get_program_binary GL_OES_fragment_precision_high
GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_sync
GL_OES_required_internalformat GL_OES_surfaceless_context
GL_EXT_texture_type_2_10_10_10_REV
GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
GL_EXT_texture_compression_s3tc GL_EXT_read_format_bgra
GL_EXT_multi_draw_arrays GL_EXT_frag_depth
GL_EXT_discard_framebuffer GL_EXT_blend_minmax
GL_EXT_multisampled_render_to_texture GL_EXT_robustness
GL_EXT_texture_sRGB_decode GL_EXT_texture_rg
GL_VIV_direct_texture
[19:41:01.242] GL ES 2 renderer features:
read-back format: BGRA
wl_shm sub-image to texture: no
EGL Wayland extension: yes
[19:41:01.256] event0 - 30370000.snvs:snvs-powerkey: is tagged by udev as: Keyboard
[19:41:01.256] event0 - 30370000.snvs:snvs-powerkey: device is a keyboard
[19:41:01.281] libinput: configuring device "30370000.snvs:snvs-powerkey".
[19:41:01.281] DRM: head 'DSI-1' found, connector 33 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[19:41:01.281] Registered plugin API 'weston_drm_output_api_v1' of size 24
[19:41:01.281] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[19:41:01.282] Chosen EGL config details:
RGBA bits: 8 8 8 0
swap interval range: 1 - 60
[19:41:01.282] Output DSI-1 (crtc 31) video modes:
800x480@67.7, preferred, current, 33.0 MHz
[19:41:01.282] associating input device event0 with output DSI-1 (none by udev)
[19:41:01.282] Output 'DSI-1' enabled with head(s) DSI-1
[19:41:01.282] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[19:41:01.283] Loading module '/usr/lib/weston/desktop-shell.so'
[19:41:01.286] launching '/usr/libexec/weston-keyboard'
[19:41:01.289] launching '/usr/libexec/weston-desktop-shell'

Is it correctly recognized as a MIPI-DSI display device driver?

Best Regards,

T.Kashiwagi

0 Kudos
4,593 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community.

Modification of the raydium67191 driver is not easy. As the function of MIPI-DSI to RGB is similar to icn6211, I am trying to modify the following driver.

linux-amarula/panel-bananapi-s070wv20-icn6211.c at bpi-m2m-dsi · amarula/linux-amarula · GitHub 

I get the following error. Does anyone know if it's a driver problem or a device-tree problem?

imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector

Best Regards,

T.Kashiwagi

0 Kudos
4,593 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi T.Kashiwagi,

we don't have ready-made solution on MIPI DSI to LVDS, but our linux bsp supports MIPI DSI to HDMI, whose driver is adv7533.c , see path drivers/gpu/drm/bridge/adv7511/adv7533.c
so since your application is like a bridge that converts MIPI DSI to LVDS, it is better way to refer to the driver to create a new driver for you.

Have a nice day!

BR,

Weidong

4,593 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Weidong-san

Thank you for reply.

imx_sec_dsim_drv 32e10000.mipi_dsi: no bus formats assigned by connector

This was mainly due to the commented out "drm_display_info_set_bus_formats".

we don't have ready-made solution on MIPI DSI to LVDS, but our linux bsp supports MIPI DSI to HDMI, whose driver is adv7533.c , see path drivers/gpu/drm/bridge/adv7511/adv7533.c

I'm sorry, I misunderstood. What is on our board is MIPI-DSI to RGB, not MIPI-DSI to LVDS.

I have seen adv7533.c. Should I make the following settings to register the driver in DRM Bridge Core? 

adv7511->bridge.funcs = &adv7511_bridge_funcs;
adv7511->bridge.of_node = dev->of_node;

drm_bridge_add(&adv7511->bridge);

 

I have one more question.

"mipi_dsi_generic_write" timed out with the following function.

Certainly nothing is output from TX0. If nothing is connected in terms of hardware, will the TX0 signal be output?

static int teac_yy_xxxxxx_bridge_prepare(struct drm_panel *panel)
{
struct teac_yy_xxxxxx_bridge *ctx = panel_to_teac_yy_xxxxxx_bridge(panel);
struct mipi_dsi_device *dsi = ctx->dsi;
unsigned int i;
int ret;
printk("[%s (%d)] ENTER\r\n", __func__, __LINE__);
// for (i = 0; i < ARRAY_SIZE(teac_yy_xxxxxx_bridge_init_cmds); i++) {
// const struct teac_yy_xxxxxx_bridge_init_cmd *cmd = &teac_yy_xxxxxx_bridge_init_cmds[i];
//
// ret = mipi_dsi_generic_write(dsi, cmd->data, cmd->len);
// if (ret < 0)
// return ret;
//
// msleep(10);
// }
printk("[%s (%d)] EXIT\r\n", __func__, __LINE__);
return 0;
}

Best Regards,

T.Kashiwagi

0 Kudos
4,594 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi T.Kashiwagi,

   I don't know you are using FPGA or ICN6211 to do convertion from MIPI DSI To Parallel RGB. Anyway , you need a bridge to reach the purpose, so FPGA or ICN6211 act as bridge, FPGA(lattice) or ICN6211, anyone of them both act as a bridge. if you are using FPGA, after finishing FPGA code, you will have to write a linux driver for your convertion logic, at this time your FPGA will be a chip.

  if you are using FPGA, it is better way to refer to driver souce code of ICN6211.

  if you are using ICN6211, you had better ask for linux driver source code of ICN6211 from provider.

  Inaddtion, by default MIPI DSI's output is 1080P resolution.

Hope above information is helpful for you.

Have a nice day!

BR,

Weidong

4,593 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Weidong-san

 

Thank you for reply.

  I don't know you are using FPGA or ICN6211 to do convertion from MIPI DSI To Parallel RGB. Anyway , you need a bridge to reach the purpose, so FPGA or ICN6211 act as bridge, FPGA(lattice) or ICN6211, anyone of them both act as a bridge. if you are using FPGA, after finishing FPGA code, you will have to write a linux driver for your convertion logic, at this time your FPGA will be a chip.

It will be helpful.

For now, the drm_panel_init / drm_panel_add method works fine in DSI CLK/TX. However, this is almost the same as panel-simple.c.

I will ask later in a new thread when to use panel-simple.c.

Best Regards,

T.Kashiwagi

0 Kudos