aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2022-05-16 23:40:32 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2022-05-17 15:11:22 +0200
commit20ea6adbf199097c4f5f591ffee088340630dae4 (patch)
treed6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch
parentbca05bd072180dc38ef740b37ded9572a6db1981 (diff)
downloadupstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz
upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2
upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip
bcm27xx: add support for linux v5.15
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch b/target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch
new file mode 100644
index 0000000000..6ffe0f1e41
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.15/950-0564-drm-vc4-kms-Move-clock-request-to-our-HVS-state.patch
@@ -0,0 +1,59 @@
+From f7d98ba8c30bbc5b29bf740f28bf2daeeec09d2b Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime@cerno.tech>
+Date: Thu, 4 Nov 2021 14:04:37 +0100
+Subject: [PATCH] drm/vc4: kms: Move clock request to our HVS state
+
+Our current clock request has been stored so far on the main HVS
+structure, but even though we shouldn't have two commits in parallel and
+it shouldn't cause any functional change, the request itself is linked
+to a given HVS state.
+
+Move the request there to make a bit more sense.
+
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+---
+ drivers/gpu/drm/vc4/vc4_drv.h | 1 -
+ drivers/gpu/drm/vc4/vc4_kms.c | 8 +++++---
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_drv.h
++++ b/drivers/gpu/drm/vc4/vc4_drv.h
+@@ -326,7 +326,6 @@ struct vc4_hvs {
+ u32 __iomem *dlist;
+
+ struct clk *core_clk;
+- struct clk_request *core_req;
+
+ /* Memory manager for CRTCs to allocate space in the display
+ * list. Units are dwords.
+--- a/drivers/gpu/drm/vc4/vc4_kms.c
++++ b/drivers/gpu/drm/vc4/vc4_kms.c
+@@ -40,6 +40,7 @@ static struct vc4_ctm_state *to_vc4_ctm_
+ struct vc4_hvs_state {
+ struct drm_private_state base;
+ unsigned long core_clock_rate;
++ struct clk_request *core_req;
+
+ struct {
+ unsigned in_use: 1;
+@@ -398,7 +399,8 @@ static void vc4_atomic_commit_tail(struc
+ * And remove the previous one based on the HVS
+ * requirements if any.
+ */
+- clk_request_done(hvs->core_req);
++ clk_request_done(old_hvs_state->core_req);
++ old_hvs_state->core_req = NULL;
+ }
+
+ drm_atomic_helper_commit_modeset_disables(dev, state);
+@@ -432,8 +434,8 @@ static void vc4_atomic_commit_tail(struc
+ * Request a clock rate based on the current HVS
+ * requirements.
+ */
+- hvs->core_req = clk_request_start(hvs->core_clk,
+- new_hvs_state->core_clock_rate);
++ new_hvs_state->core_req = clk_request_start(hvs->core_clk,
++ new_hvs_state->core_clock_rate);
+
+ /* And drop the temporary request */
+ clk_request_done(core_req);