From: Jan Maslak <jan.maslak@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>,
<thomas.hellstrom@linux.intel.com>, <rodrigo.vivi@intel.com>,
"Christoph Manszewski" <christoph.manszewski@intel.com>
Subject: Re: [PATCH v2 1/4] drm/xe/xe_migrate: Align MEM_COPY pitch with destination address
Date: Mon, 31 Aug 2026 21:10:15 +0200 [thread overview]
Message-ID: <apXRlzqZUhTys7Av@ART-DEV-395> (raw)
In-Reply-To: <5ac2b122-bb4c-4c32-b7e3-c9f9c42a42b0@intel.com>
On Mon, Aug 17, 2026 at 05:39:29PM +0100, Matthew Auld wrote:
> On 22/06/2026 11:34, Jan Maslak wrote:
> > From: Christoph Manszewski <christoph.manszewski@intel.com>
> >
> > MEM_COPY_CMD can corrupt memory when MATRIX_COPY mode uses a pitch that
> > is not aligned to the destination address.
> >
> > Fix this by incorporating the destination address into the pitch
> > selection so the chosen pitch is aligned to both the copy length and the
> > destination address.
>
> Should we play it safe and apply this to the src addr also, even if it
> appears to work without? The spec doesn't explicitly state that the dst
> needed this special treatment, but if it does then I would think src would
> be the same?
I characterized MEM_COPY across many configurations, including cases where
only the source address was misaligned. Source-address alignment did not
appear to affect the behavior: the corruption required a sufficiently tall
matrix copy and a destination address not aligned to the pitch.
Unfortunately, the specification does not document this restriction.
Since including the source address could unnecessarily reduce the selected
pitch, I'd prefer to keep the workaround limited to the condition we
observed, unless you see another reason to handle both.
next prev parent reply other threads:[~2026-08-31 19:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 10:34 [PATCH v2 0/4] drm/xe/xe_migrate: Fix memory corruption with unaligned dst in MEM_COPY Jan Maslak
2026-06-22 10:34 ` [PATCH v2 1/4] drm/xe/xe_migrate: Align MEM_COPY pitch with destination address Jan Maslak
2026-08-17 16:39 ` Matthew Auld
2026-08-31 19:10 ` Jan Maslak [this message]
2026-09-07 13:59 ` Matthew Auld
2026-06-22 10:34 ` [PATCH v2 2/4] drm/xe/xe_migrate: Fix page tracking in access_memory Jan Maslak
2026-09-07 16:19 ` Matthew Auld
2026-06-22 10:34 ` [PATCH v2 3/4] drm/xe/xe_migrate: Optimize unaligned access_memory copies Jan Maslak
2026-09-08 10:39 ` Matthew Auld
2026-06-22 10:34 ` [PATCH v2 4/4] drm/xe/tests: Add xe_migrate_access_memory subtest Jan Maslak
2026-09-04 12:14 ` Matthew Auld
2026-06-22 15:58 ` ✗ CI.checkpatch: warning for drm/xe/xe_migrate: Fix memory corruption with unaligned dst in MEM_COPY (rev2) Patchwork
2026-06-22 15:59 ` ✓ CI.KUnit: success " Patchwork
2026-06-22 16:55 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-06-22 19:27 ` ✗ 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=apXRlzqZUhTys7Av@ART-DEV-395 \
--to=jan.maslak@intel.com \
--cc=christoph.manszewski@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=thomas.hellstrom@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.