mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
drm/rockchip: limit gem buffer to 32bit mapping
Change-Id: I64537668aa10a2e26bdd19ac79bc417aa6c4a437 Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/reservation.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
#include "rockchip_drm_drv.h"
|
||||
#include "rockchip_drm_gem.h"
|
||||
@@ -432,6 +433,7 @@ int rockchip_gem_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
static struct rockchip_gem_object *
|
||||
rockchip_gem_alloc_object(struct drm_device *drm, unsigned int size)
|
||||
{
|
||||
struct address_space *mapping;
|
||||
struct rockchip_gem_object *rk_obj;
|
||||
struct drm_gem_object *obj;
|
||||
|
||||
@@ -445,6 +447,9 @@ 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);
|
||||
|
||||
return rk_obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user