aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 95dbce286a41..1331fd538398 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -233,10 +233,6 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
233 233
234 WARN_ON(omap_obj->pages); 234 WARN_ON(omap_obj->pages);
235 235
236 /* TODO: __GFP_DMA32 .. but somehow GFP_HIGHMEM is coming from the
237 * mapping_gfp_mask(mapping) which conflicts w/ GFP_DMA32.. probably
238 * we actually want CMA memory for it all anyways..
239 */
240 pages = drm_gem_get_pages(obj, GFP_KERNEL); 236 pages = drm_gem_get_pages(obj, GFP_KERNEL);
241 if (IS_ERR(pages)) { 237 if (IS_ERR(pages)) {
242 dev_err(obj->dev->dev, "could not get pages: %ld\n", PTR_ERR(pages)); 238 dev_err(obj->dev->dev, "could not get pages: %ld\n", PTR_ERR(pages));
@@ -1347,6 +1343,7 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
1347 struct omap_drm_private *priv = dev->dev_private; 1343 struct omap_drm_private *priv = dev->dev_private;
1348 struct omap_gem_object *omap_obj; 1344 struct omap_gem_object *omap_obj;
1349 struct drm_gem_object *obj = NULL; 1345 struct drm_gem_object *obj = NULL;
1346 struct address_space *mapping;
1350 size_t size; 1347 size_t size;
1351 int ret; 1348 int ret;
1352 1349
@@ -1404,14 +1401,16 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
1404 omap_obj->height = gsize.tiled.height; 1401 omap_obj->height = gsize.tiled.height;
1405 } 1402 }
1406 1403
1407 ret = 0; 1404 if (flags & (OMAP_BO_DMA|OMAP_BO_EXT_MEM)) {
1408 if (flags & (OMAP_BO_DMA|OMAP_BO_EXT_MEM))
1409 drm_gem_private_object_init(dev, obj, size); 1405 drm_gem_private_object_init(dev, obj, size);
1410 else 1406 } else {
1411 ret = drm_gem_object_init(dev, obj, size); 1407 ret = drm_gem_object_init(dev, obj, size);
1408 if (ret)
1409 goto fail;
1412 1410
1413 if (ret) 1411 mapping = file_inode(obj->filp)->i_mapping;
1414 goto fail; 1412 mapping_set_gfp_mask(mapping, GFP_USER | __GFP_DMA32);
1413 }
1415 1414
1416 return obj; 1415 return obj;
1417 1416