mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Martijn van Deventer <linux@martijnvandeventer.nl>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: meson: g12a: Fix kernel warnings when no display attached
Date: Fri, 14 Feb 2025 12:15:14 +0100	[thread overview]
Message-ID: <d0ec285d-6a27-4f28-b622-6048a9dcb6e8@linaro.org> (raw)
In-Reply-To: <20250213221702.606-1-linux@martijnvandeventer.nl>

On 13/02/2025 23:17, Martijn van Deventer wrote:
> When booting SM1 or G12A boards without a dislay attached to HDMI,
> the kernel shows the following warning:
> 
> [CRTC:46:meson_crtc] vblank wait timed out
> WARNING: CPU: 2 PID: 265 at drivers/gpu/drm/drm_atomic_helper.c:1682 drm_atomic_helper_wait_for_vblanks.part.0+0x240/0x264
> CPU: 2 UID: 0 PID: 265 Comm: setfont Tainted: G         C
> Tainted: [C]=CRAP
> pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : drm_atomic_helper_wait_for_vblanks.part.0+0x240/0x264
> lr : drm_atomic_helper_wait_for_vblanks.part.0+0x240/0x264
> Call trace:
>   drm_atomic_helper_wait_for_vblanks.part.0+0x240/0x264
>   drm_atomic_helper_commit_tail_rpm+0x84/0xa0
>   commit_tail+0xa4/0x18c
>   drm_atomic_helper_commit+0x164/0x178
>   drm_atomic_commit+0xb4/0xec
>   drm_client_modeset_commit_atomic+0x210/0x270
>   drm_client_modeset_commit_locked+0x5c/0x188
>   drm_fb_helper_pan_display+0xb8/0x1d4
>   fb_pan_display+0x7c/0x120
>   bit_update_start+0x20/0x48
>   fbcon_switch+0x418/0x54c
>   el0t_64_sync+0x194/0x198
> 
> This happens when the kernel disables the unused clocks.
> Sometimes this causes the boot to hang.
> 
> By (re)adding the flag CLK_IGNORE_UNUSED to the VCLK2 clocks, these
> clocks will not be disabled.
> 
> This partially reverts commit b70cb1a21a54 ("clk: meson: g12a:
> make VCLK2 and ENCL clock path configurable by CCF").
> 
> Fixes: b70cb1a21a54 ("clk: meson: g12a: make VCLK2 and ENCL clock path configurable by CCF").
> Signed-off-by: Martijn van Deventer <linux@martijnvandeventer.nl>
> ---
>   drivers/clk/meson/g12a.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index cfffd434e998..1651898658f5 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -3234,7 +3234,7 @@ static struct clk_regmap g12a_vclk2_div = {
>   			&g12a_vclk2_input.hw
>   		},
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_GATE,
> +		.flags = CLK_SET_RATE_GATE | CLK_IGNORE_UNUSED,
>   	},
>   };
>   
> @@ -3270,7 +3270,7 @@ static struct clk_regmap g12a_vclk2 = {
>   		.ops = &meson_vclk_gate_ops,
>   		.parent_hws = (const struct clk_hw *[]) { &g12a_vclk2_div.hw },
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_PARENT,
> +		.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>   	},
>   };
>   
> @@ -3354,7 +3354,7 @@ static struct clk_regmap g12a_vclk2_div1 = {
>   		.ops = &clk_regmap_gate_ops,
>   		.parent_hws = (const struct clk_hw *[]) { &g12a_vclk2.hw },
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_PARENT,
> +		.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>   	},
>   };
>   
> @@ -3368,7 +3368,7 @@ static struct clk_regmap g12a_vclk2_div2_en = {
>   		.ops = &clk_regmap_gate_ops,
>   		.parent_hws = (const struct clk_hw *[]) { &g12a_vclk2.hw },
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_PARENT,
> +		.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>   	},
>   };
>   
> @@ -3382,7 +3382,7 @@ static struct clk_regmap g12a_vclk2_div4_en = {
>   		.ops = &clk_regmap_gate_ops,
>   		.parent_hws = (const struct clk_hw *[]) { &g12a_vclk2.hw },
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_PARENT,
> +		.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>   	},
>   };
>   
> @@ -3396,7 +3396,7 @@ static struct clk_regmap g12a_vclk2_div6_en = {
>   		.ops = &clk_regmap_gate_ops,
>   		.parent_hws = (const struct clk_hw *[]) { &g12a_vclk2.hw },
>   		.num_parents = 1,
> -		.flags = CLK_SET_RATE_PARENT,
> +		.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>   	},
>   };
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      parent reply	other threads:[~2025-02-14 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 22:17 Martijn van Deventer
2025-02-14  9:08 ` Jerome Brunet
2025-02-26 20:39   ` linux
2025-02-27  9:38     ` Jerome Brunet
2025-03-06 16:48       ` linux
2025-03-06 17:26         ` Jerome Brunet
2025-03-06 20:13           ` linux
2025-02-14 11:15 ` Neil Armstrong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0ec285d-6a27-4f28-b622-6048a9dcb6e8@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@martijnvandeventer.nl \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®