[PATCH] drm/ttm: fix ttm tt init fail when size exceeds kmalloc limit

2022-04-20 Thread Yang Wang
if the __GFP_ZERO is set, the kvmalloc() can't fallback to use vmalloc() to allocate memory, when request size is exceeds kmalloc limit, it will cause allocate memory fail. e.g: when ttm want to create a BO with 1TB size, it maybe fail. Signed-off-by: Yang Wang --- drivers/gpu/drm/ttm/ttm

[PATCH] drm/ttm: use kvcalloc() instead of kvmalloc_array() in ttm_tt

2022-04-21 Thread Yang Wang
simplify programming with existing functions. Signed-off-by: Yang Wang --- drivers/gpu/drm/ttm/ttm_tt.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 79c870a3bef8..cbb3d1fb4caf 100644