Эх сурвалжийг харах

Merge "drm/msm: don't allocate pages from the MOVABLE zone"

qctecmdr 3 жил өмнө
parent
commit
887b222de9
1 өөрчлөгдсөн 8 нэмэгдсэн , 0 устгасан
  1. 8 0
      msm/msm_gem.c

+ 8 - 0
msm/msm_gem.c

@@ -1092,6 +1092,14 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
 		ret = drm_gem_object_init(dev, obj, size);
 		if (ret)
 			goto fail;
+
+		/*
+		 * Our buffers are kept pinned, so allocating them from the
+		 * MOVABLE zone is a really bad idea, and conflicts with CMA.
+		 * See comments above new_inode() why this is required _and_
+		 * expected if you're going to pin these pages.
+		 */
+		mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER);
 	}
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))