aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch b/target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch
new file mode 100644
index 0000000000..ce8a285502
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0721-drm-vc4-Increase-the-core-clock-to-a-minimum-of-500M.patch
@@ -0,0 +1,40 @@
+From f79e871c8d9fbe90b351f61b052878d98b999b1b Mon Sep 17 00:00:00 2001
+From: Dom Cobley <popcornmix@gmail.com>
+Date: Mon, 26 Jul 2021 18:07:25 +0100
+Subject: [PATCH] drm/vc4: Increase the core clock to a minimum of 500MHz
+
+The core clock needs to be raised temporarily during a modeset to
+500MHz. However, the HVS core clock requirement might be higher than
+500MHz. This rate will be enforced at the end of the mode setting,
+meaning that might might end up with a core clock rate lower than
+planned on the first mode set.
+
+Use the maximum value of 500MHz and the HVS core clock rate for our
+temporary boost to fix this issue.
+
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+---
+ drivers/gpu/drm/vc4/vc4_kms.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_kms.c
++++ b/drivers/gpu/drm/vc4/vc4_kms.c
+@@ -348,11 +348,17 @@ vc4_atomic_complete_commit(struct drm_at
+ }
+
+ if (vc4->hvs && vc4->hvs->hvs5) {
++ unsigned long core_rate = max_t(unsigned long,
++ 500000000,
++ hvs_state->core_clock_rate);
++
++ drm_dbg(dev, "Raising the core clock at %lu Hz\n", core_rate);
++
+ /*
+ * Do a temporary request on the core clock during the
+ * modeset.
+ */
+- core_req = clk_request_start(hvs->core_clk, 500000000);
++ core_req = clk_request_start(hvs->core_clk, core_rate);
+
+ /*
+ * And remove the previous one based on the HVS