1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From ccc2fa16de3fef192885831595a168a36bfdd842 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 13 Apr 2021 14:10:03 +0100
Subject: [PATCH] drm/vc4: hdmi: Convert to the new clock request API
The new clock request API allows us to increase the rate of the
core clock as required during mode set while decreasing it when
we're done, resulting in a better power-efficiency.
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
---
drivers/gpu/drm/vc4/vc4_kms.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -313,6 +313,7 @@ vc4_atomic_complete_commit(struct drm_at
struct vc4_hvs *hvs = vc4->hvs;
struct drm_crtc_state *new_crtc_state;
struct drm_crtc *crtc;
+ struct clk_request *core_req;
int i;
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
@@ -326,7 +327,7 @@ vc4_atomic_complete_commit(struct drm_at
}
if (vc4->hvs && vc4->hvs->hvs5)
- clk_set_min_rate(hvs->core_clk, 500000000);
+ core_req = clk_request_start(hvs->core_clk, 500000000);
drm_atomic_helper_wait_for_fences(dev, state, false);
@@ -358,7 +359,7 @@ vc4_atomic_complete_commit(struct drm_at
drm_atomic_helper_commit_cleanup_done(state);
if (vc4->hvs && vc4->hvs->hvs5)
- clk_set_min_rate(hvs->core_clk, 0);
+ clk_request_done(core_req);
drm_atomic_state_put(state);
|