diff options
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 37 | ||||
-rw-r--r-- | libdrm/xf86mm.h | 19 |
2 files changed, 34 insertions, 22 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 63b9354f..4f12bd0b 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2611,13 +2611,16 @@ static void drmBOCopyReply(struct drm_bo_info_rep *rep, buf->fenceFlags = rep->fence_flags; buf->replyFlags = rep->rep_flags; buf->pageAlignment = rep->page_alignment; + buf->tileInfo = rep->tile_info; + buf->hwTileStride = rep->hw_tile_stride; + buf->desiredTileStride = rep->desired_tile_stride; } - - -int drmBOCreate(int fd, unsigned long start, unsigned long size, - unsigned pageAlignment, void *user_buffer, drm_bo_type_t type, - unsigned mask, + + +int drmBOCreate(int fd, unsigned long start, unsigned long size, + unsigned pageAlignment, void *user_buffer, drm_bo_type_t type, + drm_u64_t mask, unsigned hint, drmBO *buf) { struct drm_bo_create_arg arg; @@ -2798,8 +2801,9 @@ int drmBOUnmap(int fd, drmBO *buf) } return 0; } - -int drmBOValidate(int fd, drmBO *buf, unsigned flags, unsigned mask, + +int drmBOValidate(int fd, drmBO *buf, + drm_u64_t flags, drm_u64_t mask, unsigned hint) { struct drm_bo_op_arg arg; @@ -2809,9 +2813,10 @@ int drmBOValidate(int fd, drmBO *buf, unsigned flags, unsigned mask, memset(&arg, 0, sizeof(arg)); req->bo_req.handle = buf->handle; - req->bo_req.mask = flags; + req->bo_req.flags = flags; + req->bo_req.mask = mask; req->bo_req.hint = hint; - req->arg_handle = mask; /* Encode mask in the arg_handle field :/ */ + req->bo_req.fence_class = 0; /* Backwards compatibility. */ req->op = drm_bo_validate; do{ @@ -2839,7 +2844,7 @@ int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle) memset(&arg, 0, sizeof(arg)); req->bo_req.handle = buf->handle; - req->bo_req.mask = flags; + req->bo_req.flags = flags; req->arg_handle = fenceHandle; req->op = drm_bo_fence; @@ -2999,12 +3004,13 @@ int drmBOValidateList(int fd, drmBOList *list) prevNext = &arg->next; req->bo_req.handle = node->buf->handle; req->op = drm_bo_validate; - req->bo_req.mask = node->arg0; + req->bo_req.flags = node->arg0; req->bo_req.hint = 0; - req->arg_handle = node->arg1; + req->bo_req.mask = node->arg1; + req->bo_req.fence_class = 0; /* Backwards compat. */ } - - if (!first) + + if (!first) return 0; do{ @@ -3101,6 +3107,9 @@ int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize, memset(&arg, 0, sizeof(arg)); + arg.magic = DRM_BO_INIT_MAGIC; + arg.major = DRM_BO_INIT_MAJOR; + arg.minor = DRM_BO_INIT_MINOR; arg.p_offset = pOffset; arg.p_size = pSize; arg.mem_type = memType; diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h index 0b284cc0..68cd7cdd 100644 --- a/libdrm/xf86mm.h +++ b/libdrm/xf86mm.h @@ -106,8 +106,8 @@ typedef struct _drmBO{ drm_bo_type_t type; unsigned handle; drm_u64_t mapHandle; - unsigned flags; - unsigned mask; + drm_u64_t flags; + drm_u64_t mask; unsigned mapFlags; unsigned long size; unsigned long offset; @@ -115,6 +115,9 @@ typedef struct _drmBO{ unsigned replyFlags; unsigned fenceFlags; unsigned pageAlignment; + unsigned tileInfo; + unsigned hwTileStride; + unsigned desiredTileStride; void *virtual; void *mapVirtual; int mapCount; @@ -172,8 +175,8 @@ extern int drmBOCreateList(int numTarget, drmBOList *list); */ extern int drmBOCreate(int fd, unsigned long start, unsigned long size, - unsigned pageAlignment,void *user_buffer, - drm_bo_type_t type, unsigned mask, + unsigned pageAlignment,void *user_buffer, + drm_bo_type_t type, drm_u64_t mask, unsigned hint, drmBO *buf); extern int drmBODestroy(int fd, drmBO *buf); extern int drmBOReference(int fd, unsigned handle, drmBO *buf); @@ -181,14 +184,14 @@ extern int drmBOUnReference(int fd, drmBO *buf); extern int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint, void **address); extern int drmBOUnmap(int fd, drmBO *buf); -extern int drmBOValidate(int fd, drmBO *buf, unsigned flags, unsigned mask, - unsigned hint); +extern int drmBOValidate(int fd, drmBO *buf, drm_u64_t flags, + drm_u64_t mask, unsigned hint); + extern int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle); extern int drmBOInfo(int fd, drmBO *buf); extern int drmBOBusy(int fd, drmBO *buf, int *busy); - -extern int drmAddValidateItem(drmBOList *list, drmBO *buf, unsigned flags, +extern int drmAddValidateItem(drmBOList *list, drmBO *buf, unsigned flags, unsigned mask, int *newItem); extern int drmBOValidateList(int fd, drmBOList *list); |