From: Mark Yao Date: Fri, 16 Jun 2017 00:57:52 +0000 (+0800) Subject: drm/rockchip: gem: don't limit to 32bit mapping when not support LPAE X-Git-Tag: release-20171130_firefly~4^2~399 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3635bb84e671aeb227c15bbfcbf6a7d0c59e6a78;p=firefly-linux-kernel-4.4.55.git drm/rockchip: gem: don't limit to 32bit mapping when not support LPAE Change-Id: I3d2b41cfb0be3122ccb291802feb950017acdf44 Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index 3a26e9a0f68d..fa34c17bde4d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -447,8 +447,11 @@ rockchip_gem_alloc_object(struct drm_device *drm, unsigned int size) drm_gem_object_init(drm, obj, size); - mapping = file_inode(obj->filp)->i_mapping; - mapping_set_gfp_mask(mapping, mapping_gfp_mask(mapping) | __GFP_DMA32); + if (IS_ENABLED(CONFIG_ARM_LPAE)) { + mapping = file_inode(obj->filp)->i_mapping; + mapping_set_gfp_mask(mapping, + mapping_gfp_mask(mapping) | __GFP_DMA32); + } return rk_obj; }