Add helper with primary purpose is to efficiently trace a specific
memory address back to its corresponding TTM buffer object.
Also Add KUnit tests for testing it.
v2
- Drop the mutex and lockdep annotation; standalone KUnit tests do not
register a driver lock.
Tejas Upadhyay (2):
drm/gpu: Add gpu_buddy_allocated_addr_to_block helper
gpu/tests/gpu_buddy: Add KUnit test for
gpu_buddy_allocated_addr_to_block
drivers/gpu/buddy.c | 53 ++++++++++++++++++++++++++++++
drivers/gpu/tests/gpu_buddy_test.c | 43 ++++++++++++++++++++++++
include/linux/gpu_buddy.h | 2 ++
3 files changed, 98 insertions(+)
--
2.52.0