iMX8QM HDMI display not working

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

iMX8QM HDMI display not working

4,509 Views
scottbrust
Contributor II

I'm working on a board based off of the IMX8QM MEK with Android Auto 10 and the "multi display" build (ie the -md DTB). HDMI output works with computer monitors and other smaller LCD screens.

I'm having a problem specifically with this 7" LCD: https://femacorp.com/product/gm1024600s-70-tix2-htgg-hdmi/

The screen works when used with an Ubuntu 18.04 laptop so I know the hardware works. I get these messages when booting up with the screen attached:

[2020-12-02 14:54:50] [ 2.076236] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2020-12-02 14:54:50] [ 2.082890] [drm] No driver support for vblank timestamp query.
[2020-12-02 14:54:50] [ 2.088904] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[2020-12-02 14:54:50] [ 2.097055] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.5 (ops dpu_bliteng_ops)
[2020-12-02 14:54:50] [ 2.105436] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[2020-12-02 14:54:50] [ 2.112915] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[2020-12-02 14:54:50] [ 2.120398] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[2020-12-02 14:54:50] [ 2.127894] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[2020-12-02 14:54:50] [ 2.141257] [drm] Started firmware!
[2020-12-02 14:54:50] [ 2.145804] [drm] HDP FW Version - ver 26098 verlib 20560
[2020-12-02 14:54:51] [ 2.152780] cdns-mhdp-imx 56268000.hdmi: lane-mapping 0x93
[2020-12-02 14:54:51] [ 2.162198] imx-drm display-subsystem: bound 56268000.hdmi (ops cdns_mhdp_imx_ops)
[2020-12-02 14:54:51] [ 2.169808] imx-drm display-subsystem: bound 56228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:51] [ 2.178177] imx-drm display-subsystem: failed to bind bus@56240000:ldb@562410e0 (ops imx_ldb_ops): -517
[2020-12-02 14:54:51] [ 2.188211] imx-drm display-subsystem: master bind failed: -517
[2020-12-02 14:54:51] [ 2.196918] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2020-12-02 14:54:51] [ 2.203557] [drm] No driver support for vblank timestamp query.
[2020-12-02 14:54:51] [ 2.209575] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[2020-12-02 14:54:51] [ 2.217725] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.5 (ops dpu_bliteng_ops)
[2020-12-02 14:54:51] [ 2.225949] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.233289] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.240637] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.248007] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.259669] [drm] Started firmware!
[2020-12-02 14:54:51] [ 2.264228] [drm] HDP FW Version - ver 26098 verlib 20560
[2020-12-02 14:54:51] [ 2.271136] cdns-mhdp-imx 56268000.hdmi: lane-mapping 0x93
[2020-12-02 14:54:51] [ 2.280504] imx-drm display-subsystem: bound 56268000.hdmi (ops cdns_mhdp_imx_ops)
[2020-12-02 14:54:51] [ 2.288112] imx-drm display-subsystem: bound 56228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:51] [ 2.296558] [drm] forcing HDMI-A-2 connector off
[2020-12-02 14:54:51] [ 2.301198] imx-drm display-subsystem: bound bus@56240000:ldb@562410e0 (ops imx_ldb_ops)
[2020-12-02 14:54:51] [ 2.309316] imx-drm display-subsystem: bound 57228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:51] [ 2.317660] imx-drm display-subsystem: failed to bind bus@57240000:ldb@572410e0 (ops imx_ldb_ops): -517
[2020-12-02 14:54:51] [ 2.327690] imx-drm display-subsystem: master bind failed: -517
[2020-12-02 14:54:51] [ 2.334620] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2020-12-02 14:54:51] [ 2.341245] [drm] No driver support for vblank timestamp query.
[2020-12-02 14:54:51] [ 2.347245] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[2020-12-02 14:54:51] [ 2.355393] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.5 (ops dpu_bliteng_ops)
[2020-12-02 14:54:51] [ 2.363615] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.370952] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.378297] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.385652] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[2020-12-02 14:54:51] [ 2.397354] [drm] Started firmware!
[2020-12-02 14:54:51] [ 2.401902] [drm] HDP FW Version - ver 26098 verlib 20560
[2020-12-02 14:54:51] [ 2.408787] cdns-mhdp-imx 56268000.hdmi: lane-mapping 0x93
[2020-12-02 14:54:51] [ 2.418124] imx-drm display-subsystem: bound 56268000.hdmi (ops cdns_mhdp_imx_ops)
[2020-12-02 14:54:51] [ 2.425733] imx-drm display-subsystem: bound 56228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:51] [ 2.434143] [drm] forcing HDMI-A-2 connector off
[2020-12-02 14:54:51] [ 2.438781] imx-drm display-subsystem: bound bus@56240000:ldb@562410e0 (ops imx_ldb_ops)
[2020-12-02 14:54:51] [ 2.446900] imx-drm display-subsystem: bound 57228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:51] [ 2.455214] imx-drm display-subsystem: failed to bind bus@57240000:ldb@572410e0 (ops imx_ldb_ops): -517
[2020-12-02 14:54:51] [ 2.465198] imx-drm display-subsystem: master bind failed: -517
[2020-12-02 14:54:51] [ 2.710276] imx6q-pcie 5f000000.pcie: Phy link never came up
[2020-12-02 14:54:51] [ 2.716006] imx6q-pcie 5f000000.pcie: failed to initialize host
[2020-12-02 14:54:51] [ 2.721936] imx6q-pcie 5f000000.pcie: unable to add pcie port.
[2020-12-02 14:54:52] [ 3.218379] it6263 8-004c: Probe failed. Remote port 'lvds-channel@0' disabled
[2020-12-02 14:54:52] [ 3.226226] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2020-12-02 14:54:52] [ 3.236682] [drm] No driver support for vblank timestamp query.
[2020-12-02 14:54:52] [ 3.242684] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[2020-12-02 14:54:52] [ 3.250828] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.5 (ops dpu_bliteng_ops)
[2020-12-02 14:54:52] [ 3.259009] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[2020-12-02 14:54:52] [ 3.266345] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[2020-12-02 14:54:52] [ 3.273668] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[2020-12-02 14:54:52] [ 3.280990] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[2020-12-02 14:54:52] [ 3.294406] [drm] Started firmware!
[2020-12-02 14:54:52] [ 3.296142] brd: module loaded
[2020-12-02 14:54:52] [ 3.298311] [drm] HDP FW Version - ver 26098 verlib 20560
[2020-12-02 14:54:52] [ 3.307529] cdns-mhdp-imx 56268000.hdmi: lane-mapping 0x93
[2020-12-02 14:54:52] [ 3.317986] imx-drm display-subsystem: bound 56268000.hdmi (ops cdns_mhdp_imx_ops)
[2020-12-02 14:54:52] [ 3.325595] imx-drm display-subsystem: bound 56228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:52] [ 3.334036] [drm] forcing HDMI-A-2 connector off
[2020-12-02 14:54:52] [ 3.338682] imx-drm display-subsystem: bound bus@56240000:ldb@562410e0 (ops imx_ldb_ops)
[2020-12-02 14:54:52] [ 3.346811] imx-drm display-subsystem: bound 57228000.dsi_host (ops nwl_dsi_component_ops)
[2020-12-02 14:54:52] [ 3.355161] imx-drm display-subsystem: bound bus@57240000:ldb@572410e0 (ops imx_ldb_ops)
[2020-12-02 14:54:52] [ 3.357408] loop: module loaded
[2020-12-02 14:54:52] [ 3.372397] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[2020-12-02 14:54:52] [ 3.380413] fsl_lpspi 5a020000.spi: dma setup error -19, use pio
[2020-12-02 14:54:52] [ 3.385534] [drm:cdns_hdmi_get_edid_block] *ERROR* get block[0] edid failed: -22
[2020-12-02 14:54:52] [ 3.390850] libphy: Fixed MDIO Bus: probed
[2020-12-02 14:54:52] [ 3.393828] [drm:cdns_hdmi_connector_get_modes] *ERROR* Invalid edid
[2020-12-02 14:54:52] [ 3.397918] tun: Universal TUN/TAP device driver, 1.6
[2020-12-02 14:54:52] [ 3.409345] imx-drm display-subsystem: fb0: imx-drmdrmfb frame buffer device

I suspect the errors about the EDID have something to do with the screen not working. I'm hoping someone can help me understand what is going wrong and how to get it working. 

0 Kudos
Reply
6 Replies

4,296 Views
scottbrust
Contributor II

I turned up the debug logging of the DRM module and can see warnings from `drm_atomic_helper.c` about "Invalid scaling of plane". I added some more debug output and can see the following:

[ 133.265874] [drm:drm_rect_calc_hscale] drm_rect_calc_hscale src_w 125829120 dst_w 1024 hscale 122880
[ 133.265880] [drm:drm_rect_calc_vscale] drm_rect_calc_vscale src_w 70778880 dst_w 600 vscale 117965
[ 133.265890] [drm:drm_atomic_helper_check_plane_state] Invalid scaling of plane. min_scale 0 max_scale 65536
[ 133.265899] [drm:drm_rect_debug_print] src: 1920.000000x1080.000000+0.000000+0.000000
[ 133.265905] [drm:drm_rect_debug_print] dst: 1024x600+0+0

From what I can tell, it looks like the driver is not allowing the horizontal and vertical scaling to map from the default 1920x1080 to the desired 1024x600. I am assuming this is why the driver fails to work with the display? Is there any insight into why the driver rejects this scaling?

 

0 Kudos
Reply

3,981 Views
fei_4_xu
Contributor III

Hi, I'm new to the world of board bringing-up.

Question: How to turned on the debug logging of the DRM module?

I can build the kernel source, I think there will be some file modified? which file?

0 Kudos
Reply

4,449 Views
scottbrust
Contributor II

I am still unable to get my display working. It works fine with windows and linux (ubuntu) desktops. I read the edid with get-edid/parse-edid and came up with the following:

Checksum Correct

Section "Monitor"
Identifier "DVI"
ModelName "DVI"
VendorName "TXD"
# Monitor Manufactured week 0 of 2048
# EDID version 1.3
# Digital Display
# Display Physical Size not given. Normal for projectors.
Gamma 2.20
Option "DPMS" "true"
Modeline "Mode 0" 50.00 1024 1064 1192 1344 600 610 613 635 -hsync -vsync
EndSection

xrandr also gave me the following information:

HDMI-1 connected 1024x600+1920+0 (normal left inverted right x axis y axis) 359mm x 287mm 1024x600 58.59*+

Based off the modeline, I created the following entry in /drivers/gpu/drm/drm_edid.c in the edid_cea_modes array:

/* 108 - 1024x600@59Hz 16:9 */
{ DRM_MODE("1024x600", DRM_MODE_TYPE_DRIVER, 50000, 1024, 1064,
1192, 1344, 0, 600, 610, 613, 635, 0,
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
.vrefresh = 59, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },

With this timing added, I dont see any errors in the kernel log, I can see the mode being selected after querying the EDID but the display never comes up. I am wondering if the 50mhz pixel clock and/or the 58.59hz refresh rate are causing the problems. I dont see any errors /drivers/gpu/drm/imx/cdn-mhdp-hdmi-phy.c it seems to accept the pixel clock just fine.

I read the link about adding different graphics support in previous kernel versions, but i'm not sure if its relevant to the version I am running (5.4.24). It seems all of the graphics code has been moved to the DRM system with imx8qm. Any help would be appreciated...

0 Kudos
Reply

4,500 Views
joanxie
NXP TechSupport
NXP TechSupport

you can refer to the link as below

https://community.nxp.com/t5/i-MX-Processors/iMX6Q-AI-board-support-for-1280-800-HDMI-Display/m-p/57...

you need to check your display spec, to get the parameter and set them in the dts file

0 Kudos
Reply

4,356 Views
scottbrust
Contributor II

Hi @joanxie I am still having problems getting this display working. I have specified the EDID information and followed everything into hdmi_phy_cfg_ss28fdsoi where the EDID pixel clock is used to look up other parameters from imx8qm_ctrl_table[] and imx8qm_pll_table[]. I can see it finds entries in both tables and configures the "HDMI PHY" via hdmi_phy_cfg_ss28fdsoi and hdmi_phy_config. There are no errors in doing this, but still I see no output.

I am trying to get access to an oscilloscope to look at the HDMI signal being output, but until then I am trying to figure out what else might be going wrong. Do you have any more information about what these PHY config parameters are doing? I cannot seem to find any documentation on what is happening here. 

0 Kudos
Reply

4,508 Views
scottbrust
Contributor II

After looking at this, I suspect that the LCD resolution (1024x600) isnt supported by default. Any idea how to add support for this? 

0 Kudos
Reply