* [PATCH] drm/atomic-helper: Skip redundant disabled plane commits
@ 2026-09-21 14:30 James Lin
2026-09-30 13:45 ` Leo Li
0 siblings, 1 reply; 2+ messages in thread
From: James Lin @ 2026-09-21 14:30 UTC (permalink / raw)
To: dri-devel
Cc: Harry Wentland, Leo Li, Aurabindo Pillai, Roman Li, Wayne Lin,
Tom Chung, Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski,
Alex Hung, James Lin, Chenyu Chen
Return early when the plane has neither a CRTC nor a
framebuffer to avoid redundant disabled plane commits.
Signed-off-by: James Lin <PingLei.Lin@amd.com>
---
drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 51f39edc31ed..30cc9c07f455 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/atomic-helper: Skip redundant disabled plane commits
2026-09-21 14:30 [PATCH] drm/atomic-helper: Skip redundant disabled plane commits James Lin
@ 2026-09-30 13:45 ` Leo Li
0 siblings, 0 replies; 2+ messages in thread
From: Leo Li @ 2026-09-30 13:45 UTC (permalink / raw)
To: James Lin, dri-devel
Cc: Harry Wentland, Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung,
Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski, Alex Hung,
Chenyu Chen
On 2026-09-21 10:30, James Lin wrote:
> Return early when the plane has neither a CRTC nor a
> framebuffer to avoid redundant disabled plane commits.
>
> Signed-off-by: James Lin <PingLei.Lin@amd.com>
Makes sense to me, __drm_atomic_helper_disable_plane clears CRTC and FB so this can avoid redundant calls.
Reviewed-by: Leo Li <sunpeng.li@amd.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 51f39edc31ed..30cc9c07f455 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-30 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 14:30 [PATCH] drm/atomic-helper: Skip redundant disabled plane commits James Lin
2026-09-30 13:45 ` Leo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox