Skip to content

Commit

Permalink
drm/ttm: Workaround memory allocation limits affecting KFD
Browse files Browse the repository at this point in the history
Allow up to 15/16 of system memory to be used.


Fix BUG: SWDEV-106528

Change-Id: I5d47bfa49459c62da49bbae6058c940b2d37b3f6
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
  • Loading branch information
Yong Zhao authored and Kent Russell committed Apr 4, 2019
1 parent e6a3037 commit fac143d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/ttm/ttm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob,

zone->name = "kernel";
zone->zone_mem = mem;
zone->max_mem = mem >> 1;
zone->emer_mem = (mem >> 1) + (mem >> 2);
zone->swap_limit = zone->max_mem - (mem >> 3);
zone->max_mem = mem - (mem >> 4); /* 15/16 */
zone->emer_mem = mem - (mem >> 4); /* 15/16 */
zone->swap_limit = zone->max_mem;
zone->used_mem = 0;
zone->glob = glob;
glob->zone_kernel = zone;
Expand Down

0 comments on commit fac143d

Please sign in to comment.