5fc1b93903a96eca56a19a3725e3eb6437cdfb35
[openwrt/staging/blogic.git] /
1 From fc4570783b4552459a97dd67e20043eeb87ad09a Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 16 Mar 2022 09:51:44 +0100
4 Subject: [PATCH] Revert "drm/vc4: Increase the core clock based on HVS
5 load"
6
7 This reverts commit 02c8543cc6940f8201e9beb601bd56421d911e83.
8 ---
9 drivers/gpu/drm/vc4/vc4_drv.h | 1 -
10 drivers/gpu/drm/vc4/vc4_kms.c | 13 +------------
11 2 files changed, 1 insertion(+), 13 deletions(-)
12
13 --- a/drivers/gpu/drm/vc4/vc4_drv.h
14 +++ b/drivers/gpu/drm/vc4/vc4_drv.h
15 @@ -326,7 +326,6 @@ struct vc4_hvs {
16 u32 __iomem *dlist;
17
18 struct clk *core_clk;
19 - struct clk_request *core_req;
20
21 /* Memory manager for CRTCs to allocate space in the display
22 * list. Units are dwords.
23 --- a/drivers/gpu/drm/vc4/vc4_kms.c
24 +++ b/drivers/gpu/drm/vc4/vc4_kms.c
25 @@ -402,11 +402,6 @@ static void vc4_atomic_commit_tail(struc
26 500000000, state_rate);
27
28 core_req = clk_request_start(hvs->core_clk, core_rate);
29 - /*
30 - * And remove the previous one based on the HVS
31 - * requirements if any.
32 - */
33 - clk_request_done(hvs->core_req);
34 }
35
36 drm_atomic_helper_commit_modeset_disables(dev, state);
37 @@ -436,14 +431,8 @@ static void vc4_atomic_commit_tail(struc
38 drm_dbg(dev, "Running the core clock at %lu Hz\n",
39 new_hvs_state->core_clock_rate);
40
41 - /*
42 - * Request a clock rate based on the current HVS
43 - * requirements.
44 - */
45 - hvs->core_req = clk_request_start(hvs->core_clk,
46 - new_hvs_state->core_clock_rate);
47 + clk_set_min_rate(hvs->core_clk, new_hvs_state->core_clock_rate);
48
49 - /* And drop the temporary request */
50 clk_request_done(core_req);
51
52 drm_dbg(dev, "Core clock actual rate: %lu Hz\n",