Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Akshata Jahagirdar <akshata.jahagirdar@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: akshatajahagirdar6@gmail.com,
	Akshata Jahagirdar <akshata.jahagirdar@intel.com>
Subject: [PATCH v7 0/7] Implement Compression Support on BMG
Date: Wed, 17 Jul 2024 21:10:01 +0000	[thread overview]
Message-ID: <cover.1721250309.git.akshata.jahagirdar@intel.com> (raw)

Xe2+ has unified compression (exactly one compression mode/format),
where compression is now controlled via PAT at PTE level.
This simplifies KMD operations, as it can now decompress freely
without concern for the buffer's original compression format—unlike DG2,
which had multiple compression formats and thus required copying the
raw CCS state during VRAM eviction. In addition mixed VRAM and system
memory buffers were not supported with compression enabled.

On Xe2 dGPU compression is still only supported with VRAM, however we
can now support compression with VRAM and system memory buffers,
with GPU access being seamless underneath. So long as when doing
VRAM -> system memory the KMD uses compressed -> uncompressed,
to decompress it. This also allows CPU access to such buffers,
assuming that userspace first decompress the corresponding
pages being accessed.
If the pages are already in system memory then KMD would have already
decompressed them. When restoring such buffers with sysmem -> VRAM
the KMD can't easily know which pages were originally compressed,
so we always use uncompressed -> uncompressed here.
With this it also means we can drop all the raw CCS handling on such
platforms (including needing to allocate extra CCS storage).

In order to support this we now need to have two different identity
mappings for compressed and uncompressed VRAM.
In this patch, we set up the additional identity map for the VRAM with
compressed pat_index. We then select the appropriate mapping during
migration/clear. During eviction (vram->sysmem), we use the mapping
from compressed -> uncompressed. During restore (sysmem->vram), we need
the mapping from uncompressed -> uncompressed.
Therefore, we need to have two different mappings for compressed and
uncompressed vram. We set up an additional identity map for the vram
with compressed pat_index.
We then select the appropriate mapping during migration/clear.

Akshata Jahagirdar (7):
  drm/xe/migrate: Handle clear ccs logic for xe2 dgfx
  drm/xe/migrate: Add kunit to test clear functionality
  drm/xe/migrate: Add helper function to program identity map
  drm/xe/xe2: Introduce identity map for compressed pat for vram
  drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx
  drm/xe/migrate: Add kunit to test migration functionality for BMG
  drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx

 drivers/gpu/drm/xe/tests/xe_bo.c      |   6 +
 drivers/gpu/drm/xe/tests/xe_migrate.c | 399 ++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_migrate.c       | 185 +++++++-----
 3 files changed, 524 insertions(+), 66 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-07-17 21:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 21:10 Akshata Jahagirdar [this message]
2024-07-17 21:10 ` [PATCH v7 1/7] drm/xe/migrate: Handle clear ccs logic for xe2 dgfx Akshata Jahagirdar
2024-07-17 21:10 ` [PATCH v7 2/7] drm/xe/migrate: Add kunit to test clear functionality Akshata Jahagirdar
2024-07-17 21:10 ` [PATCH v7 3/7] drm/xe/migrate: Add helper function to program identity map Akshata Jahagirdar
2024-07-17 21:10 ` [PATCH v7 4/7] drm/xe/xe2: Introduce identity map for compressed pat for vram Akshata Jahagirdar
2024-07-17 21:10 ` [PATCH v7 5/7] drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx Akshata Jahagirdar
2024-07-18  7:23   ` Nirmoy Das
2024-07-17 21:10 ` [PATCH v7 6/7] drm/xe/migrate: Add kunit to test migration functionality for BMG Akshata Jahagirdar
2024-07-17 21:10 ` [PATCH v7 7/7] drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx Akshata Jahagirdar
2024-07-17 21:16 ` ✓ CI.Patch_applied: success for Implement Compression Support on BMG Patchwork
2024-07-17 21:16 ` ✓ CI.checkpatch: " Patchwork
2024-07-17 21:17 ` ✓ CI.KUnit: " Patchwork
2024-07-17 21:29 ` ✓ CI.Build: " Patchwork
2024-07-17 21:32 ` ✓ CI.Hooks: " Patchwork
2024-07-17 21:33 ` ✓ CI.checksparse: " Patchwork
2024-07-17 21:53 ` ✓ CI.BAT: " Patchwork
2024-07-18  0:05 ` [PATCH v7 0/7] " Matt Roper
2024-07-18  3:15 ` ✗ CI.FULL: failure for " 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=cover.1721250309.git.akshata.jahagirdar@intel.com \
    --to=akshata.jahagirdar@intel.com \
    --cc=akshatajahagirdar6@gmail.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