From: Nemesa Garg <nemesa.garg@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com, Nemesa Garg <nemesa.garg@intel.com>
Subject: [PATCH 2/5] drm/i915/cursor: Add helper to update cursor plane
Date: Thu, 27 Aug 2026 22:12:00 +0530 [thread overview]
Message-ID: <20260827164203.2371794-3-nemesa.garg@intel.com> (raw)
In-Reply-To: <20260827164203.2371794-1-nemesa.garg@intel.com>
Move cursor fast path plane state update into helper
function. The target hw.crtc is passed as a parameter
so a later patch can reuse the helper for joiner
secondary pipes, where hw.crtc points at the secondary
being programmed while uapi.crtc stays on the primary.
v4: Drop uapi.crtc assignment from the helper. [Chaitanya]
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
drivers/gpu/drm/i915/display/intel_cursor.c | 39 ++++++++++++++-------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 47ddb213e547..b57b446b9788 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -845,6 +845,29 @@ 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 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.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,
@@ -920,18 +943,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,
+ crtc_x, crtc_y, crtc_w, crtc_h,
+ src_x, src_y, src_w, src_h);
ret = intel_plane_atomic_check_with_state(crtc_state, new_crtc_state,
old_plane_state, new_plane_state);
--
2.25.1
next prev parent reply other threads:[~2026-08-27 16:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 16:41 [PATCH 0/5] Enable joiner cursor fast updates Nemesa Garg
2026-08-27 16:41 ` [PATCH 1/5] drm/i915/cursor: Check joiner cursor commit status Nemesa Garg
2026-08-27 16:42 ` Nemesa Garg [this message]
2026-08-27 16:42 ` [PATCH v7 3/5] drm/i915/cursor: Handle secondary cursor state Nemesa Garg
2026-08-28 10:26 ` Borah, Chaitanya Kumar
2026-08-28 11:21 ` Garg, Nemesa
2026-08-27 16:42 ` [PATCH 4/5] drm/i915/cursor: Program secondary cursor planes Nemesa Garg
2026-08-27 16:42 ` [PATCH 5/5] drm/i915/cursor: Allow joiner cursor fast path update Nemesa Garg
2026-08-27 18:25 ` ✓ i915.CI.BAT: success for Enable joiner cursor fast updates (rev7) Patchwork
2026-08-27 23:05 ` ✗ i915.CI.Full: failure " Patchwork
2026-08-28 12:23 ` ✓ i915.CI.Full: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-09-01 7:28 [PATCH 0/5] Enable joiner cursor fast updates Nemesa Garg
2026-09-01 7:28 ` [PATCH 2/5] 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=20260827164203.2371794-3-nemesa.garg@intel.com \
--to=nemesa.garg@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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