From: Matt Roper <matthew.d.roper@intel.com>
To: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/xe: Refactor emit_clear_link_copy
Date: Thu, 7 May 2026 10:18:46 -0700 [thread overview]
Message-ID: <20260507171846.GN2131374@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20260507064229.397673-7-balasubramani.vivekanandan@intel.com>
On Thu, May 07, 2026 at 12:12:32PM +0530, Balasubramani Vivekanandan wrote:
> Implement a function to return the length of the MEM_SET instruction.
> This is to prepare for future platforms where the length of MEM_SET
> instruction is expected to change.
Same suggestion as on the previous patch; it's probably best if we just
remove the #define if the value is going to vary in the future since
that will help ensure people use the platform-aware function everywhere
in the future.
Matt
>
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> ---
> drivers/gpu/drm/xe/xe_migrate.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
> index e4afe011f246..dfcbab38c222 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -1386,12 +1386,17 @@ struct dma_fence *xe_migrate_vram_copy_chunk(struct xe_bo *vram_bo, u64 vram_off
> return fence;
> }
>
> +static u32 blt_mem_set_cmd_len(struct xe_device *xe)
> +{
> + return PVC_MEM_SET_CMD_LEN_DW;
> +}
> +
> static void emit_clear_link_copy(struct xe_gt *gt, struct xe_bb *bb, u64 src_ofs,
> u32 size, u32 pitch)
> {
> struct xe_device *xe = gt_to_xe(gt);
> u32 *cs = bb->cs + bb->len;
> - u32 len = PVC_MEM_SET_CMD_LEN_DW;
> + u32 len = blt_mem_set_cmd_len(xe);
>
> *cs++ = PVC_MEM_SET_CMD | PVC_MEM_SET_MATRIX | (len - 2);
> *cs++ = pitch - 1;
> @@ -1475,7 +1480,7 @@ static u32 emit_clear_cmd_len(struct xe_gt *gt)
> struct xe_device *xe = gt_to_xe(gt);
>
> if (has_service_copy_support(gt))
> - return PVC_MEM_SET_CMD_LEN_DW;
> + return blt_mem_set_cmd_len(xe);
> else
> return blt_fast_color_cmd_len(xe);
> }
> --
> 2.43.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
next prev parent reply other threads:[~2026-05-07 17:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 6:42 [PATCH 0/3] Refactor functions implementing the blt batch buffer Balasubramani Vivekanandan
2026-05-07 6:42 ` [PATCH 1/3] drm/xe: Refactor emit_clear_main_copy Balasubramani Vivekanandan
2026-05-07 17:16 ` Matt Roper
2026-05-07 17:45 ` Matt Roper
2026-05-07 6:42 ` [PATCH 2/3] drm/xe: Refactor emit_clear_link_copy Balasubramani Vivekanandan
2026-05-07 17:18 ` Matt Roper [this message]
2026-05-07 6:42 ` [PATCH 3/3] drm/xe: Refactor emit_xy_fast_copy and emit_mem_copy functions Balasubramani Vivekanandan
2026-05-07 6:44 ` ✓ CI.KUnit: success for Refactor functions implementing the blt batch buffer Patchwork
2026-05-07 7:45 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-07 17:35 ` ✗ Xe.CI.FULL: failure " 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=20260507171846.GN2131374@mdroper-desk1.amr.corp.intel.com \
--to=matthew.d.roper@intel.com \
--cc=balasubramani.vivekanandan@intel.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).