meson64 vs hardkernel "meson_drv_shutdown" patch debacle (#2821)
A long story short: - patch 'meson64_add_shutdown_function_to_meson_drv.patch' (adds meson_drv_shutdown) added on 04/03/2021 - same patch renamed to '.patch_disabled' on 07/03/2021, since it broke what it was supposed to fix - kernel 5.10.24 upstream merged similar version of patch, which indeed fixed some khadas stuff, but broke odroid, at least HC4 - now I add this patch to revert upstream. - also remove the .patch_disabled to avoid confusion - to say the truth, the HC4 is not reboot-proof, it still hangs sometimes. so this is not the end of it. - ps: without this revert, HC4 hangs 100% of the time. - ps2: did not test on edge 5.11 yet, but it looks like the same Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
This commit is contained in:
parent
d886ee3b62
commit
1f79933197
@ -0,0 +1,44 @@
|
||||
From 66e11351f4210f927a513662ab9369ef3ebad52a Mon Sep 17 00:00:00 2001
|
||||
From: Dongjin Kim <tobetter@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 18:00:07 +0900
|
||||
Subject: [PATCH] ODROID-N2/C4/HC4: Revert "drm: meson_drv add shutdown
|
||||
function"
|
||||
|
||||
Reboot fails 100% with this commit.
|
||||
|
||||
This reverts commit b0fe7f2c002adecda5f146bc5e430d0e3965c255.
|
||||
|
||||
Change-Id: Id91b44dad4359f137dfea2738e3a7705b211e67a
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_drv.c | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
|
||||
index 453d8b4c5763d9..42c5d3246cfcbd 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_drv.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_drv.c
|
||||
@@ -482,16 +482,6 @@ 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;
|
||||
@@ -563,7 +553,6 @@ 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,
|
||||
@ -1,65 +0,0 @@
|
||||
From baed19f58ae55fa2081dc6c72d83080c1b6da01b Mon Sep 17 00:00:00 2001
|
||||
From: Artem Lapkin <art@khadas.com>
|
||||
Date: Wed, 24 Feb 2021 12:12:53 +0000
|
||||
Subject: [PATCH] FROMLIST(v1): drm/meson: add shutdown function to meson_drv
|
||||
|
||||
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)
|
||||
|
||||
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Signed-off-by: Artem Lapkin <art@khadas.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_drv.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
|
||||
index 42c5d3246cfcb..ac3808e846ff8 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_drv.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_drv.c
|
||||
@@ -482,6 +482,17 @@ 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;
|
||||
+
|
||||
+ dev_warn(&pdev->dev, "%s", __func__);
|
||||
+ //drm_dev_unregister(drm);
|
||||
+ 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 +564,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,
|
||||
Loading…
Reference in New Issue
Block a user