mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From e2f73520b94f49c6ef3ae27e6dc899ec855567ab 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
|
|
@@ -345,6 +345,7 @@ static void vc4_atomic_commit_tail(struc
|
|
struct drm_crtc *crtc;
|
|
struct vc4_hvs_state *old_hvs_state;
|
|
unsigned int channel;
|
|
+ struct clk_request *core_req;
|
|
int i;
|
|
|
|
old_hvs_state = vc4_hvs_get_old_global_state(state);
|
|
@@ -389,7 +390,7 @@ static void vc4_atomic_commit_tail(struc
|
|
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);
|
|
}
|
|
|
|
drm_atomic_helper_commit_modeset_disables(dev, state);
|
|
@@ -417,7 +418,7 @@ static void vc4_atomic_commit_tail(struc
|
|
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);
|
|
}
|
|
}
|
|
|