WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fcc8562

Browse files
committed
drm/vc4: Remove request for min clocks when hdmi output is disabled
Currently, booting with no hdmi connected has: pi@pi4:~ $ vcgencmd measure_clock hdmi pixel frequency(9)=120010256 frequency(29)=74988280 After connecting hdmi we get: pi@pi4:~ $ vcgencmd measure_clock hdmi pixel frequency(9)=300005856 frequency(29)=149989744 and that persists after disconnecting hdmi I can measure this on a power supply as [email protected] (52mW). We should always remove clk_set_min_rate requests when we no longer need them. Signed-off-by: Dom Cobley <[email protected]>
1 parent 7989588 commit fcc8562

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,8 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder,
940940
if (vc4_hdmi->variant->phy_disable)
941941
vc4_hdmi->variant->phy_disable(vc4_hdmi);
942942

943+
/* we no longer require a minimum clock rate */
944+
clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, 0);
943945
clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
944946
clk_disable_unprepare(vc4_hdmi->pixel_clock);
945947

@@ -3200,6 +3202,8 @@ static int vc4_hdmi_runtime_suspend(struct device *dev)
32003202
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
32013203

32023204
clk_disable_unprepare(vc4_hdmi->audio_clock);
3205+
/* we no longer require a minimum clock rate */
3206+
clk_set_min_rate(vc4_hdmi->hsm_clock, 0);
32033207
clk_disable_unprepare(vc4_hdmi->hsm_clock);
32043208

32053209
return 0;

drivers/gpu/drm/vc4/vc4_hvs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,10 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master,
23612361
drm_mm_remove_node(node);
23622362
drm_mm_takedown(&vc4->hvs->lbm_mm);
23632363

2364+
/* we no longer require a minimum clock rate */
2365+
clk_set_min_rate(hvs->disp_clk, 0);
23642366
clk_disable_unprepare(hvs->disp_clk);
2367+
clk_set_min_rate(hvs->core_clk, 0);
23652368
clk_disable_unprepare(hvs->core_clk);
23662369

23672370
vc4->hvs = NULL;

drivers/gpu/drm/vc4/vc4_v3d.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ static int vc4_v3d_runtime_suspend(struct device *dev)
376376

377377
vc4_irq_disable(&vc4->base);
378378

379+
/* we no longer require a minimum clock rate */
380+
clk_set_min_rate(v3d->clk, 0);
379381
clk_disable_unprepare(v3d->clk);
380382

381383
return 0;

0 commit comments

Comments
 (0)