Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/ttm: Add interface to export kernel_zone max memory size in ttm

Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ken Wang and committed by
Alex Deucher
ecf6a637 8e9fc800

+7
+6
drivers/gpu/drm/ttm/ttm_memory.c
··· 600 600 return 0; 601 601 } 602 602 EXPORT_SYMBOL(ttm_round_pot); 603 + 604 + uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob) 605 + { 606 + return glob->zone_kernel->max_mem; 607 + } 608 + EXPORT_SYMBOL(ttm_get_kernel_zone_memory_size);
+1
include/drm/ttm/ttm_memory.h
··· 155 155 extern void ttm_mem_global_free_page(struct ttm_mem_global *glob, 156 156 struct page *page); 157 157 extern size_t ttm_round_pot(size_t size); 158 + extern uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob); 158 159 #endif