[PATCH V4 0/2] Add gpu_buddy_allocated_addr_to_block helper and its Kunit tests

Tejas Upadhyay <[email protected]> Thu, 6 Aug 2026 11:06:24 +0530
Newsgroups org.freedesktop.lists.intel-xe,org.freedesktop.lists.dri-devel
Message-ID <[email protected]>
Add helper with primary purpose is to efficiently trace a specific
physical memory address back to its corresponding TTM buffer object.

Also Add KUnit tests for testing it.

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 | 45 +++++++++++++++++++++++++
 include/linux/gpu_buddy.h          |  2 ++
 3 files changed, 100 insertions(+)

-- 
2.52.0