dcb1747d35ae9141b3e38983a943bb1679926093
[openwrt/staging/blogic.git] /
1 From 89941a8e5343c11364f0fcbeb9dec76afa8f4f2e Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 16 Mar 2022 09:51:32 +0100
4 Subject: [PATCH] Revert "drm/vc4: kms: Move clock request to our HVS
5 state"
6
7 This reverts commit c65633a429b15f9d182a5bc7d6387fecbd5b7bb0.
8 ---
9 drivers/gpu/drm/vc4/vc4_drv.h | 1 +
10 drivers/gpu/drm/vc4/vc4_kms.c | 8 +++-----
11 2 files changed, 4 insertions(+), 5 deletions(-)
12
13 --- a/drivers/gpu/drm/vc4/vc4_drv.h
14 +++ b/drivers/gpu/drm/vc4/vc4_drv.h
15 @@ -326,6 +326,7 @@ 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 @@ -40,7 +40,6 @@ static struct vc4_ctm_state *to_vc4_ctm_
26 struct vc4_hvs_state {
27 struct drm_private_state base;
28 unsigned long core_clock_rate;
29 - struct clk_request *core_req;
30
31 struct {
32 unsigned in_use: 1;
33 @@ -407,8 +406,7 @@ static void vc4_atomic_commit_tail(struc
34 * And remove the previous one based on the HVS
35 * requirements if any.
36 */
37 - clk_request_done(old_hvs_state->core_req);
38 - old_hvs_state->core_req = NULL;
39 + clk_request_done(hvs->core_req);
40 }
41
42 drm_atomic_helper_commit_modeset_disables(dev, state);
43 @@ -442,8 +440,8 @@ static void vc4_atomic_commit_tail(struc
44 * Request a clock rate based on the current HVS
45 * requirements.
46 */
47 - new_hvs_state->core_req = clk_request_start(hvs->core_clk,
48 - new_hvs_state->core_clock_rate);
49 + hvs->core_req = clk_request_start(hvs->core_clk,
50 + new_hvs_state->core_clock_rate);
51
52 /* And drop the temporary request */
53 clk_request_done(core_req);