drm/ttm/tests: Add eviction testing
authorKarolina Stolarek <karolina.stolarek@intel.com>
Wed, 12 Jun 2024 12:03:02 +0000 (14:03 +0200)
committerArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Mon, 24 Jun 2024 10:31:21 +0000 (16:01 +0530)
commit5fe3943385c987f73f99cdfa99785424a9d32a41
tree41cff1fbcaccd062215f9d19cfd29621416885cc
parent8eda41dfc9b2f04c03858cf33c79eb1e6e9249b1
drm/ttm/tests: Add eviction testing

Add tests for ttm_bo_validate that focus on BO eviction and swapout.
Update device funcs definition with eviction-related callbacks. Add
alternative funcs where evict_flags() routes eviction to a domain
that can't allocate resources (dubbed "busy manager" in the tests).
Extract the common path of ttm_device init into a function.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com>
Tested-by: Somalapuram, Amaranath <asomalap@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ae8e284d6c7e6bd0be259052bd4f42e07ce24641.1718192625.git.karolina.stolarek@intel.com
drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h
drivers/gpu/drm/ttm/tests/ttm_mock_manager.c
drivers/gpu/drm/ttm/tests/ttm_mock_manager.h