aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_object.h
diff options
context:
space:
mode:
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>2013-06-27 07:48:19 -0400
committerDave Airlie <airlied@redhat.com>2013-06-27 22:04:01 -0400
commit5e338405119a80aa59e811626739122d1c15045d (patch)
tree3474b9ab52408c78480a92a9d0c33626c61d7473 /drivers/gpu/drm/qxl/qxl_object.h
parentb580c9e2b7ba5030a795aa2fb73b796523d65a78 (diff)
drm/ttm: convert to the reservation api
Now that the code is compatible in semantics, flip the switch. Use ww_mutex instead of the homegrown implementation. ww_mutex uses -EDEADLK to signal that the caller has to back off, and -EALREADY to indicate this buffer is already held by the caller. ttm used -EAGAIN and -EDEADLK for those, respectively. So some changes were needed to handle this correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_object.h')
-rw-r--r--drivers/gpu/drm/qxl/qxl_object.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_object.h b/drivers/gpu/drm/qxl/qxl_object.h
index b4fd89fbd8b7..ee7ad79ce781 100644
--- a/drivers/gpu/drm/qxl/qxl_object.h
+++ b/drivers/gpu/drm/qxl/qxl_object.h
@@ -57,11 +57,6 @@ static inline unsigned long qxl_bo_size(struct qxl_bo *bo)
57 return bo->tbo.num_pages << PAGE_SHIFT; 57 return bo->tbo.num_pages << PAGE_SHIFT;
58} 58}
59 59
60static inline bool qxl_bo_is_reserved(struct qxl_bo *bo)
61{
62 return !!atomic_read(&bo->tbo.reserved);
63}
64
65static inline u64 qxl_bo_mmap_offset(struct qxl_bo *bo) 60static inline u64 qxl_bo_mmap_offset(struct qxl_bo *bo)
66{ 61{
67 return bo->tbo.addr_space_offset; 62 return bo->tbo.addr_space_offset;