linux/drivers/gpu/drm/xe/tests
Thomas Hellström 5c87fee3c9
drm/xe: Attempt to bring bos back to VRAM after eviction
VRAM+TT bos that are evicted from VRAM to TT may remain in
TT also after a revalidation following eviction or suspend.

This manifests itself as applications becoming sluggish
after buffer objects get evicted or after a resume from
suspend or hibernation.

If the bo supports placement in both VRAM and TT, and
we are on DGFX, mark the TT placement as fallback. This means
that it is tried only after VRAM + eviction.

This flaw has probably been present since the xe module was
upstreamed but use a Fixes: commit below where backporting is
likely to be simple. For earlier versions we need to open-
code the fallback algorithm in the driver.

v2:
- Remove check for dgfx. (Matthew Auld)
- Update the xe_dma_buf kunit test for the new strategy (CI)
- Allow dma-buf to pin in current placement (CI)
- Make xe_bo_validate() for pinned bos a NOP.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5995
Fixes: a78a8da51b ("drm/ttm: replace busy placement with flags v6")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: <stable@vger.kernel.org> # v6.9+
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/20250904160715.2613-2-thomas.hellstrom@linux.intel.com
(cherry picked from commit cb3d7b3b46)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-09-09 13:20:22 -04:00
..
Makefile
xe_args_test.c
xe_bo.c drm/xe: Attempt to bring bos back to VRAM after eviction 2025-09-09 13:20:22 -04:00
xe_dma_buf.c drm/xe: Attempt to bring bos back to VRAM after eviction 2025-09-09 13:20:22 -04:00
xe_guc_buf_kunit.c drm/xe: Drop bo->size 2025-06-27 14:52:31 -07:00
xe_guc_db_mgr_test.c
xe_guc_id_mgr_test.c
xe_guc_relay_test.c
xe_kunit_helpers.c
xe_kunit_helpers.h
xe_live_test_mod.c drm/xe/tests: Move shrink test out of xe_bo 2024-12-19 13:51:46 +01:00
xe_lmtt_test.c
xe_migrate.c drm/xe: Drop bo->size 2025-06-27 14:52:31 -07:00
xe_mocs.c drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs 2025-04-29 17:59:53 +05:30
xe_pci.c drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count 2025-07-02 16:08:54 -07:00
xe_pci_test.c drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count 2025-07-02 16:08:54 -07:00
xe_pci_test.h drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count 2025-07-02 16:08:54 -07:00
xe_rtp_test.c drm/xe/rtp: Drop sentinels from arg to xe_rtp_process_to_sr() 2025-03-12 20:54:17 -07:00
xe_sriov_pf_service_kunit.c drm/xe/pf: Stop requiring VF/PF version negotiation on every GT 2025-07-14 18:19:31 +02:00
xe_test.h
xe_test_mod.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
xe_wa_test.c