From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: Jan Maslak <jan.maslak@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH 2/3] lib/rendercopy: Convert rendercopy_gen9 to use genxml pack headers
Date: Mon, 27 Apr 2026 15:19:48 +0300 [thread overview]
Message-ID: <ae9UZAQuZeu3AMYK@intel.com> (raw)
In-Reply-To: <ygjjh6w6ljlb7jt3cpvwjleotcein6frzgniojrew2vqtbgaoh@4bsktacozbjq>
On Fri, Apr 24, 2026 at 05:37:37PM +0200, Zbigniew Kempczyński wrote:
> On Fri, Apr 24, 2026 at 01:46:38PM +0300, Ville Syrjälä wrote:
> > On Fri, Apr 24, 2026 at 12:21:37PM +0200, Zbigniew Kempczyński wrote:
> > > On Tue, Apr 07, 2026 at 06:00:49PM +0300, Ville Syrjälä wrote:
> > >
> > > <cut>
> > >
> > > > > + /* MOCS encoding: genxml has a single 7-bit MOCS field (bits 30:24).
> > > > > + * The old struct had mocs_index:6 at bits 30:25 and pxp:1 at bit 24.
> > > > > + * Reproduce the same bit layout. */
> > > > > + mocs = (buf->mocs_index << 1) | (intel_buf_pxp(buf) ? 1 : 0);
> > > >
> > > > This annoying mocs_index stuff should be nuked throughout igt,
> > > > and replaced with the full mocs field. I've already gotten
> > > > confused by this multiple times when it looked like the
> > > > relevant macros were off by one bit when compared to the spec.
> > >
> > > IMO we can't stop using mocs index. BLOCK_COPY for Xe2+ has mocs index
> > > on bits[27:24] and encrypt is on bit[21]. Bits[23-22] are reserved.
> >
> > If that's the exception then it would be better to handle it there.
> > Everything else just has a single MOCS field, and the encryption bit
> > (if it exists) is just part of it. The current thing makes zero sense
> > for platforms that don't have the encrypt bit, and for the platforms
> > where the encrypt bit is part of MOCS the whole thing is just
> > intentionally confusing.
>
> I've found 4 exceptions in xe2.xml where MOCS doesn't use previous
> [7] or [6+1] bit arrangements.
>
> Interesting is EXECUTE_INDIRECT_DISPATCH contains MOCS index only. We're
> not using this command in IGT, but this shows index also can appear
> standalone. I think IGT should provide both interfaces - for getting
> MOCS index standalone and for getting the full MOCS field and on
> usecase depends which interface should be used.
IIRC Mesa uses the full MOCS field. We should do the same, especially
if we now plan to start using genxml.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-04-27 12:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 13:26 [PATCH 0/3] lib/genxml: Introduce Mesa genxml infrastructure to IGT Jan Maslak
2026-04-07 13:26 ` [PATCH 1/3] lib/genxml: Import genxml definitions and generators from Mesa Jan Maslak
2026-04-08 15:44 ` Kamil Konieczny
2026-04-07 13:26 ` [PATCH 2/3] lib/rendercopy: Convert rendercopy_gen9 to use genxml pack headers Jan Maslak
2026-04-07 15:00 ` Ville Syrjälä
2026-04-24 10:21 ` Zbigniew Kempczyński
2026-04-24 10:46 ` Ville Syrjälä
2026-04-24 15:37 ` Zbigniew Kempczyński
2026-04-27 12:19 ` Ville Syrjälä [this message]
2026-04-07 13:26 ` [PATCH 3/3] lib: Add genxml annotated batch buffer decode Jan Maslak
2026-04-08 9:23 ` [PATCH 0/3] lib/genxml: Introduce Mesa genxml infrastructure to IGT Jani Nikula
2026-04-09 17:45 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-04-09 18:03 ` ✗ i915.CI.BAT: " Patchwork
2026-04-09 19:02 ` ✗ 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=ae9UZAQuZeu3AMYK@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jan.maslak@intel.com \
--cc=zbigniew.kempczynski@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