From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/6] drm/i915/cursor: Add helper to update cursor plane
Date: Wed, 1 Jul 2026 21:56:16 +0530 [thread overview]
Message-ID: <c5b413d9-2ef7-49f7-9712-0d3401a07850@intel.com> (raw)
In-Reply-To: <20260608062629.820477-3-nemesa.garg@intel.com>
On 6/8/2026 11:56 AM, Nemesa Garg wrote:
> Move cursor fast path plane state update into helper
> function.
>
Not a pure move.
> Assisted-by: Claude:claude-sonnet-4.6
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_cursor.c | 41 +++++++++++++++------
> 1 file changed, 29 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index f8b24865c93a..38234c6292ec 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -849,6 +849,31 @@ intel_cursor_joiner_commits_idle(struct intel_display *display,
> return true;
> }
>
> +static void
> +intel_cursor_fastpath_update_plane_state(struct intel_plane_state *plane_state,
> + struct drm_framebuffer *fb,
> + struct drm_crtc *uapi_crtc,
> + struct intel_crtc *hw_crtc,
> + int crtc_x, int crtc_y,
> + unsigned int crtc_w, unsigned int crtc_h,
> + u32 src_x, u32 src_y,
> + u32 src_w, u32 src_h)
> +{
> + drm_atomic_set_fb_for_plane(&plane_state->uapi, fb);
> +
> + plane_state->uapi.crtc = uapi_crtc;
The original inline block didn't set uapi.crtc.
> + plane_state->uapi.src_x = src_x;
> + plane_state->uapi.src_y = src_y;
> + plane_state->uapi.src_w = src_w;
> + plane_state->uapi.src_h = src_h;
> + plane_state->uapi.crtc_x = crtc_x;
> + plane_state->uapi.crtc_y = crtc_y;
> + plane_state->uapi.crtc_w = crtc_w;
> + plane_state->uapi.crtc_h = crtc_h;
> +
> + intel_plane_copy_uapi_to_hw_state(NULL, plane_state, plane_state, hw_crtc);
> +}
> +
> static int
> intel_legacy_cursor_update(struct drm_plane *_plane,
> struct drm_crtc *_crtc,
> @@ -928,18 +953,10 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
> goto out_free;
> }
>
> - drm_atomic_set_fb_for_plane(&new_plane_state->uapi, fb);
> -
> - new_plane_state->uapi.src_x = src_x;
> - new_plane_state->uapi.src_y = src_y;
> - new_plane_state->uapi.src_w = src_w;
> - new_plane_state->uapi.src_h = src_h;
> - new_plane_state->uapi.crtc_x = crtc_x;
> - new_plane_state->uapi.crtc_y = crtc_y;
> - new_plane_state->uapi.crtc_w = crtc_w;
> - new_plane_state->uapi.crtc_h = crtc_h;
> -
> - intel_plane_copy_uapi_to_hw_state(NULL, new_plane_state, new_plane_state, crtc);
> + intel_cursor_fastpath_update_plane_state(new_plane_state, fb,
> + &crtc->base, crtc,
> + crtc_x, crtc_y, crtc_w, crtc_h,
> + src_x, src_y, src_w, src_h);
I guess the idea was to mirror intel_plane_copy_uapi_to_hw_state(),
where a joiner secondary has uapi.crtc == primary but hw.crtc ==
secondary. But even that seems to be mishandled in the patch that adds
the caller for secondary pipes. More on it later.
I would suggest explain the two-crtc signature in the commit message
otherwise it's looks unmotivated here.
==
Chaitanya
>
> ret = intel_plane_atomic_check_with_state(crtc_state, new_crtc_state,
> old_plane_state, new_plane_state);
next prev parent reply other threads:[~2026-07-01 16:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 6:26 [PATCH 0/6] Enable joiner cursor fast updates Nemesa Garg
2026-06-08 6:26 ` [PATCH 1/6] drm/i915/cursor: Check joiner cursor commit status Nemesa Garg
2026-07-01 16:25 ` Borah, Chaitanya Kumar
2026-06-08 6:26 ` [PATCH 2/6] drm/i915/cursor: Add helper to update cursor plane Nemesa Garg
2026-07-01 16:26 ` Borah, Chaitanya Kumar [this message]
2026-06-08 6:26 ` [PATCH 3/6] drm/i915/cursor: Handle secondary cursor state Nemesa Garg
2026-07-01 16:30 ` Borah, Chaitanya Kumar
2026-06-08 6:26 ` [PATCH 4/6] drm/i915/cursor: Sync joiner " Nemesa Garg
2026-07-01 16:32 ` Borah, Chaitanya Kumar
2026-06-08 6:26 ` [PATCH 5/6] drm/i915/cursor: Program secondary cursor planes Nemesa Garg
2026-07-01 16:32 ` Borah, Chaitanya Kumar
2026-06-08 6:26 ` [PATCH 6/6] drm/i915/cursor: Allow joiner cursor fast path update Nemesa Garg
2026-07-01 16:31 ` Borah, Chaitanya Kumar
2026-06-08 11:43 ` ✗ CI.checkpatch: warning for Enable joiner cursor fast updates (rev3) Patchwork
2026-06-08 11:44 ` ✓ CI.KUnit: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-04-28 14:16 [PATCH 0/6] Enable joiner cursor fast updates Nemesa Garg
2026-04-28 14:16 ` [PATCH 2/6] drm/i915/cursor: Add helper to update cursor plane Nemesa Garg
2026-04-22 7:37 [PATCH 0/6] Enable joiner cursor fast updates Nemesa Garg
2026-04-22 7:37 ` [PATCH 2/6] drm/i915/cursor: Add helper to update cursor plane Nemesa Garg
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=c5b413d9-2ef7-49f7-9712-0d3401a07850@intel.com \
--to=chaitanya.kumar.borah@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