summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTejas Upadhyay <tejas.upadhyay@intel.com>2026-08-06 11:06:25 +0530
committerArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>2026-08-06 16:58:54 +0530
commit151ebbc20aa2365fa854a77432043b16606b5cfe (patch)
tree58721e52a19a69b460bd3c269c79fbb2965949af /include
parent0ba6deddaae74f0539c0303bfb5f860adbe1a68b (diff)
downloadlinux-151ebbc20aa2365fa854a77432043b16606b5cfe.tar.gz
linux-151ebbc20aa2365fa854a77432043b16606b5cfe.zip
drm/gpu: Add gpu_buddy_allocated_addr_to_block helper
Add helper with primary purpose is to efficiently trace a specific physical memory address back to its corresponding TTM buffer object. v3: - use mm->chunk_size minimum allocation granularity (Arun) v2: - %s/gpu_buddy_addr_to_block/gpu_buddy_allocated_addr_to_block(MattA) - remove clear->avail and split nodes check(MattA) - Adapt lockdep(MattB) Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Cc: Arunpravin Paneer Selvam <arunpravin.paneerselvam@amd.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Link: https://patch.msgid.link/20260806053624.3215216-5-tejas.upadhyay@intel.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/gpu_buddy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpu_buddy.h b/include/linux/gpu_buddy.h
index e037714563d8..2c36124bb696 100644
--- a/include/linux/gpu_buddy.h
+++ b/include/linux/gpu_buddy.h
@@ -287,6 +287,8 @@ void gpu_buddy_reset_clear(struct gpu_buddy *mm, bool is_clear);
void gpu_buddy_free_block(struct gpu_buddy *mm, struct gpu_buddy_block *block);
+struct gpu_buddy_block *gpu_buddy_allocated_addr_to_block(struct gpu_buddy *mm, u64 addr);
+
void gpu_buddy_free_list(struct gpu_buddy *mm,
struct list_head *objects,
unsigned int flags);