From: Hoegeun Kwon Date: Tue, 15 Sep 2020 00:32:49 +0000 (+0900) Subject: drm/vc4: hvs: Boost the core clock during modeset X-Git-Tag: accepted/tizen/unified/20200922.053406~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b3581bbf037ce5d241a319249e5469f4cadfc6c;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: hvs: Boost the core clock during modeset In order to prevent timeouts and stalls in the pipeline, the core clock needs to be maxed at 500MHz during a modeset on the BCM2711. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/37ed9e0124c5cce005ddc8dafe821d8b0da036ff.1599120059.git-series.maxime@cerno.tech [hoegeun.kwon: A screen cracking problem occurs in FHD(1920x1080). The cause is that the clock should be kept at 500MHz, but it occurred when the clock fell to 200MHz, so apply a patch.] Signed-off-by: Hoegeun Kwon Change-Id: Ie0d4880966c1644bfdf56bb49dbb82559978538c --- diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 7f857af..ae514d4 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -239,8 +239,8 @@ vc4_atomic_complete_commit(struct drm_atomic_state *state) vc4_hvs_mask_underrun(dev, vc4_crtc_state->assigned_channel); } - if (!vc4->firmware_kms) - clk_set_rate(hvs->core_clk, 500000000); + if (vc4->hvs->hvs5) + clk_set_min_rate(hvs->core_clk, 500000000); drm_atomic_helper_wait_for_fences(dev, state, false); @@ -267,9 +267,6 @@ vc4_atomic_complete_commit(struct drm_atomic_state *state) drm_atomic_helper_commit_cleanup_done(state); - if (!vc4->firmware_kms) - clk_set_rate(hvs->core_clk, 200000000); - drm_atomic_state_put(state); up(&vc4->async_modeset);