public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
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: Fri, 24 Apr 2026 13:46:38 +0300	[thread overview]
Message-ID: <aetKDptHSWxeaTQD@intel.com> (raw)
In-Reply-To: <avcncasy2hs6unvhve3e6xh4vojhbbzsxt2lvs4vqjyx55ieet@g5fx4noqpogw>

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.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-04-24 10:46 UTC|newest]

Thread overview: 13+ 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ä [this message]
2026-04-24 15:37         ` Zbigniew Kempczyński
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=aetKDptHSWxeaTQD@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