iMX8MPlus HDMI issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX8MPlus HDMI issue

4,606件の閲覧回数
alexeyfirago
Contributor II

Hi all,

We have a custom board based on iMX8MPlus. We are using custom BSP based on 5.4.x_2.2.0.

HDMI pinmux settings are:

MX8MP_IOMUXC_HDMI_DDC_SCL__HDMIMIX_HDMI_SCL	0x400001c3
MX8MP_IOMUXC_HDMI_DDC_SDA__HDMIMIX_HDMI_SDA	0x400001c3
MX8MP_IOMUXC_HDMI_HPD__HDMIMIX_HDMI_HPD		0x40000019

HDMI related DTS settings are:

&hdmimix_clk {
	status = "okay";
};

&irqsteer_hdmi {
	status = "okay";
};

&hdmimix_reset {
	status = "okay";
};

&hdmi_pavi {
	status = "okay";
};

&hdmi {
	status = "okay";
};

&hdmiphy {
	status = "okay";
};

&lcdif3 {
	status = "okay";
};

HDMI is properly probbed:

$ dmesg | grep -i hdmi
[    1.949710] samsung-hdmi-phy 32fdff00.hdmiphy: failed to get phy apb clk: -517
[    3.052758] imx-hdmi-pavi 32fc4000.hdmi-pai-pvi: No pvi clock get
[    4.618794] dwhdmi-imx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (samsung_dw_hdmi_phy2)
[    4.630347] dwhdmi-imx 32fd8000.hdmi: registered DesignWare HDMI I2C bus driver
[    4.640712] imx-drm display-subsystem: bound 32fd8000.hdmi (ops dw_hdmi_imx_ops)

HDMI monitor is properly detected when cable is inserted (see attached modetest.txt output).

We have also LVDS display and weston running. Weston properly displays desktop when HDMI is not enabled. Once we enable HDMI, weston fails to display the desktop on LVDS. If we are trying to stop weston (to be able to use modetest to set HDMI resolution manually) we are observing following error:

systemctl stop weston@root.service
[ 1112.771523] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:39:crtc-2] flip_done timed out
[ 1123.012432] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:43:HDMI-A-1] flip_done timed out
[ 1133.252823] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:37:plane-2] flip_done timed out
[ 1133.372802] ------------[ cut here ]------------
[ 1133.377432] [CRTC:39:crtc-2] vblank wait timed out
[ 1133.382305] WARNING: CPU: 0 PID: 529 at drivers/gpu/drm/drm_atomic_helper.c:1467 drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[ 1133.394387] Modules linked in: imx_sdma
[ 1133.398227] CPU: 0 PID: 529 Comm: weston-launch Tainted: G        W         5.4.93+gc18de2782a #1
[ 1133.407094] Hardware name: Hillrom i.MX8MPlus Seymour board (DT)
[ 1133.413097] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 1133.417886] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[ 1133.424410] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[ 1133.430932] sp : ffff80002419b9e0
[ 1133.434242] x29: ffff80002419b9e0 x28: 0000000000000000 
[ 1133.439553] x27: 0000000000000002 x26: 0000000000000070 
[ 1133.444861] x25: ffff000029738000 x24: 0000000000000001 
[ 1133.450169] x23: 0000000000000038 x22: 0000000000000006 
[ 1133.455478] x21: ffff0000240c3f00 x20: ffff0000296cf888 
[ 1133.460788] x19: 0000000000000002 x18: 0000000000000010 
[ 1133.466097] x17: 0000000000000000 x16: 0000000000000000 
[ 1133.471405] x15: ffff0000249eae70 x14: ffffffffffffffff 
[ 1133.476713] x13: ffff8000a419b737 x12: 0000000000000000 
[ 1133.482022] x11: 0000000000000034 x10: 00000000000009e0 
[ 1133.487330] x9 : ffff80002419b700 x8 : ffff0000249eb440 
[ 1133.492638] x7 : ffff00002bd53940 x6 : ffff000028d380f0 
[ 1133.497946] x5 : 0000000000000000 x4 : ffff00002bd401b8 
[ 1133.503254] x3 : ffff00002bd4f100 x2 : ffff00002bd401b8 
[ 1133.508563] x1 : 2b6bee894b669e00 x0 : 0000000000000000 
[ 1133.513871] Call trace:
[ 1133.516317]  drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[ 1133.522494]  drm_atomic_helper_wait_for_vblanks+0x14/0x20
[ 1133.527891]  lcdifv3_drm_atomic_commit_tail+0x50/0x68
[ 1133.532939]  commit_tail+0x9c/0x138
[ 1133.536424]  drm_atomic_helper_commit+0xc8/0x140
[ 1133.541040]  drm_atomic_commit+0x48/0x58
[ 1133.544962]  drm_client_modeset_commit_atomic.isra.0+0x174/0x1f8
[ 1133.550965]  drm_client_modeset_commit_force+0x58/0x190
[ 1133.556189]  drm_fb_helper_restore_fbdev_mode_unlocked+0x70/0xd0
[ 1133.562192]  drm_fbdev_client_restore+0x14/0x20
[ 1133.566721]  drm_client_dev_restore+0x78/0xc8
[ 1133.571074]  drm_lastclose+0x4c/0x58
[ 1133.574645]  drm_release+0xd4/0xe0
[ 1133.578047]  __fput+0x88/0x228
[ 1133.581099]  ____fput+0xc/0x18
[ 1133.584152]  task_work_run+0x80/0x130
[ 1133.587811]  do_exit+0x2d4/0xa10
[ 1133.591036]  do_group_exit+0x40/0xa0
[ 1133.594608]  __arm64_sys_exit_group+0x14/0x18
[ 1133.598963]  el0_svc_common.constprop.0+0x68/0x160
[ 1133.603751]  el0_svc_handler+0x20/0x80
[ 1133.607497]  el0_svc+0x8/0x208
[ 1133.610549] ---[ end trace fafd176c2d69445c ]---

HDMI monitor reports "No signal".

Attached also clk_summary output.

Are we missing something in the configuration? Any hints would be appreciated.

Thanks,
Alexey

タグ(3)
0 件の賞賛
返信
7 返答(返信)

3,583件の閲覧回数
Ryze
Contributor I
Hi john_obendorfer,
I use BSP based on 5.10.52,But I have same issue.
Did you solve the problem ?Any hints would be appreciated.
0 件の賞賛
返信

4,535件の閲覧回数
john_obendorfer
Contributor III

I have run into a slightly different problem with the HDMI, on almost the same setup -- a custom IMX8MP board running 5.4.24_2.1.0, similar device tree setup, and yes, the HDMI pin config is in the pinctrl_hog group.  In this case, however, shortly after emitting the following message:

samsung-hdmi-phy 32fdff00.hdmiphy: failed to get phy apb clk

the kernel locks up and hangs.  Looking at the driver source, this appears to show a driver probe failure and abort.  I see a similar message in @alexeyfirago's post above.  Is this expected or normal?  Thanks in advance, John

0 件の賞賛
返信

4,501件の閲覧回数
brenolima
NXP Employee
NXP Employee

Hi @john_obendorfer,

FYI @alexeyfirago 

And I don't think the following message can be a problem, I see similar error during boot and both LVDS and HDMI are functional:

samsung-hdmi-phy 32fdff00.hdmiphy: failed to get phy apb clk: -517

Could you please let us know your LVDS resolution? The following commit may be helpful depending on your display resolution, seems that change isn't included on L5.4.3_1.0.0.

https://source.codeaurora.org/external/imx/linux-imx/commit/?h=imx_5.4.70_2.3.0&id=4bb00e2a66bf29adc...

Please note that dual display isn't supported on L5.4.3_1.0.0, I see support starting on L5.4.24_2.1.0:

https://source.codeaurora.org/external/imx/linux-imx/log/?qt=grep&q=MLK-23694&h=imx_5.4.24_2.1.0

I would recommend moving to a newer version if possible.

Thanks,
Breno Lima

0 件の賞賛
返信

2,621件の閲覧回数
ederibaucourt
Contributor II

Hello,

I'm observing an error similar to the one described here.

While upgrading our linux kernel on an i.MX8M Plus SOM from 5.4 to 5.15, we observed CPU freezes with RCU stalls (see attached trace). Wether we boot on eMMC or NFS, the rootfs seems to be mounted since our watchdog is not triggered, however the systemd /sbin/init process is not started and all activity seems to cease apart from the RCU stalls that pop up.

We noticed that we could avoid this error by keeping the node &hdmi_pavi from imx8mp.dtsi "okay" in our custom device tree even though we do not need HDMI.
Having it in disabled state worked fine on the previous 5.4 linux kernel. One of our hypothesis is that a critical power or clock branch is disabled along with this node.
I am interested to know if this is reproducible on an EVK and identifying the critical CPU resource that could apparently be relying on the hdmi_pavi block ?

In the meantime, we'll keep the HDMI block enabled.

Regards,

Enguerrand de Ribaucourt

4,550件の閲覧回数
brenolima
NXP Employee
NXP Employee

Hi Alexey,

@alexeyfirago 

I have just tested both L5.10.52_2.1.0 and L5.4.47_2.2.0 BSPs and I don't see similar issue on i.MX8MP EVK board. I'm using IMX-LVDS-HDMI bridge (IT6263) and HDMI port.

Could you please confirm PinMux configuration is being included in pinctrl_hog group? Please refer to example below for i.MX8MP EVK:
https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.d...

Is this issue only happening when hot plugging the HDMI cable? Could you please check if LVDS can work with HDMI enabled in dtb and cable disconnected? And also if LVDS can work with HDMI enabled and connected before booting up device?

Thanks,
Breno Lima

0 件の賞賛
返信

4,530件の閲覧回数
alexeyfirago
Contributor II

Hi Breno Lima,

Pinmux config is part of pinctrl_hog group. Since EDID is detected and parsed properly, I assume pinmux is correct. The only concern here - we do not have MX8MP_IOMUXC_HDMI_CEC__HDMIMIX_HDMI_CEC connected, can this cause any issues?

Issue doesn't happen when I boot with HDMI enabled in DTB, but HDMI cable is disconnected.

Once I connect the HDMI cable, I can see following:

 

root@imx8mplus-seymour-mel:~# [  117.477742] ------------[ cut here ]------------
[  117.482374] [CRTC:39:crtc-2] vblank wait timed out
[  117.487239] WARNING: CPU: 1 PID: 238 at drivers/gpu/drm/drm_atomic_helper.c:1467 drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[  117.499319] Modules linked in: imx_sdma
[  117.503160] CPU: 1 PID: 238 Comm: irq/226-32fd800 Not tainted 5.4.93+gc18de2782a #1
[  117.510812] Hardware name: Hillrom i.MX8MPlus Seymour board (DT)
[  117.516818] pstate: 40000005 (nZcv daif -PAN -UAO)
[  117.521610] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[  117.528136] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[  117.534659] sp : ffff8000238fb960
[  117.537970] x29: ffff8000238fb960 x28: 0000000000000000 
[  117.543281] x27: 0000000000000001 x26: 0000000000000070 
[  117.548591] x25: ffff000029708000 x24: 0000000000000001 
[  117.553903] x23: 0000000000000038 x22: 0000000000000006 
[  117.559212] x21: ffff000024f8f800 x20: ffff0000296a7888 
[  117.564524] x19: 0000000000000002 x18: 0000000000000010 
[  117.569836] x17: 0000000000000000 x16: 0000000000000000 
[  117.575147] x15: ffff000028761270 x14: ffffffffffffffff 
[  117.580457] x13: ffff8000a38fb6b7 x12: ffff8000238fb6bf 
[  117.585768] x11: ffff8000119c7000 x10: ffff800011b5b328 
[  117.591078] x9 : 0000000000000000 x8 : ffff800011b5c000 
[  117.596388] x7 : 00000000000001a7 x6 : ffff800011b5b8b5 
[  117.601699] x5 : 0000000000000000 x4 : ffff00002bd601b8 
[  117.607009] x3 : ffff00002bd6f100 x2 : ffff00002bd601b8 
[  117.612319] x1 : 6ec32e69abcb0c00 x0 : 0000000000000000 
[  117.617631] Call trace:
[  117.620077]  drm_atomic_helper_wait_for_vblanks.part.0+0x274/0x290
[  117.626256]  drm_atomic_helper_wait_for_vblanks+0x14/0x20
[  117.631654]  lcdifv3_drm_atomic_commit_tail+0x50/0x68
[  117.636703]  commit_tail+0x9c/0x138
[  117.640190]  drm_atomic_helper_commit+0xc8/0x140
[  117.644806]  drm_atomic_commit+0x48/0x58
[  117.648729]  drm_client_modeset_commit_atomic.isra.0+0x174/0x1f8
[  117.654735]  drm_client_modeset_commit_force+0x58/0x190
[  117.659958]  drm_fb_helper_restore_fbdev_mode_unlocked+0x70/0xd0
[  117.665961]  drm_fb_helper_set_par+0x2c/0x58
[  117.670229]  drm_fb_helper_hotplug_event.part.0+0x9c/0xc8
[  117.675626]  drm_fbdev_client_hotplug+0x38/0x188
[  117.680241]  drm_client_dev_hotplug+0x78/0xc0
[  117.684598]  drm_kms_helper_hotplug_event+0x30/0x40
[  117.689475]  drm_helper_hpd_irq_event+0x134/0x148
[  117.694178]  dw_hdmi_irq+0x110/0x1c8
[  117.697754]  irq_thread_fn+0x28/0x98
[  117.701328]  irq_thread+0x148/0x240
[  117.704817]  kthread+0x138/0x158
[  117.708047]  ret_from_fork+0x10/0x1c
[  117.711620] ---[ end trace b76db850b226b492 ]---

 

From this point, if I remove the HDMI cable, weston/LVDS starts to work again.

Regards,
Alexey

0 件の賞賛
返信

4,504件の閲覧回数
brenolima
NXP Employee
NXP Employee

Hi @alexeyfirago,

HDMI video does not depend on CEC pin connection state. I don't see similar failure when selecting a different MUX option for MX8MP_IOMUXC_HDMI_CEC.

Regarding the Kernel dump provided, could you please apply commit below? I see that commit isn't included on L5.4.47_2.20 BSP:

https://source.codeaurora.org/external/imx/linux-imx/commit/?h=imx_5.4.70_2.3.0&id=8fb049834bff5edfd...

No need to backport, seems that commit can be cherry picked:

$ git cherry-pick 8fb049834bff5edfd15d62bee9bda333c2ddfcee

Thanks,
Breno Lima

0 件の賞賛
返信