mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 4a8efdb006a53021458e67535ac7023d254338f7 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Tue, 13 Apr 2021 14:10:03 +0100
|
|
Subject: [PATCH 457/634] 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(-)
|
|
|
|
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
|
|
index 79d4d9dd1394..f9dce01c052f 100644
|
|
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
|
@@ -345,6 +345,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
struct vc4_hvs_state *new_hvs_state;
|
|
struct drm_crtc *crtc;
|
|
struct vc4_hvs_state *old_hvs_state;
|
|
+ struct clk_request *core_req;
|
|
int i;
|
|
|
|
old_hvs_state = vc4_hvs_get_old_global_state(state);
|
|
@@ -370,7 +371,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
500000000,
|
|
new_hvs_state->core_clock_rate);
|
|
|
|
- clk_set_min_rate(hvs->core_clk, core_rate);
|
|
+ core_req = clk_request_start(hvs->core_clk, core_rate);
|
|
}
|
|
|
|
for_each_old_crtc_in_state(state, crtc, old_crtc_state, i) {
|
|
@@ -415,7 +416,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
drm_dbg(dev, "Running the core clock at %lu Hz\n",
|
|
new_hvs_state->core_clock_rate);
|
|
|
|
- clk_set_min_rate(hvs->core_clk, new_hvs_state->core_clock_rate);
|
|
+ clk_request_done(core_req);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.33.1
|
|
|