summaryrefslogtreecommitdiff
path: root/include/drm/drm_buddy.h
diff options
context:
space:
mode:
authorArunpravin <Arunpravin.PaneerSelvam@amd.com>2022-02-22 23:18:41 +0530
committerChristian König <christian.koenig@amd.com>2022-02-23 10:44:43 +0100
commit92937f170d3f49f41d7acb86243ee691a98eb2be (patch)
treea3705c67a108d61b397be2328c6b6085c67606cb /include/drm/drm_buddy.h
parentcb8f00f27ae7a1e8d047f1e2c96acc257f09d51b (diff)
drm/selftests: add drm buddy alloc range testcase
- add a test to check the range allocation - export get_buddy() function in drm_buddy.c - export drm_prandom_u32_max_state() in lib/drm_random.c - include helper functions - include prime number header file v2: - add drm_get_buddy() function description (Matthew Auld) - removed unnecessary test succeeded print Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220222174845.2175-3-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'include/drm/drm_buddy.h')
-rw-r--r--include/drm/drm_buddy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drm_buddy.h b/include/drm/drm_buddy.h
index bd21f9dfd15e..572077ff8ae7 100644
--- a/include/drm/drm_buddy.h
+++ b/include/drm/drm_buddy.h
@@ -134,6 +134,9 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size);
void drm_buddy_fini(struct drm_buddy *mm);
+struct drm_buddy_block *
+drm_get_buddy(struct drm_buddy_block *block);
+
int drm_buddy_alloc_blocks(struct drm_buddy *mm,
u64 start, u64 end, u64 size,
u64 min_page_size,