I.MX8: MIPI-DSI: panel-simple: suspend/ resume failed

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

I.MX8: MIPI-DSI: panel-simple: suspend/ resume failed

1,681 Views
yoooh8668
Contributor III

Hi,

I'm using the MIPI-DSI as display of i.mx8mp/i.mx8mm.

But run into an issue of suspend/resume failed issue:

Here is the error code:

[ 27.658410] imx_sec_dsim_drv 32e60000.mipi_dsi: panel prepare failed: -13
[ 27.261310] PM: suspend entry (deep)
[ 27.273279] Filesystems sync: 0.008 seconds
[ 27.278758] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 27.287632] OOM killer disabled.
[ 27.290913] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 27.299923] printk: Suspending console(s) (use no_console_suspend to debug)
[ 27.580415] imx-dwmac 30bf0000.ethernet eth1: FPE workqueue stop
[ 27.628237] PM: suspend devices took 0.320 seconds
[ 27.638805] Disabling non-boot CPUs ...
[ 27.639545] psci: CPU1 killed (polled 0 ms)
[ 27.641030] psci: CPU2 killed (polled 0 ms)
[ 27.643535] psci: CPU3 killed (polled 0 ms)
[ 27.644536] Enabling non-boot CPUs ...
[ 27.645031] Detected VIPT I-cache on CPU1
[ 27.645057] GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000
[ 27.645093] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 27.646060] CPU1 is up
[ 27.646430] Detected VIPT I-cache on CPU2
[ 27.646446] GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000
[ 27.646467] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 27.647343] CPU2 is up
[ 27.647716] Detected VIPT I-cache on CPU3
[ 27.647732] GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000
[ 27.647753] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 27.648672] CPU3 is up
[ 27.658410] imx_sec_dsim_drv 32e60000.mipi_dsi: panel prepare failed: -13
[ 27.856967] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode
[ 27.895290] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
[ 27.895312] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[ 27.895806] imx-dwmac 30bf0000.ethernet eth1: FPE workqueue start
[ 28.069454] xhci-hcd xhci-hcd.0.auto: xHC error in resume, USBSTS 0x411, Reinit
[ 28.069464] usb usb1: root hub lost power or was reset
[ 28.069468] usb usb2: root hub lost power or was reset
[ 28.069801] caam 30900000.crypto: registering rng-caam
[ 28.365861] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[ 28.642409] usb 2-1: reset SuperSpeed USB device number 2 using xhci-hcd
[ 28.877055] usb 1-1.5: reset high-speed USB device number 4 using xhci-hcd
[ 29.057771] usb 1-1.3: reset high-speed USB device number 3 using xhci-hcd
[ 29.242777] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
[ 29.517688] usb 1-1.3.5: reset high-speed USB device number 5 using xhci-hcd
[ 29.645381] PM: resume devices took 1.992 seconds
[ 29.844902] OOM killer enabled.
[ 29.848050] Restarting tasks ... done.
[ 29.853130] PM: suspend exit

 And I show the code flow using ftrace, find nothing weird:

probe:

swapper/0-1 [000] ...1. 1.760804: panel_simple_init <-do_one_initcall
kworker/u8:2-88 [003] ...1. 3.701931: panel_simple_dsi_probe <-mipi_dsi_drv_probe
kworker/u8:2-88 [003] ...1. 3.701943: panel_simple_probe <-panel_simple_dsi_probe
kworker/u8:2-88 [003] ...1. 3.735142: panel_simple_get_modes <-drm_panel_get_modes
kworker/u8:2-88 [003] ...1. 3.742423: panel_simple_prepare <-drm_panel_prepare
kworker/u8:2-88 [003] ...1. 3.742431: panel_simple_resume <-pm_generic_runtime_resume
kworker/u8:2-88 [003] ...1. 3.742470: panel_simple_enable <-drm_panel_enable
weston-729 [001] ...1. 11.044231: panel_simple_get_modes <-drm_panel_get_modes
weston-729 [001] ...1. 13.803765: panel_simple_get_modes <-drm_panel_get_modes

suspend:

sh-1391 [001] ...1. 184.184903: panel_simple_suspend <-pm_generic_runtime_suspend
sh-1391 [001] ...1. 184.474911: panel_simple_disable <-drm_panel_disable
sh-1391 [001] ...1. 184.474917: panel_simple_unprepare <-drm_panel_unprepare

resume:

sh-1391 [001] ...1. 184.535472: panel_simple_prepare <-drm_panel_prepare
sh-1391 [000] ...1. 184.944355: panel_simple_resume <-pm_generic_runtime_resume
kworker/3:0-29 [003] ...1. 186.738215: panel_simple_suspend <-pm_generic_runtime_suspend

Please help me find the root cause!

Tags (3)
0 Kudos
9 Replies

962 Views
Mowlwurf
Contributor II

Hello @yoooh8668,

I'm facing the same issue. Did you find a solution?

 

Best regards,

Markus

0 Kudos

802 Views
Mowlwurf
Contributor II

For the record:

When removing the following lines in panel-simple.c, the error disappears and the display is switched on again, when the SOC wakes up:

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 00d66d563b8ed..c6721d10aa6da 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -482,12 +482,6 @@ static int panel_simple_prepare(struct drm_panel *panel)
        if (p->prepared)
                return 0;

-       ret = pm_runtime_get_sync(panel->dev);
-       if (ret < 0) {
-               pm_runtime_put_autosuspend(panel->dev);
-               return ret;
-       }
-
        p->prepared = true;

        return 0;

For more details please see this thread: https://community.toradex.com/t/verdin-imx8mm-suspend-resume-of-panel-simple-failed/20635

 

Best regards,

Markus

0 Kudos

1,611 Views
Dhruvit
NXP TechSupport
NXP TechSupport
 
I hope you are doing well
 
It seems that you are using the sec-dsim.c driver. For I.Mx 8, kindly try the updated "Raydium MIPI-DSI panel driver" given below.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos

1,598 Views
yoooh8668
Contributor III

Hi @Dhruvit ,

Does this driver can be used for other panels?

Besides, I don't see any suspend/ resume ops in this driver, have you test the suspend/ resume function on this panel?

If does, I'll try porting our dsi panel base on this driver.

 

THANKS~~

Joe

0 Kudos

1,575 Views
yoooh8668
Contributor III

Hi @Dhruvit ,

 

I run a very simple test on this driver, I can use the fb-test to see the resolution of my device.

(Even though the the backlight is not on and no image either.)

root@edm-g-imx8mm:/sys/kernel/debug/tracing# fb-test
fb-test 1.1.0 (rosetta)
fb res 1280x800 virtual 1280x800, line_len 5120, bpp 32

 

But I run the suspend/ resume and find the below error:

[   56.862864] panel-raydium-rm67191 32e10000.mipi_dsi.0: PM: calling pm_generic_suspend+0x0/0x58 @ 558, parent: 32e10000.mipi_dsi
[   56.874357] panel-raydium-rm67191 32e10000.mipi_dsi.0: PM: pm_generic_suspend+0x0/0x58 returned 0 after 2 usecs
[   58.762538] panel-raydium-rm67191 32e10000.mipi_dsi.0: Failed to set display OFF (-16)
[   58.770465] imx_sec_dsim_drv 32e10000.mipi_dsi: panel disable failed: -16
[   63.624219] panel-raydium-rm67191 32e10000.mipi_dsi.0: PM: calling pm_generic_resume+0x0/0x58 @ 558, parent: 32e10000.mipi_dsi
[   63.635628] panel-raydium-rm67191 32e10000.mipi_dsi.0: PM: pm_generic_resume+0x0/0x58 returned 0 after 0 usecs

Seems like there are some problems of suspend/ resume in this panel driver, too.

0 Kudos

1,530 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yoooh8668,

I hope you are doing well

have you tested the suspend/ resume function on this panel?

=> As we do not have a proper setup here, we are unable to reproduce the issue at our end.

The below error suggests that the device should be in use while performing the suspend/resume operation. Kindly try to do the same when the panel is in the ideal mode. i.e fb-test etc... is not running.

[ 58.770465] imx_sec_dsim_drv 32e10000.mipi_dsi: panel disable failed: -16


Thanks & Regards,
Dhruvit Vasavada

0 Kudos

1,461 Views
yoooh8668
Contributor III

Hi @Dhruvit ,

 

Have you test the mipi-panel suspend/ resume using that driver with any panel?

THANKS~

Joe

0 Kudos

1,377 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yoooh8668,

I hope you are doing well.
 
My apology for the delayed response.
 

Have you tested the mipi-panel suspend/ resume using that driver with any panel?

=>We do not have the setup of the panel to reproduce the issue at our end. To further debug the issue kindly mention the steps you are following.
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos

1,345 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yoooh8668,

I hope you are doing well.

waiting for your response.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos