drm/radeon/kms: add a new gem_wait ioctl with read/write flags
[pandora-kernel.git] / drivers / gpu / drm / radeon / radeon_object.h
index e9dc8b2..a057a8e 100644 (file)
@@ -119,7 +119,7 @@ static inline u64 radeon_bo_mmap_offset(struct radeon_bo *bo)
 }
 
 static inline int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type,
-                                       bool no_wait)
+                                bool no_wait, enum ttm_buffer_usage usage)
 {
        int r;
 
@@ -130,7 +130,7 @@ static inline int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type,
        if (mem_type)
                *mem_type = bo->tbo.mem.mem_type;
        if (bo->tbo.sync_obj)
-               r = ttm_bo_wait(&bo->tbo, true, true, no_wait, TTM_USAGE_READWRITE);
+               r = ttm_bo_wait(&bo->tbo, true, true, no_wait, usage);
        spin_unlock(&bo->tbo.bdev->fence_lock);
        ttm_bo_unreserve(&bo->tbo);
        return r;