From f2db76e2f206d2017f710eaddc4b33add4498898 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 11 Oct 2006 13:40:35 +0200 Subject: Big update: Adapt for new functions in the 2.6.19 kernel. Remove the ability to have multiple regions in one TTM. This simplifies a lot of code. Remove the ability to access TTMs from user space. We don't need it anymore without ttm regions. Don't change caching policy for evicted buffers. Instead change it only when the buffer is accessed by the CPU (on the first page fault). This tremendously speeds up eviction rates. Current code is safe for kernels <= 2.6.14. Should also be OK with 2.6.19 and above. --- libdrm/xf86mm.h | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'libdrm/xf86mm.h') diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h index c0e4f1b6..78df37c3 100644 --- a/libdrm/xf86mm.h +++ b/libdrm/xf86mm.h @@ -101,15 +101,6 @@ typedef struct _drmFence{ unsigned signaled; } drmFence; -typedef struct _drmTTM{ - unsigned handle; - drm_u64_t user_token; - unsigned flags; - unsigned long size; - void *virtual; - int mapCount; -} drmTTM; - typedef struct _drmBO{ drm_bo_type_t type; unsigned handle; @@ -125,7 +116,6 @@ typedef struct _drmBO{ void *virtual; void *mapVirtual; int mapCount; - drmTTM *ttm; } drmBO; @@ -163,17 +153,6 @@ extern int drmFenceEmit(int fd, unsigned flags, drmFence *fence, extern int drmFenceBuffers(int fd, unsigned flags, drmFence *fence); -/* - * TTM functions. - */ - -extern int drmTTMCreate(int fd, drmTTM *ttm, unsigned long size, - unsigned flags); -extern int drmTTMDestroy(int fd, const drmTTM *ttm); -extern int drmTTMReference(int fd, unsigned handle, drmTTM *ttm); -extern int drmTTMUnreference(int fd, const drmTTM *ttm); -extern drm_handle_t drmTTMMapHandle(int fd, const drmTTM *ttm); - /* * Buffer object list functions. */ @@ -189,7 +168,7 @@ extern int drmBOCreateList(int numTarget, drmBOList *list); * Buffer object functions. */ -extern int drmBOCreate(int fd, drmTTM *ttm, unsigned long start, unsigned long size, +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 drmBODestroy(int fd, drmBO *buf); -- cgit v1.2.3