diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2014-07-17 19:01:08 +0900 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-08-05 08:53:33 -0400 |
commit | 02376d8282b88f07d0716da6155094c8760b1a13 (patch) | |
tree | 9e81e9b229f9230f2d42f8e80fdd50966eac13bc /drivers/gpu/drm/radeon/radeon_gem.c | |
parent | 77497f2735ad6e29c55475e15e9790dbfa2c2ef8 (diff) | |
download | op-kernel-dev-02376d8282b88f07d0716da6155094c8760b1a13.zip op-kernel-dev-02376d8282b88f07d0716da6155094c8760b1a13.tar.gz |
drm/radeon: Allow write-combined CPU mappings of BOs in GTT (v2)
v2: fix rebase onto drm-fixes
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gem.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index fdd189b..ce1d61e 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -42,7 +42,7 @@ void radeon_gem_object_free(struct drm_gem_object *gobj) int radeon_gem_object_create(struct radeon_device *rdev, int size, int alignment, int initial_domain, - bool discardable, bool kernel, + u32 flags, bool discardable, bool kernel, struct drm_gem_object **obj) { struct radeon_bo *robj; @@ -64,7 +64,8 @@ int radeon_gem_object_create(struct radeon_device *rdev, int size, } retry: - r = radeon_bo_create(rdev, size, alignment, kernel, initial_domain, NULL, &robj); + r = radeon_bo_create(rdev, size, alignment, kernel, initial_domain, + flags, NULL, &robj); if (r) { if (r != -ERESTARTSYS) { if (initial_domain == RADEON_GEM_DOMAIN_VRAM) { @@ -252,8 +253,8 @@ 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); r = radeon_gem_object_create(rdev, args->size, args->alignment, - args->initial_domain, false, - false, &gobj); + args->initial_domain, args->flags, + false, false, &gobj); if (r) { up_read(&rdev->exclusive_lock); r = radeon_gem_handle_lockup(rdev, r); @@ -461,11 +462,6 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, args->operation = RADEON_VA_RESULT_ERROR; return -EINVAL; } - if (!(args->flags & RADEON_VM_PAGE_SNOOPED)) { - dev_err(&dev->pdev->dev, "only supported snooped mapping for now\n"); - args->operation = RADEON_VA_RESULT_ERROR; - return -EINVAL; - } switch (args->operation) { case RADEON_VA_MAP: @@ -572,7 +568,7 @@ int radeon_mode_dumb_create(struct drm_file *file_priv, args->size = ALIGN(args->size, PAGE_SIZE); r = radeon_gem_object_create(rdev, args->size, 0, - RADEON_GEM_DOMAIN_VRAM, + RADEON_GEM_DOMAIN_VRAM, 0, false, ttm_bo_type_device, &gobj); if (r) |