75,7 → 75,7 |
* Returns current GPU offset of the object. |
* |
* Note: object should either be pinned or reserved when calling this |
* function, it might be usefull to add check for this for debugging. |
* function, it might be useful to add check for this for debugging. |
*/ |
static inline u64 radeon_bo_gpu_offset(struct radeon_bo *bo) |
{ |
112,23 → 112,20 |
int r; |
|
r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, 0); |
if (unlikely(r != 0)) { |
if (r != -ERESTARTSYS) |
dev_err(bo->rdev->dev, "%p reserve failed for wait\n", bo); |
if (unlikely(r != 0)) |
return r; |
} |
spin_lock(&bo->tbo.lock); |
// spin_lock(&bo->tbo.bdev->fence_lock); |
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); |
spin_unlock(&bo->tbo.lock); |
// spin_unlock(&bo->tbo.bdev->fence_lock); |
ttm_bo_unreserve(&bo->tbo); |
return r; |
} |
|
extern int radeon_bo_create(struct radeon_device *rdev, |
struct drm_gem_object *gobj, unsigned long size, |
unsigned long size, int byte_align, |
bool kernel, u32 domain, |
struct radeon_bo **bo_ptr); |
extern int radeon_bo_kmap(struct radeon_bo *bo, void **ptr); |
142,10 → 139,7 |
extern void radeon_bo_fini(struct radeon_device *rdev); |
extern void radeon_bo_list_add_object(struct radeon_bo_list *lobj, |
struct list_head *head); |
extern int radeon_bo_list_reserve(struct list_head *head); |
extern void radeon_bo_list_unreserve(struct list_head *head); |
extern int radeon_bo_list_validate(struct list_head *head); |
extern void radeon_bo_list_fence(struct list_head *head, void *fence); |
extern int radeon_bo_fbdev_mmap(struct radeon_bo *bo, |
struct vm_area_struct *vma); |
extern int radeon_bo_set_tiling_flags(struct radeon_bo *bo, |
156,6 → 150,6 |
bool force_drop); |
extern void radeon_bo_move_notify(struct ttm_buffer_object *bo, |
struct ttm_mem_reg *mem); |
extern void radeon_bo_fault_reserve_notify(struct ttm_buffer_object *bo); |
extern int radeon_bo_fault_reserve_notify(struct ttm_buffer_object *bo); |
extern int radeon_bo_get_surface_reg(struct radeon_bo *bo); |
#endif |