mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
From a1bafabf063f2be3e4bd892a4f73187ba955b32d Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Tue, 13 Apr 2021 14:10:03 +0100
|
|
Subject: [PATCH 458/552] 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 | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
|
|
index 6a1a9e1d72ce..d4a3e4e020ea 100644
|
|
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
|
@@ -341,6 +341,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
struct drm_crtc_state *new_crtc_state;
|
|
struct drm_crtc *crtc;
|
|
struct vc4_hvs_state *old_hvs_state;
|
|
+ struct clk_request *core_req;
|
|
int i;
|
|
|
|
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
|
|
@@ -353,8 +354,8 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
vc4_hvs_mask_underrun(dev, vc4_crtc_state->assigned_channel);
|
|
}
|
|
|
|
- if (vc4->hvs->hvs5)
|
|
- clk_set_min_rate(hvs->core_clk, 500000000);
|
|
+ if (vc4->hvs && vc4->hvs->hvs5)
|
|
+ core_req = clk_request_start(hvs->core_clk, 500000000);
|
|
|
|
old_hvs_state = vc4_hvs_get_old_global_state(state);
|
|
if (!old_hvs_state)
|
|
@@ -398,8 +399,8 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
|
|
|
|
drm_atomic_helper_cleanup_planes(dev, state);
|
|
|
|
- if (vc4->hvs->hvs5)
|
|
- clk_set_min_rate(hvs->core_clk, 0);
|
|
+ if (vc4->hvs && vc4->hvs->hvs5)
|
|
+ clk_request_done(core_req);
|
|
}
|
|
|
|
static int vc4_atomic_commit_setup(struct drm_atomic_state *state)
|
|
--
|
|
2.33.0
|
|
|