drm: meson_drv add shutdown function
PATCH 1/1 drm: meson_drv add shutdown function
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU...
...STUCK...
Solution: add shutdown function to meson_drm driver // debug kernel log
[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
...REBOOT...
Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/meson/meson_drv.c +11 -0
@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;
@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,
Signature · 7 lines
2.25.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 16 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)
Quoted 8 lines
bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Quoted 30 lines
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/meson/meson_drv.c +10
-0@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;
drivers/gpu/drm/meson/meson_drv.c static const struct dev_pm_ops meson_drv_pm_ops = { · line 569
Quoted 7 lines
drivers/gpu/drm/meson/meson_drv.c +1
-0@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 21 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...
Quoted 5 lines
Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Neil Armstrong
AppliedQuoted 54 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/meson/meson_drv.c +10
-0@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;
drivers/gpu/drm/meson/meson_drv.c static const struct dev_pm_ops meson_drv_pm_ops = { · line 569
Quoted 7 lines
drivers/gpu/drm/meson/meson_drv.c +1
-0@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,
Applied to drm-misc-fixes,
Thanks !
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Kevin Hilman
maintainerHi Neil,
Quoted 55 lines · Neil Armstrong
Quoted 54 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/meson/meson_drv.c +10
-0@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {
Quoted 9 lines
drivers/gpu/drm/meson/meson_drv.c static const struct dev_pm_ops meson_drv_pm_ops = { · line 569
Quoted 7 lines
drivers/gpu/drm/meson/meson_drv.c +1
-0static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,Applied to drm-misc-fixes,
Could you submit this as a fix to stable (v5.10+) also?
Thanks,
Kevin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 69 lines · Kevin Hilman
Hi Neil,
Quoted 55 lines · Neil Armstrong
Quoted 54 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/meson/meson_drv.c +10
-0@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {Quoted 9 lines
drivers/gpu/drm/meson/meson_drv.c static const struct dev_pm_ops meson_drv_pm_ops = { · line 569
Quoted 7 lines
drivers/gpu/drm/meson/meson_drv.c +1
-0static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,Applied to drm-misc-fixes,
Quoted 1 line
Could you submit this as a fix to stable (v5.10+) also?
It should be done automagically since I added the Fixes tag
neil
Quoted 5 lines
Thanks,
Kevin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Kevin Hilman
maintainerQuoted 70 lines · Neil Armstrong
Quoted 69 lines · Kevin Hilman
Hi Neil,
Quoted 64 lines · Neil Armstrong
Quoted 54 lines · Artem Lapkin
Problem: random stucks on reboot stage about 1/20 stuck/reboots // debug kernel log
[ 4.496660] reboot: kernel restart prepare CMD:(null) [ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU......STUCK...
Solution: add shutdown function to
meson_drmdriver // debug kernel log[ 5.231896] reboot: kernel restart prepare CMD:(null) [ 5.246135] [drm:meson_drv_shutdown] ... [ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin [ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... [ 5.338331] reboot: Restarting system [ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null)bl31 reboot reason:
0xd
bl31 reboot reason:0x0
system cmd 1.
...REBOOT...Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots and Odroid boards, WeTek Play2 (GXBB)
Tested-by Christian Hewitt <[email protected]>Signed-off-by Artem Lapkin <[email protected]>--- drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/meson/meson_drv.c +10
-0@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev,return count; } +static void meson_drv_shutdown (struct platform_device *pdev) +{ +struct meson_drm *priv =dev_get_drvdata (&pdev->dev); +struct drm_device *drm = priv->drm; + +DRM_DEBUG_DRIVER ("\n" ); +drm_kms_helper_poll_fini (drm); +drm_atomic_helper_shutdown (drm); +} +static int meson_drv_probe (struct platform_device *pdev) {struct component_match *match =NULL ;drivers/gpu/drm/meson/meson_drv.c static const struct dev_pm_ops meson_drv_pm_ops = { · line 569
Quoted 7 lines
drivers/gpu/drm/meson/meson_drv.c +1
-0@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = {static struct platform_driver meson_drm_platform_driver = { .probe = meson_drv_probe, + .shutdown = meson_drv_shutdown, .driver = { .name ="meson-drm" , .of_match_table = dt_match,Applied to drm-misc-fixes,
Quoted 3 lines
Quoted 1 line
Could you submit this as a fix to stable (v5.10+) also?
It should be done automagically since I added the Fixes tag
Oh, I didn't see the fixes tag, sorry.
Thanks!
Kevin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel