Implement compression support on BMG
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | drm/xe/migrate: Handle clear ccs logic for xe2 dgfxdrivers/ | +8 | 0 replies | |
| 2/6 | drm/xe/migrate: Add kunit to test clear functionalitydrivers/ drivers/ drivers/ | +274 | 1 reply | |
| 3/6 | drm/xe/xe2: Introduce identity map for compressed pat for vramdrivers/ | +62 | 0 replies | |
| 4/6 | drm/xe/xe_migrate: Handle migration logic for xe2+ dgfxdrivers/ | +4 | 3 replies | |
| 5/6 | drm/xe/migrate: Add kunit to test migration functionality for BMGdrivers/ | +118 | 0 replies | |
| 6/6 | drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfxdrivers/ | +6 | 0 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Matthew Auld | Himal Prasad Ghimiray | Nirmoy Das |
|---|---|---|---|
| 1/6 | R-b | R-b | |
| 2/6 | R-b | A-b | |
| 3/6 | R-b | ||
| 4/6 | R-b | R-b | |
| 5/6 | R-b | ||
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/6] Implement compression support on BMG
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 (6):
drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality 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 | 389 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_migrate.c | 91 ++++- 5 files changed, 470 insertions(+), 18 deletions(-)
Signature · 1 line
2.34.1