From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/i915/cursor: Check joiner cursor commit status
Date: Wed, 22 Apr 2026 12:46:02 +0300 [thread overview]
Message-ID: <aeiY2q8Qeq1wGi9c@intel.com> (raw)
In-Reply-To: <20260422073722.1861494-2-nemesa.garg@intel.com>
On Wed, Apr 22, 2026 at 01:07:17PM +0530, Nemesa Garg wrote:
> In joiner mode, secondary cursor commits may still be running
> even when the primary cursor commit is done.
> Check secondary cursor commit status before taking the fast path.
> If any secondary commit is still pending, fallback to slow path.
>
> Assisted-by: Claude:claude-sonnet-4.6
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_cursor.c | 29 +++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index 18d1014de361..609915c798ba 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -13,6 +13,7 @@
> #include <drm/drm_vblank.h>
>
> #include "intel_atomic.h"
> +#include "intel_crtc.h"
> #include "intel_cursor.h"
> #include "intel_cursor_regs.h"
> #include "intel_de.h"
> @@ -797,6 +798,30 @@ void intel_cursor_unpin_work(struct kthread_work *base)
> intel_plane_destroy_state(&plane->base, &plane_state->uapi);
> }
>
> +static bool
> +intel_cursor_joiner_commits_idle(struct intel_display *display,
> + const struct intel_crtc_state *crtc_state)
> +{
> + struct intel_crtc *secondary_crtc;
> + u8 secondary_pipes = intel_crtc_joiner_secondary_pipes(crtc_state);
> +
> + if (!secondary_pipes)
> + return true;
> +
> + for_each_intel_crtc_in_pipe_mask(display->drm, secondary_crtc, secondary_pipes) {
You want to just iterate over intel_crtc_joined_pipe_mask() everywhere.
That way the primary and secondary pipes all just get handled in exactly
the same way.
AFAICS you've completely skipped over proper locking in this series.
> + struct intel_plane *secondary_plane =
> + intel_crtc_get_plane(secondary_crtc, PLANE_CURSOR);
> + struct intel_plane_state *secondary_plane_state =
> + to_intel_plane_state(secondary_plane->base.state);
> +
> + if (secondary_plane_state->uapi.commit &&
> + !try_wait_for_completion(&secondary_plane_state->uapi.commit->hw_done))
> + return false;
> + }
> +
> + return true;
> +}
> +
> static int
> intel_legacy_cursor_update(struct drm_plane *_plane,
> struct drm_crtc *_crtc,
> @@ -843,6 +868,10 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
> !try_wait_for_completion(&old_plane_state->uapi.commit->hw_done))
> goto slow;
>
> + /* For joiner case also do the same thing as above */
> + if (!intel_cursor_joiner_commits_idle(display, crtc_state))
> + goto slow;
> +
> /*
> * If any parameters change that may affect watermarks,
> * take the slowpath. Only changing fb or position should be
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-04-22 9:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 7:37 [PATCH 0/6] Enable joiner cursor fast updates Nemesa Garg
2026-04-22 7:37 ` [PATCH 1/6] drm/i915/cursor: Check joiner cursor commit status Nemesa Garg
2026-04-22 9:46 ` Ville Syrjälä [this message]
2026-04-22 7:37 ` [PATCH 2/6] drm/i915/cursor: Add helper to update cursor plane Nemesa Garg
2026-04-22 7:37 ` [PATCH 3/6] drm/i915/cursor: Handle secondary cursor state Nemesa Garg
2026-04-22 7:37 ` [PATCH 4/6] drm/i915/cursor: Sync joiner " Nemesa Garg
2026-04-22 7:37 ` [PATCH 5/6] drm/i915/cursor: Program secondary cursor planes Nemesa Garg
2026-04-22 7:37 ` [PATCH 6/6] drm/i915/cursor: Allow joiner cursor fast path update Nemesa Garg
2026-04-22 8:27 ` ✗ CI.checkpatch: warning for Enable joiner cursor fast updates Patchwork
2026-04-22 8:28 ` ✓ CI.KUnit: success " Patchwork
2026-04-22 9:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-22 12:38 ` ✓ Xe.CI.FULL: " Patchwork
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=aeiY2q8Qeq1wGi9c@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=nemesa.garg@intel.com \
/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