Skip to contentSkip to conversation

drm/atomic-helper: Skip redundant disabled plane commits

PATCH In review James Lin 2 participants 3 messages Sep 23 – Nov 2

Subsystems (2)
lore
Share & tools
lore

James Lin

author
#0 lore raw

PATCH 1/1 drm/atomic-helper: Skip redundant disabled plane commits

Return early when the plane has neither a CRTC nor a framebuffer to avoid redundant disabled plane commits.

---
 drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_atomic_helper.c +5 -0
index 51f39edc31ed..30cc9c07f455 100644
@@ -3470,6 +3470,11 @@ int drm_atomic_helper_disable_plane(struct drm_plane *plane,
 		goto fail;
 	}
 
+	if (!plane_state->crtc && !plane_state->fb) {
+		ret = 0;
+		goto fail;
+	}
+
 	if (plane_state->crtc && plane_state->crtc->cursor == plane)
 		plane_state->state->legacy_cursor_update = true;
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · James Lin

Return early when the plane has neither a CRTC nor a framebuffer to avoid redundant disabled plane commits.

Makes sense to me, __drm_atomic_helper_disable_plane clears CRTC and FB so this can avoid redundant calls.

Quoted 20 lines
---
 drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_atomic_helper.c +5 -0
index 51f39edc31ed..30cc9c07f455 100644
@@ -3470,6 +3470,11 @@ int drm_atomic_helper_disable_plane(struct drm_plane *plane,
 		goto fail;
 	}
 
+	if (!plane_state->crtc && !plane_state->fb) {
+		ret = 0;
+		goto fail;
+	}
+
 	if (plane_state->crtc && plane_state->crtc->cursor == plane)
 		plane_state->state->legacy_cursor_update = true;
 
author Reviewed-by Leo Li
#2 lore raw

AMD General

Hi Maarten, Maxime, and Thomas,

Could someone please help pick up this patch for drm-misc-next?

https://patchwork.freedesktop.org/patch/755549/

Leo provided a Reviewed-by on September 30, but I haven't seen an indication that it has been applied. Could you please confirm whether it has already been picked up?

If not, please let me know if anything else is needed before it can be applied.

Thanks,
Ping-lei.Lin

-----Original Message-----
From: Leo Li <[email protected]>
Sent: Wednesday, September 30, 2026 9:45 PM
To: Lin, Ping Lei <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Chen, Chen-Yu <[email protected]>
Subject: Re: [PATCH] drm/atomic-helper: Skip redundant disabled plane commits

Quoted 4 lines · James Lin

Return early when the plane has neither a CRTC nor a framebuffer to avoid redundant disabled plane commits.

Makes sense to me, __drm_atomic_helper_disable_plane clears CRTC and FB so this can avoid redundant calls.

Quoted 21 lines
---
 drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_atomic_helper.c +5 -0
index 51f39edc31ed..30cc9c07f455 100644
@@ -3470,6 +3470,11 @@ int drm_atomic_helper_disable_plane(struct drm_plane *plane,
              goto fail;
      }
 
+     if (!plane_state->crtc && !plane_state->fb) {
+             ret = 0;
+             goto fail;
+     }
+
      if (plane_state->crtc && plane_state->crtc->cursor == plane)
              plane_state->state->legacy_cursor_update = true;