summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-06-13 17:47:29 +0300
committerMaxime Ripard <maxime@cerno.tech>2022-06-28 15:54:50 +0300
commit7d0648c8773cd16fe16eaa3b4aee04093a6bd085 (patch)
treefb133dbe5b92190185a78026008f7139e5599cc6 /drivers/gpu/drm
parentda8e393e23efb60eba8959856c7df88f9859f6eb (diff)
downloadlinux-7d0648c8773cd16fe16eaa3b4aee04093a6bd085.tar.xz
drm/vc4: kms: Warn if clk_set_min_rate fails
We currently ignore the clk_set_min_rate return code assuming it would succeed. However, it can fail if we ask for a rate higher than the current maximum for example. Since we can't fail in atomic_commit, at least warn on failure. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20220613144800.326124-3-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index a1819df6c190..6776265c51e7 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -406,7 +406,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
* Do a temporary request on the core clock during the
* modeset.
*/
- clk_set_min_rate(hvs->core_clk, core_rate);
+ WARN_ON(clk_set_min_rate(hvs->core_clk, core_rate));
}
drm_atomic_helper_commit_modeset_disables(dev, state);
@@ -439,7 +439,7 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
* Request a clock rate based on the current HVS
* requirements.
*/
- clk_set_min_rate(hvs->core_clk, new_hvs_state->core_clock_rate);
+ WARN_ON(clk_set_min_rate(hvs->core_clk, new_hvs_state->core_clock_rate));
drm_dbg(dev, "Core clock actual rate: %lu Hz\n",
clk_get_rate(hvs->core_clk));