drm/ttm: Add interface to export kernel_zone max memory size in ttm
authorKen Wang <Qingqing.Wang@amd.com>
Wed, 27 Jul 2016 11:12:15 +0000 (19:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Aug 2016 15:33:08 +0000 (11:33 -0400)
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>
drivers/gpu/drm/ttm/ttm_memory.c
include/drm/ttm/ttm_memory.h

index a1803fbcc898a9f347b696ac454442592bc22004..29855be96be096bc7622e398e119e5376ce4bd8e 100644 (file)
@@ -600,3 +600,9 @@ size_t ttm_round_pot(size_t size)
        return 0;
 }
 EXPORT_SYMBOL(ttm_round_pot);
+
+uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob)
+{
+       return glob->zone_kernel->max_mem;
+}
+EXPORT_SYMBOL(ttm_get_kernel_zone_memory_size);
index 72dcbe81dd0706ee1e7e8c95c5f7d06ef38158da..c4520890f2677dd6af75e3d7aa026c2b88959c5e 100644 (file)
@@ -155,4 +155,5 @@ extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
 extern void ttm_mem_global_free_page(struct ttm_mem_global *glob,
                                     struct page *page);
 extern size_t ttm_round_pot(size_t size);
+extern uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob);
 #endif