Skip to content
Snippets Groups Projects
Commit fd98c167 authored by José Roberto de Souza's avatar José Roberto de Souza
Browse files

drm/xe: Limit the system memory size to half of the system memory


ttm_global_init() imposes this limitation.

Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent d600a3f5
No related branches found
No related tags found
1 merge request!344Latest rev of upstreaming prep
......@@ -105,7 +105,10 @@ int xe_ttm_sys_mgr_init(struct xe_device *xe)
u64 gtt_size;
si_meminfo(&si);
gtt_size = (u64)si.totalram * si.mem_unit * 3/4;
gtt_size = (u64)si.totalram * si.mem_unit;
/* TTM limits allocation of all TTM devices by 50% of system memory */
gtt_size /= 2;
man->use_tt = true;
man->func = &xe_ttm_sys_mgr_func;
ttm_resource_manager_init(man, &xe->ttm, gtt_size >> PAGE_SHIFT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment