Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: dri-devel@lists.freedesktop.org, robh@kernel.org,
	devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200
Date: Mon, 21 Sep 2026 09:25:46 +0000	[thread overview]
Message-ID: <20260921092546.9F6EF1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921-gemini-tve200-fix-v1-2-8be03ac2a8f7@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/tve200: IRQ storm / state machine corruption from level-triggered IRQ
--

commit c7049bfa3bb673960be589c51d1114e71aa6a360
Author: Linus Walleij <linusw@kernel.org>

ARM: dts: gemini: Use a level-high interrupt for TVE200

TVE200's interrupt is configured as rising-edge. On the D-Link DIR-685,
this can stop interrupt delivery after the first vertical interrupt,
causing vblank and page-flip timeouts and delaying framebuffer console
startup. The vertical interrupt can remain pending after acknowledgment. Use
level-high triggering so the pending condition is delivered again without
requiring another edge.

> diff --git a/arch/arm/boot/dts/gemini/gemini.dtsi b/arch/arm/boot/dts/gemini/gemini.dtsi
> index 23e68e17ffbbd..d8f64fea0a79d 100644
> --- a/arch/arm/boot/dts/gemini/gemini.dtsi
> +++ b/arch/arm/boot/dts/gemini/gemini.dtsi
> @@ -445,7 +445,7 @@ dma-controller@67000000 {
>  		display-controller@6a000000 {
>  			compatible = "cortina,gemini-tvc", "faraday,tve200";
>  			reg = <0x6a000000 0x1000>;
> -			interrupts = <13 IRQ_TYPE_EDGE_RISING>;
> +			interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;

[Severity: High]
Does configuring this as a level-high interrupt break the driver's state
machine logic in tve200_irq()?

The driver assumes each interrupt corresponds to an exact hardware event and
blindly toggles the TVE200_CTRL trigger condition between VSYNC and VAI:

drivers/gpu/drm/tve200/tve200_display.c:tve200_irq() {
    ...
		/* We have an actual start of vsync */
		if (!(val & TVE200_VSTSTYPE_BITS)) {
			drm_crtc_handle_vblank(&priv->pipe.crtc);
			/* Toggle trigger to start of active image */
			val |= TVE200_VSTSTYPE_VAI;
		} else {
			/* Toggle trigger back to start of vsync */
			val &= ~TVE200_VSTSTYPE_BITS;
		}
    ...
}

If the hardware delays deasserting the interrupt line, the level-high
configuration causes the interrupt controller to immediately re-invoke the
handler.

The software state machine then incorrectly interprets this spurious
level-triggered re-fire as the next sequential hardware event, repeatedly
reversing the trigger condition and potentially causing an IRQ storm or
dropped vblank events.

>  			resets = <&syscon GEMINI_RESET_TVC>;
>  			clocks = <&syscon GEMINI_CLK_GATE_TVC>,
>  				 <&syscon GEMINI_CLK_TVC>;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921-gemini-tve200-fix-v1-0-8be03ac2a8f7@kernel.org?part=2

  reply	other threads:[~2026-09-21  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  9:15 [PATCH 0/2] Fix Gemini TVE200 interrupt triggering Linus Walleij
2026-09-21  9:15 ` [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt Linus Walleij
2026-09-27 17:42   ` Krzysztof Kozlowski
2026-09-28 13:17   ` Rob Herring (Arm)
2026-09-28 13:19     ` Linus Walleij
2026-09-21  9:15 ` [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200 Linus Walleij
2026-09-21  9:25   ` sashiko-bot [this message]
2026-09-22 12:16     ` Linus Walleij

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=20260921092546.9F6EF1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linusw@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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