dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robert Mader" <robert.mader@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1] drm/atomic: Clear plane pipeline for legacy clients
Date: Thu, 09 Jul 2026 12:26:23 +0000	[thread overview]
Message-ID: <20260709122625.433F61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709115855.53725-1-robert.mader@collabora.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Implicitly clearing `color_pipeline` in `drm_atomic_get_plane_state` without adding the affected colorops causes hardware state desynchronization.
- [Medium] Piecemeal reset of color pipelines for legacy clients leads to visually inconsistent planes on the same CRTC.
--

--- Patch [1]: [PATCH v1] drm/atomic: Clear plane pipeline for legacy clients ---
commit 58ecff67ea2c28b7e6969be3a82eb9da9e435470
Author: Robert Mader <robert.mader@collabora.com>

drm/atomic: Clear plane pipeline for legacy clients

This commit clears the color_pipeline pointer in drm_atomic_get_plane_state()
for legacy clients that do not enable DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.
This ensures non-bypass color pipelines are reset to clean bypass-only
states.

Link: https://lore.kernel.org/all/CAFZQkGzw2MZGivy=oyYgZE3_dmxu-z-NbDgzh9uyqSsj=MG=2w@mail.gmail.com/
Link: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/2133

> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 735ab7badc2ec..581fde90dbd8d 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -656,6 +656,9 @@ drm_atomic_get_plane_state(struct drm_atomic_commit *state,
>  	state->planes[index].new_state = plane_state;
>  	plane_state->state = state;
>  
> +	if (!state->plane_color_pipeline)
> +		plane_state->color_pipeline = NULL;

[Severity: High]
Does clearing the color_pipeline here prevent the old colorops from being
added to the atomic transaction?

If a legacy client takes over the display after a modern compositor configured
a color pipeline, setting plane_state->color_pipeline to NULL means callers
will skip adding the affected colorops.

This appears to orphan the old active colorops from the atomic commit,
meaning driver hardware programming will not see the transition to disable
them, leaving the hardware out of sync with software state.

[Severity: Medium]
Will this piecemeal reset lead to visually inconsistent planes on the same CRTC?

Because this reset is tied to plane state retrieval, a legacy client performing
a partial update (like DRM_IOCTL_MODE_CURSOR) will only add the specific target
plane to the transaction.

Other active planes on the same CRTC would not have drm_atomic_get_plane_state()
called for them, so their complex color pipelines would remain fully active while
the updated plane is forced to bypass.

> +
>  	drm_dbg_atomic(plane->dev, "Added [PLANE:%d:%s] %p state to %p\n",
>  		       plane->base.id, plane->name, plane_state, state);
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260709115855.53725-1-robert.mader@collabora.com?part=1

      reply	other threads:[~2026-07-09 12:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 11:58 [PATCH v1] drm/atomic: Clear plane pipeline for legacy clients Robert Mader
2026-07-09 12:26 ` sashiko-bot [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=20260709122625.433F61F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robert.mader@collabora.com \
    --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