Currently, when allocating the memory for BO by Mesa, the lima kernel driver set only GFP_DMA32 flag; and this allocation may fail when the memory is relatively adequate, thus retrying is needed. Add the GFP flags for retrying memory allocation. Signed-off-by: Icenowy Zheng <icenowy@xxxxxxx> --- drivers/gpu/drm/lima/lima_object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_object.c b/drivers/gpu/drm/lima/lima_object.c index 87123b1d083c..1389aa1b948b 100644 --- a/drivers/gpu/drm/lima/lima_object.c +++ b/drivers/gpu/drm/lima/lima_object.c @@ -91,7 +91,9 @@ struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size, goto err_out; } } else { - mapping_set_gfp_mask(bo->gem.filp->f_mapping, GFP_DMA32); + mapping_set_gfp_mask(bo->gem.filp->f_mapping, + GFP_DMA32 | __GFP_RETRY_MAYFAIL | + __GFP_NOWARN); bo->pages = drm_gem_get_pages(&bo->gem); if (IS_ERR(bo->pages)) { ret = ERR_CAST(bo->pages); -- 2.21.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel