From: Thomas Hellstrom Date: Fri, 19 Oct 2007 14:28:47 +0000 (+0200) Subject: No fence_class argument on drmBOSetStatus since it's not X-Git-Tag: submit/1.0/20121108.012404~1030^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=733ff568346e8fe40e9790f21f8b7efc659d5d12;p=profile%2Fivi%2Flibdrm.git No fence_class argument on drmBOSetStatus since it's not associated with a particular command submission. --- diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 78cbb09..a8e054d 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2695,7 +2695,7 @@ int drmBOUnmap(int fd, drmBO *buf) return 0; } -int drmBOSetStatus(int fd, drmBO *buf, uint32_t fence_class, +int drmBOSetStatus(int fd, drmBO *buf, uint64_t flags, uint64_t mask, unsigned int hint, unsigned int desired_tile_stride, @@ -2711,7 +2711,6 @@ int drmBOSetStatus(int fd, drmBO *buf, uint32_t fence_class, req->flags = flags; req->handle = buf->handle; req->hint = hint; - req->fence_class = fence_class; req->desired_tile_stride = desired_tile_stride; req->tile_info = tile_info; diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 89c014e..cc4743d 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1524,7 +1524,9 @@ EXPORT_SYMBOL(drm_bo_do_validate); int drm_bo_handle_validate(struct drm_file * file_priv, uint32_t handle, uint32_t fence_class, - uint64_t flags, uint64_t mask, uint32_t hint, + uint64_t flags, uint64_t mask, + uint32_t hint, + int use_old_fence_class, struct drm_bo_info_rep * rep, struct drm_buffer_object **bo_rep) { @@ -1537,10 +1539,12 @@ int drm_bo_handle_validate(struct drm_file * file_priv, uint32_t handle, bo = drm_lookup_buffer_object(file_priv, handle, 1); mutex_unlock(&dev->struct_mutex); - if (!bo) { + if (!bo) return -EINVAL; - } - + + if (use_old_fence_class) + fence_class = bo->fence_class; + /* * Only allow creator to change shared buffer mask. */ @@ -1780,6 +1784,7 @@ int drm_bo_setstatus_ioctl(struct drm_device *dev, req->flags, req->mask, req->hint | DRM_BO_HINT_DONT_FENCE, + 1, rep, NULL); if (ret) diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h index 4d1ec99..f153b84 100644 --- a/linux-core/drm_objects.h +++ b/linux-core/drm_objects.h @@ -510,6 +510,7 @@ extern int drm_bo_init_mm(struct drm_device * dev, unsigned type, extern int drm_bo_handle_validate(struct drm_file * file_priv, uint32_t handle, uint32_t fence_class, uint64_t flags, uint64_t mask, uint32_t hint, + int use_old_fence_class, struct drm_bo_info_rep * rep, struct drm_buffer_object **bo_rep); extern struct drm_buffer_object *drm_lookup_buffer_object(struct drm_file * file_priv,