mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-02 20:16:59 +00:00
55a48b0957
Manually rebased:
backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch
Removed upstreamed:
generic-backport/807-v5.17-0003-nvmem-core-Fix-a-conflict-between-MTD-and-NVMEM-on-w.patch[1]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=34ec4c7831c416ac56619477f1701986634a7efc
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 461072fc7b
)
[Refresh on OpenWrt 22.03]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
66 lines
1.9 KiB
Diff
66 lines
1.9 KiB
Diff
From 94bc403a9a7af3bd042ecdc160e6ab0b08331df8 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Fri, 2 Jul 2021 12:03:28 +0200
|
|
Subject: [PATCH] drm/vc4: hdmi: Make sure the controller is powered up during
|
|
bind
|
|
|
|
In the bind hook, we actually need the device to have the HSM clock
|
|
running during the final part of the display initialisation where we
|
|
reset the controller and initialise the CEC component.
|
|
|
|
Failing to do so will result in a complete, silent, hang of the CPU.
|
|
|
|
Fixes: 411efa18e4b0 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm")
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 17 +++++++++++++++--
|
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -2296,6 +2296,18 @@ static int vc4_hdmi_bind(struct device *
|
|
if (ret)
|
|
goto err_put_ddc;
|
|
|
|
+ /*
|
|
+ * We need to have the device powered up at this point to call
|
|
+ * our reset hook and for the CEC init.
|
|
+ */
|
|
+ ret = vc4_hdmi_runtime_resume(dev);
|
|
+ if (ret)
|
|
+ goto err_put_ddc;
|
|
+
|
|
+ pm_runtime_get_noresume(dev);
|
|
+ pm_runtime_set_active(dev);
|
|
+ pm_runtime_enable(dev);
|
|
+
|
|
if (vc4_hdmi->variant->reset)
|
|
vc4_hdmi->variant->reset(vc4_hdmi);
|
|
|
|
@@ -2307,8 +2319,6 @@ static int vc4_hdmi_bind(struct device *
|
|
clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
|
|
}
|
|
|
|
- pm_runtime_enable(dev);
|
|
-
|
|
drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
|
|
drm_encoder_helper_add(encoder, &vc4_hdmi_encoder_helper_funcs);
|
|
|
|
@@ -2332,6 +2342,8 @@ static int vc4_hdmi_bind(struct device *
|
|
vc4_hdmi_debugfs_regs,
|
|
vc4_hdmi);
|
|
|
|
+ pm_runtime_put_sync(dev);
|
|
+
|
|
return 0;
|
|
|
|
err_free_cec:
|
|
@@ -2342,6 +2354,7 @@ err_destroy_conn:
|
|
vc4_hdmi_connector_destroy(&vc4_hdmi->connector);
|
|
err_destroy_encoder:
|
|
drm_encoder_cleanup(encoder);
|
|
+ pm_runtime_put_sync(dev);
|
|
pm_runtime_disable(dev);
|
|
err_put_ddc:
|
|
put_device(&vc4_hdmi->ddc->dev);
|