Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix Gemini TVE200 interrupt triggering
@ 2026-09-21  9:15 Linus Walleij
  2026-09-21  9:15 ` [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt Linus Walleij
  2026-09-21  9:15 ` [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200 Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2026-09-21  9:15 UTC (permalink / raw)
  To: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hans Ulli Kroll
  Cc: dri-devel, devicetree, Linus Walleij

Rising-edge IRQ triggering can stall TVE200 interrupt delivery on the
D-Link DIR-685, causing vblank and page-flip timeouts and delayed fbcon
startup.

Set the interrupt to level-high in gemini.dtsi and correct the binding
example. The updated attached device tree supplies the correct trigger
type, leaving the DRM driver unchanged.

Level-high operation was verified on the DIR-685 with cold and warm boots.

Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Linus Walleij (2):
      dt-bindings: display: faraday,tve200: Use a level-high interrupt
      ARM: dts: gemini: Use a level-high interrupt for TVE200

 Documentation/devicetree/bindings/display/faraday,tve200.yaml | 2 +-
 arch/arm/boot/dts/gemini/gemini.dtsi                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260921-gemini-tve200-fix-7df25be273fb

Best regards,
--  
Linus Walleij <linusw@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt
  2026-09-21  9:15 [PATCH 0/2] Fix Gemini TVE200 interrupt triggering Linus Walleij
@ 2026-09-21  9:15 ` Linus Walleij
  2026-09-27 17:42   ` Krzysztof Kozlowski
  2026-09-28 13:17   ` Rob Herring (Arm)
  2026-09-21  9:15 ` [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200 Linus Walleij
  1 sibling, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2026-09-21  9:15 UTC (permalink / raw)
  To: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hans Ulli Kroll
  Cc: dri-devel, devicetree, Linus Walleij

The TVE200 vertical interrupt can remain pending after acknowledgment.
Using rising-edge triggering can leave it unserviced when no new edge
is generated, causing vblank and page-flip timeouts on the D-Link DIR-685.

Use level-high triggering in the binding example so a pending interrupt
is delivered again without requiring a new edge.

Fixes: 8b17e80d9e46 ("drm/tve200: Add DT bindings")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 Documentation/devicetree/bindings/display/faraday,tve200.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/faraday,tve200.yaml b/Documentation/devicetree/bindings/display/faraday,tve200.yaml
index b09628b69177..43dbe2778d6b 100644
--- a/Documentation/devicetree/bindings/display/faraday,tve200.yaml
+++ b/Documentation/devicetree/bindings/display/faraday,tve200.yaml
@@ -54,7 +54,7 @@ examples:
     display-controller@6a000000 {
       compatible = "faraday,tve200";
       reg = <0x6a000000 0x1000>;
-      interrupts = <13 IRQ_TYPE_EDGE_RISING>;
+      interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
       resets = <&syscon GEMINI_RESET_TVC>;
       clocks = <&syscon GEMINI_CLK_GATE_TVC>,
                <&syscon GEMINI_CLK_TVC>;

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200
  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-21  9:15 ` Linus Walleij
  2026-09-21  9:25   ` sashiko-bot
  1 sibling, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2026-09-21  9:15 UTC (permalink / raw)
  To: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hans Ulli Kroll
  Cc: dri-devel, devicetree, Linus Walleij

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.

Fixes: d2b85241a9f5 ("ARM: dts: Add TVE200 to the Gemini SoC DTSI")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
 arch/arm/boot/dts/gemini/gemini.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/gemini/gemini.dtsi b/arch/arm/boot/dts/gemini/gemini.dtsi
index 23e68e17ffbb..d8f64fea0a79 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>;
 			resets = <&syscon GEMINI_RESET_TVC>;
 			clocks = <&syscon GEMINI_CLK_GATE_TVC>,
 				 <&syscon GEMINI_CLK_TVC>;

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200
  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
  2026-09-22 12:16     ` Linus Walleij
  0 siblings, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-09-21  9:25 UTC (permalink / raw)
  To: Linus Walleij; +Cc: dri-devel, robh, devicetree, conor+dt

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] ARM: dts: gemini: Use a level-high interrupt for TVE200
  2026-09-21  9:25   ` sashiko-bot
@ 2026-09-22 12:16     ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2026-09-22 12:16 UTC (permalink / raw)
  To: sashiko-reviews; +Cc: dri-devel, robh, devicetree, conor+dt

On Mon, Sep 21, 2026 at 11:25 AM <sashiko-bot@kernel.org> wrote:

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

Nope.

Tested on hardware.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt
  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)
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-27 17:42 UTC (permalink / raw)
  To: Linus Walleij
  Cc: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hans Ulli Kroll, dri-devel, devicetree

On Mon, Sep 21, 2026 at 11:15:54AM +0200, Linus Walleij wrote:
> The TVE200 vertical interrupt can remain pending after acknowledgment.
> Using rising-edge triggering can leave it unserviced when no new edge
> is generated, causing vblank and page-flip timeouts on the D-Link DIR-685.
> 
> Use level-high triggering in the binding example so a pending interrupt
> is delivered again without requiring a new edge.
> 
> Fixes: 8b17e80d9e46 ("drm/tve200: Add DT bindings")

Example has no impact beside validation, thus no bug to fix here,
really.

> Assisted-by: LLM
> Signed-off-by: Linus Walleij <linusw@kernel.org>

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring (Arm) @ 2026-09-28 13:17 UTC (permalink / raw)
  To: Linus Walleij
  Cc: David Airlie, Conor Dooley, Krzysztof Kozlowski, Simona Vetter,
	devicetree, Maxime Ripard, Maarten Lankhorst, dri-devel,
	Hans Ulli Kroll, Thomas Zimmermann


On Mon, 21 Sep 2026 11:15:54 +0200, Linus Walleij wrote:
> The TVE200 vertical interrupt can remain pending after acknowledgment.
> Using rising-edge triggering can leave it unserviced when no new edge
> is generated, causing vblank and page-flip timeouts on the D-Link DIR-685.
> 
> Use level-high triggering in the binding example so a pending interrupt
> is delivered again without requiring a new edge.
> 
> Fixes: 8b17e80d9e46 ("drm/tve200: Add DT bindings")
> Assisted-by: LLM
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
>  Documentation/devicetree/bindings/display/faraday,tve200.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: faraday,tve200: Use a level-high interrupt
  2026-09-28 13:17   ` Rob Herring (Arm)
@ 2026-09-28 13:19     ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2026-09-28 13:19 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: David Airlie, Conor Dooley, Krzysztof Kozlowski, Simona Vetter,
	devicetree, Maxime Ripard, Maarten Lankhorst, dri-devel,
	Hans Ulli Kroll, Thomas Zimmermann

On Mon, Sep 28, 2026 at 3:17 PM Rob Herring (Arm) <robh@kernel.org> wrote:

> Applied, thanks!

I applied it to the drm tree following Kryzstof's ACK, I should have
said. Sorry!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-28 13:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-09-22 12:16     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox