Toshiba's TC358870XBG based display issue: rock-5b kernel: [ 1485.183383] rockchip-vop2 fdd90000.vop : [drm:vop2_crtc_atomic_enable] set dclk_vop0 to 198940000, get 198000000

Hello,

I am trying to use Rock 5B with display based on Toshiba’s TC358870XBG (2.9 inch 1440x1440 pixel). But faced with issue that display is not detected/recognized:

May 08 21:24:56 rock-5b kernel: **[drm:vop2_plane_atomic_check] *ERROR* Esmart0-win0 is invisible(src: pos[0, 0] rect[0 x 0] dst: pos[0, 0] rect[0 x 0]**
May 08 21:24:56 rock-5b kernel: **dwhdmi-rockchip fde80000.hdmi: i2c read err!**
May 08 21:24:56 rock-5b kernel: **dwhdmi-rockchip fde80000.hdmi: i2c read err!**
May 08 21:24:56 rock-5b kernel: **dwhdmi-rockchip fde80000.hdmi: i2c read err!**
May 08 21:24:56 rock-5b kernel: **dwhdmi-rockchip fde80000.hdmi: i2c read err!**
May 08 21:24:56 rock-5b kernel: **dwhdmi-rockchip fde80000.hdmi: i2c read err!**
May 08 21:24:56 rock-5b kernel: dwhdmi-rockchip fde80000.hdmi: failed to get edid


$ cat /sys/class/drm/card0-HDMI-A-1/status 
connected

The similar situation with Android - the display does not work - could you please help to make the display works in Android?

Thanks,
Andrei.

make sure you connected the display properly - the dmesg log shows you that i²c communication between the display and the board doesnt work. Now from a glance at the datasheet of the TC358870XBG(which btw is just the interface HDMI->DSI) this thing has 2 i²c buses, make sure everything is wired up correctly

Dear John,

I use kit: HDMI-MIPI board and Screen: https://ae01.alicdn.com/kf/Hf00c6593b970452092d76b181ff8c37dT/2-9-Cal-1440-1440-2K-IPS-podw-jny-wy-wietlacz-LCD-ekran-MIPI-wy-wietlacz.jpg_Q90.jpg_.webp

The kit works fine with Windows, Raspberry PI, but does not work with Rock 5B. When the kit connects to Windows/Raspberry - a led onboard gets blinking and shortly screen shows image - with Rock 5B the led is not blinking - it looks like that i2c communication is not started

how is this connected to the host? USB? can you give a full product link?

Product link: https://www.aliexpress.com/item/1005003091353975.html

Connection: HDMI from Rock 5B (or Raspberry or Windows) + USB for power.
Board reverse engineering: https://hackaday.io/project/168212-mipi-hdmi-bridge-re/log/170381-board-overview
Reverse engineering schematic: https://www.scribd.com/document/473702309/TC358870XBG-PCB-DS原理图

After doing some research on that thing I think you’re not gonna like the answer. It seems this thing tries to communicate with the rock using the i2c line of the HDMI signal. Note how the manufacturer hints that this thing is “hdmi-compatible” best case that means they were just too cheap to get their equipment certified(requirement for advertising HDMI), worst case would be they didn’t fully implement it. Now there might be several reasons this fails. Could be a timing issue. Try: power it before plugging it into the rock. Plug it into the rock and power it from an external power source before powering on the rock. Try a different image on the rock

I attached logic analyser to DDC/i2c of HDMI and see that Rock read 256 bytes via i2c - load EDID… it would be nice to know what module from sources is responsible for that - will add debug prints in order to know what is wrong… I search through source code and was not able to find suitable “i2c read err!” and “failed to get edid”

I found a way to overwrite edid by debugfs and currently see that DRM unbale to set correct clock:

[ 1485.183383] rockchip-vop2 fdd90000.vop : [drm:vop2_crtc_atomic_enable] set dclk_vop0 to 198940000, get 198000000

 [ 1485.139783] 	 [drm:drm_detect_monitor_audio] Monitor has basic audio support
 [ 1485.139805] 	 [drm:drm_add_edid_modes] ELD monitor HP Z24n G2
 [ 1485.139822] 	 [drm:drm_add_edid_modes] HDMI	 : latency present 0 0, video latency 0 0, audio latency 0 0
 [ 1485.139837] 	 [drm:drm_add_edid_modes] ELD size 36, SAD count 1
 [ 1485.139859] 	 [drm:drm_add_display_info] Supported Monitor Refresh rate range is 0 Hz - 0 Hz
 [ 1485.139873] 	 [drm:drm_add_display_info] non_desktop set to 0
 [ 1485.139889] 	 [drm:drm_add_display_info] HDMI	 : DVI dual 0, max TMDS clock 200000 kHz
 [ 1485.139905] 	 [drm:drm_add_display_info] HDMI-A-1	 : No deep color support on this HDMI sink.
 [ 1485.139921] 	 [drm:drm_add_display_info] CEA VCDB 0x2b
 [ 1485.139927] 	 [drm:drm_add_display_info] HDMI-A-1	 : Assigning EDID-1.4 digital sink color depth as 0 bpc.
 [ 1485.140125] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_mode_valid] vop2 clock: [198000]
 [ 1485.140133] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_mode_valid] vop2 requested clock [198940]
 [ 1485.140160] 	 [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:423:HDMI-A-1] probed modes :
 [ 1485.140172] 	 [drm:drm_mode_debug_printmodeline] Modeline "1440x1440"	 : 90 198940 1440 1490 1498 1514 1440 1448 1458 1460 0x48 0xa
 [ 1485.140189] 	 [drm:drm_mode_object_put] OBJ ID	 : 423 (2)
 [ 1485.140208] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR
 [ 1485.140243] 	 [drm:drm_mode_object_put] OBJ ID	 : 423 (2)
 [ 1485.140261] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES
 [ 1485.150068] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (3)
 [ 1485.150121] 	 [drm:drm_atomic_state_default_clear] Clearing atomic state 000000006fd4f9de
 [ 1485.150134] 	 [drm:drm_mode_object_put] OBJ ID	 : 633 (2)
 [ 1485.150149] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (2)
 [ 1485.150168] 	 [drm:__drm_atomic_state_free] Freeing atomic state 000000006fd4f9de
 [ 1485.150333] 	 [drm:drm_mode_obj_get_properties_ioctl] OBJ ID	 : 423 (2)
 [ 1485.150368] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES
 [ 1485.150382] 	 [drm:drm_ioctl] comm="drm-compositor" pid=382, dev=0xe200, auth=1, DRM_IOCTL_MODE_RMFB
 [ 1485.150394] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (2)
 [ 1485.150401] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (1)
 [ 1485.150408] 	 [drm:drm_mode_obj_get_properties_ioctl] OBJ ID	 : 423 (2)
 [ 1485.150427] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY
...
 [ 1485.150693] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY
 [ 1485.150706] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB
 [ 1485.150716] 	 [drm:drm_mode_object_put] OBJ ID	 : 646 (2)
 [ 1485.150726] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB
 [ 1485.150736] 	 [drm:drm_mode_object_put] OBJ ID	 : 646 (2)
 [ 1485.152904] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_ATOMIC
 [ 1485.152928] 	 [drm:drm_atomic_state_init] Allocated atomic state 00000000f10038f4
 [ 1485.152956] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:56:Esmart0-win0] 000000005f4a6d8e state to 00000000f10038f4
 [ 1485.152970] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:56:Esmart0-win0] state 000000005f4a6d8e
 [ 1485.152985] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:136:Cluster0-win0] 0000000083ddc09c state to 00000000f10038f4
 [ 1485.152994] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:136:Cluster0-win0] state 0000000083ddc09c
 [ 1485.153008] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:150:Cluster0-win1] 0000000007efcb0b state to 00000000f10038f4
 [ 1485.153030] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:150:Cluster0-win1] state 0000000007efcb0b
 [ 1485.153045] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:248:Esmart0-win1] 000000009dd6e721 state to 00000000f10038f4
 [ 1485.153053] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:248:Esmart0-win1] state 000000009dd6e721
 [ 1485.153067] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:262:Esmart0-win2] 000000008e136201 state to 00000000f10038f4
 [ 1485.153075] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:262:Esmart0-win2] state 000000008e136201
 [ 1485.153090] 	 [drm:drm_atomic_get_plane_state] Added [PLANE:276:Esmart0-win3] 0000000050459a41 state to 00000000f10038f4
 [ 1485.153098] 	 [drm:drm_atomic_set_property] Set [NOFB] for [PLANE:276:Esmart0-win3] state 0000000050459a41
 [ 1485.153108] 	 [drm:drm_atomic_check_only] checking 00000000f10038f4
 [ 1485.153129] 	 [drm:drm_atomic_commit] committing 00000000f10038f4
 [ 1485.153168] 	 [drm:drm_atomic_state_default_clear] Clearing atomic state 00000000f10038f4
 [ 1485.153184] 	 [drm:__drm_atomic_state_free] Freeing atomic state 00000000f10038f4
 [ 1485.153265] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_CREATEPROPBLOB
 [ 1485.153321] 	 [drm:drm_ioctl] comm="drm-event-liste" pid=375, dev=0xe200, auth=1, DRM_IOCTL_MODE_ATOMIC
 [ 1485.153340] 	 [drm:drm_atomic_state_init] Allocated atomic state 00000000f10038f4
 [ 1485.153365] 	 [drm:drm_atomic_get_crtc_state] Added [CRTC:70:video_port0] 0000000026fb6a08 state to 00000000f10038f4
 [ 1485.153386] 	 [drm:drm_mode_object_get] OBJ ID	 : 642 (3)
 [ 1485.153406] 	 [drm:drm_atomic_set_mode_prop_for_crtc] Set [MODE:1440x1440] for [CRTC:70:video_port0] state 0000000026fb6a08
 [ 1485.153417] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (4)
 [ 1485.153423] 	 [drm:drm_mode_object_put] OBJ ID	 : 642 (3)
 [ 1485.153439] 	 [drm:drm_mode_object_get] OBJ ID	 : 423 (2)
 [ 1485.153449] 	 [drm:drm_atomic_get_connector_state] Added [CONNECTOR:423:HDMI-A-1] 000000002cdcc342 state to 00000000f10038f4
 [ 1485.153456] 	 [drm:drm_mode_object_get] OBJ ID	 : 423 (3)
 [ 1485.153465] 	 [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:423:HDMI-A-1] state 000000002cdcc342 to [CRTC:70:video_port0]
 [ 1485.153471] 	 [drm:drm_mode_object_put] OBJ ID	 : 423 (4)
 [ 1485.153479] 	 [drm:drm_atomic_check_only] checking 00000000f10038f4
 [ 1485.153490] 	 [drm:drm_atomic_helper_check_modeset] [CRTC:70:video_port0] mode changed
 [ 1485.153497] 	 [drm:drm_atomic_helper_check_modeset] [CRTC:70:video_port0] enable changed
 [ 1485.153504] 	 [drm:drm_atomic_helper_check_modeset] [CRTC:70:video_port0] active changed
 [ 1485.153523] 	 [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:423:HDMI-A-1]
 [ 1485.153534] 	 [drm:drm_atomic_helper_check_modeset] [CONNECTOR:423:HDMI-A-1] using [ENCODER:422:TMDS-422] on [CRTC:70:video_port0]
 [ 1485.153545] 	 [drm:drm_atomic_helper_check_modeset] [CRTC:70:video_port0] needs all connectors, enable	 : y, active: y
 [ 1485.153555] 	 [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:70:video_port0] to 00000000f10038f4
 [ 1485.153567] 	 [drm:drm_atomic_add_affected_planes] Adding all current planes for [CRTC:70:video_port0] to 00000000f10038f4
 [ 1485.153584] 	 [drm:drm_atomic_add_encoder_bridges] Adding all bridges for [encoder:422:TMDS-422] to 00000000f10038f4
 [ 1485.153599] 	 [drm:drm_atomic_get_private_obj_state] Added new private object 00000000d5bad693 state 000000000b9d7f14 to 00000000f10038f4
 [ 1485.153692] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_mode_valid] vop2 clock: [198000]
 [ 1485.153701] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_mode_valid] vop2 requested clock [198940]
 [ 1485.153745] 	 dwhdmi-rockchip fde80000.hdmi	 : use tmds mode
 [ 1485.153805] 	 [drm:drm_atomic_commit] committing 00000000f10038f4
 [ 1485.153836] 	 rockchip-drm display-subsystem	 : [drm:drm_calc_timestamping_constants] crtc 70: hwmode: htotal 1514, vtotal 1460, vdisplay 1440
 [ 1485.153847] 	 rockchip-drm display-subsystem	 : [drm:drm_calc_timestamping_constants] crtc 70: clock 198940 kHz framedur 11111088 linedur 7610
 [ 1485.153855] 	 [drm:drm_atomic_helper_commit_modeset_disables] modeset on [ENCODER:422:TMDS-422]
 [ 1485.153867] 	 [drm:drm_atomic_helper_commit_modeset_enables] enabling [CRTC:70:video_port0]
 [ 1485.155673] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK
 [ 1485.155691] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] crtc 0 failed to acquire vblank counter, -22
 [ 1485.155698] 	 [drm:drm_ioctl] comm="vsync", pid=376, ret=-22
 [ 1485.166783] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK
 [ 1485.166810] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] crtc 0 failed to acquire vblank counter, -22
 [ 1485.166818] 	 [drm:drm_ioctl] comm="vsync", pid=376, ret=-22
 [ 1485.177875] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK
 [ 1485.177902] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] crtc 0 failed to acquire vblank counter, -22
 [ 1485.177910] 	 [drm:drm_ioctl] comm="vsync", pid=376, ret=-22
 [ 1485.183196] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_atomic_enable] Update mode to 1440x1440p90, type: 11(if:800) for vp0 dclk: 198940000
 [ 1485.183312] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_atomic_enable] dclk_out0 div: 0 dclk_core0 div: 2
 [ 1485.183383] 	 rockchip-vop2 fdd90000.vop	 : [drm:vop2_crtc_atomic_enable] set dclk_vop0 to 198940000, get 198000000
 [ 1485.183422] 	 [drm:drm_atomic_helper_commit_modeset_enables] enabling [ENCODER:422:TMDS-422]
 [ 1485.183694] 	 rockchip-hdptx-phy-hdmi fed60000.hdmiphy	 : hdptx_ropll_cmn_config bus_width:1e5b18 rate:1989400
 [ 1485.184012] 	 rockchip-hdptx-phy-hdmi fed60000.hdmiphy	[31m: hdptx phy pll locked!
 [ 1485.184058] 	 dwhdmi-rockchip fde80000.hdmi	 : final tmdsclk = 198940000
 [ 1485.184151] 	 dwhdmi-rockchip fde80000.hdmi	 : don't use dsc mode
 [ 1485.184173] 	 [drm:dw_hdmi_qp_bridge_atomic_enable] No need to set HDR metadata in infoframe
 [ 1485.184180] 	 dwhdmi-rockchip fde80000.hdmi	 : dw hdmi qp use tmds mode
 [ 1485.184198] 	 rockchip-hdptx-phy-hdmi fed60000.hdmiphy	 : bus_width:0x1e5b18,bit_rate:1989400
 [ 1485.184429] 	 rockchip-hdptx-phy-hdmi fed60000.hdmiphy	[31m: hdptx phy lane locked!
 [ 1485.189008] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK
 [ 1485.189033] 	 rockchip-drm display-subsystem	 : [drm:drm_vblank_enable] enabling vblank on crtc 0, ret: 0
 [ 1485.189047] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] waiting on vblank count 13049, crtc 0
 [ 1485.194660] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] crtc 0 returning 13049 to client
 [ 1485.194759] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK
 [ 1485.194776] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] waiting on vblank count 13050, crtc 0
 [ 1485.205798] 	 rockchip-drm display-subsystem	 : [drm:drm_wait_vblank_ioctl] crtc 0 returning 13050 to client
 [ 1485.205881] 	 [drm:drm_ioctl] comm="vsync" pid=376, dev=0xe200, auth=1, DRM_IOCTL_WAIT_VBLANK