bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-0987-drm-vc4-kms-Avoid-setting-core-and-disp-clocks-for-h.patch
1 From 352d96c9e50012f2b5e5dde9933af8d570e7dc81 Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Mon, 17 Jul 2023 17:45:32 +0100
4 Subject: [PATCH] drm/vc4: kms: Avoid setting core and disp clocks for hdmi
5 modes
6
7 On 2712, the firmware always runs these clock at a speed sufficient
8 for dual 4kp60.
9
10 The requests here prevent the gpu from going into its lowest voltage
11 mode, so just skip the clock requests.
12
13 With this applied the idle voltage on my pi 5 reduces from 0.7424V
14 to 0.72V.
15
16 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
17 ---
18 drivers/gpu/drm/vc4/vc4_kms.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- a/drivers/gpu/drm/vc4/vc4_kms.c
22 +++ b/drivers/gpu/drm/vc4/vc4_kms.c
23 @@ -435,7 +435,7 @@ static void vc4_atomic_commit_tail(struc
24 old_hvs_state->fifo_state[channel].pending_commit = NULL;
25 }
26
27 - if (vc4->gen >= VC4_GEN_5 && !vc4->firmware_kms) {
28 + if (vc4->gen == VC4_GEN_5 && !vc4->firmware_kms) {
29 unsigned long state_rate = max(old_hvs_state->core_clock_rate,
30 new_hvs_state->core_clock_rate);
31 unsigned long core_rate = clamp_t(unsigned long, state_rate,
32 @@ -489,7 +489,7 @@ static void vc4_atomic_commit_tail(struc
33
34 drm_atomic_helper_cleanup_planes(dev, state);
35
36 - if (vc4->gen >= VC4_GEN_5 && !vc4->firmware_kms) {
37 + if (vc4->gen == VC4_GEN_5 && !vc4->firmware_kms) {
38 unsigned long core_rate = min_t(unsigned long,
39 hvs->max_core_rate,
40 new_hvs_state->core_clock_rate);