summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/radeon_fb.c2
-rw-r--r--linux-core/radeon_gem.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/linux-core/radeon_fb.c b/linux-core/radeon_fb.c
index 8c9461da..8d4181e8 100644
--- a/linux-core/radeon_fb.c
+++ b/linux-core/radeon_fb.c
@@ -728,7 +728,7 @@ int radeonfb_create(struct drm_device *dev, uint32_t fb_width, uint32_t fb_heigh
size = mode_cmd.pitch * mode_cmd.height;
aligned_size = ALIGN(size, PAGE_SIZE);
- fbo = radeon_gem_object_alloc(dev, aligned_size, 1, RADEON_GEM_DOMAIN_VRAM);
+ fbo = radeon_gem_object_alloc(dev, aligned_size, 1, RADEON_GEM_DOMAIN_VRAM, 0);
if (!fbo) {
printk(KERN_ERR "failed to allocate framebuffer\n");
ret = -ENOMEM;
diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c
index 225f0269..5e2ad98b 100644
--- a/linux-core/radeon_gem.c
+++ b/linux-core/radeon_gem.c
@@ -74,7 +74,7 @@ int radeon_gem_info_ioctl(struct drm_device *dev, void *data,
}
struct drm_gem_object *radeon_gem_object_alloc(struct drm_device *dev, int size, int alignment,
- int initial_domain)
+ int initial_domain, bool discardable)
{
struct drm_gem_object *obj;
struct drm_radeon_gem_object *obj_priv;
@@ -97,6 +97,9 @@ struct drm_gem_object *radeon_gem_object_alloc(struct drm_device *dev, int size,
flags |= DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_EXE;
+ if (discardable)
+ flags |= DRM_BO_FLAG_DISCARDABLE;
+
if (alignment == 0)
alignment = PAGE_SIZE;
@@ -129,7 +132,7 @@ int radeon_gem_create_ioctl(struct drm_device *dev, void *data,
/* create a gem object to contain this object in */
args->size = roundup(args->size, PAGE_SIZE);
- obj = radeon_gem_object_alloc(dev, args->size, args->alignment, args->initial_domain);
+ obj = radeon_gem_object_alloc(dev, args->size, args->alignment, args->initial_domain, args->no_backing_store);
if (!obj)
return -EINVAL;