diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-27 11:28:37 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-27 11:28:37 +0200 |
commit | f6d5fecdd20b9fd9e8744d8f43fa276b73a1da78 (patch) | |
tree | 380734403931194b944466acbee3c340259a7ada /libdrm | |
parent | e09544a2d3f44e96d01ed2bdcb4a4eb8eec26225 (diff) |
Last minute changes to support multi-page size buffer offset alignments.
This will come in very handy for tiled buffers on intel hardware.
Also add some padding to interface structures to allow future binary backwards
compatible changes.
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 7 | ||||
-rw-r--r-- | libdrm/xf86mm.h | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 9047c8db..ebf3f834 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2613,12 +2613,14 @@ static void drmBOCopyReply(const drm_bo_arg_reply_t *rep, buf->start = rep->buffer_start; buf->fenceFlags = rep->fence_flags; buf->replyFlags = rep->rep_flags; + buf->pageAlignment = rep->page_alignment; } -int drmBOCreate(int fd, void *ttm, unsigned long start, unsigned long size, - 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, + unsigned mask, unsigned hint, drmBO *buf) { drm_bo_arg_t arg; @@ -2632,6 +2634,7 @@ int drmBOCreate(int fd, void *ttm, unsigned long start, unsigned long size, req->hint = hint; req->size = size; req->type = type; + req->page_alignment = pageAlignment; buf->virtual = NULL; diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h index da868fe5..bd0d2812 100644 --- a/libdrm/xf86mm.h +++ b/libdrm/xf86mm.h @@ -99,6 +99,7 @@ typedef struct _drmFence{ unsigned type; unsigned flags; unsigned signaled; + unsigned pad[4]; /* for future expansion */ } drmFence; typedef struct _drmBO{ @@ -113,9 +114,11 @@ typedef struct _drmBO{ unsigned long start; unsigned replyFlags; unsigned fenceFlags; + unsigned pageAlignment; void *virtual; void *mapVirtual; int mapCount; + unsigned pad[8]; /* for future expansion */ } drmBO; @@ -168,9 +171,10 @@ extern int drmBOCreateList(int numTarget, drmBOList *list); * Buffer object functions. */ -extern int drmBOCreate(int fd, void *ttm, unsigned long start, unsigned long size, - void *user_buffer, drm_bo_type_t type, unsigned mask, - unsigned hint, drmBO *buf); +extern int drmBOCreate(int fd, unsigned long start, unsigned long size, + unsigned pageAlignment,void *user_buffer, + drm_bo_type_t type, unsigned mask, + unsigned hint, drmBO *buf); extern int drmBODestroy(int fd, drmBO *buf); extern int drmBOReference(int fd, unsigned handle, drmBO *buf); extern int drmBOUnReference(int fd, drmBO *buf); |