diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-07 11:06:07 +0000 |
---|---|---|
committer | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-07 11:06:07 +0000 |
commit | 99c3680c3e3fbbf45f2442053adefbc1b9578e1a (patch) | |
tree | 1f29056f35e4dab76c32b564c9f001a1e075763c | |
parent | e70e553bc5cd5f9279989227c179684b8c532a1f (diff) |
libdrm: Wait for fence before mapping a buffer. ttm: Remove some leftover
debugging output.
-rw-r--r-- | libdrm/xf86mm.c | 10 | ||||
-rw-r--r-- | linux-core/drm_ttm.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libdrm/xf86mm.c b/libdrm/xf86mm.c index adb3be89..f5c14e63 100644 --- a/libdrm/xf86mm.c +++ b/libdrm/xf86mm.c @@ -455,6 +455,16 @@ drmMMMapBuffer(int drmFD, drmMMBuf * buf) int ret; drmAddress *addr; + if (buf->block && buf->block->fenced) { + ret = -EINTR; + while(ret == -EINTR) { + ret = drmWaitFence(drmFD, buf->block->fence); + } + if (ret) { + return NULL; + } + } + if (buf->flags & DRM_MM_SHARED) return buf->virtual; diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index 66b2c708..d3e15d63 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -411,7 +411,6 @@ int drm_evict_ttm_region(drm_ttm_backend_list_t * entry) drm_ttm_backend_t *be = entry->be; drm_ttm_t *ttm = entry->owner; - DRM_ERROR("Unbind\n"); if (be) { switch (entry->state) { case ttm_bound: @@ -565,7 +564,6 @@ int drm_bind_ttm_region(drm_ttm_backend_list_t * region, drm_ttm_backend_t *be; drm_ttm_t *ttm; - DRM_ERROR("Bind\n"); if (!region || region->state == ttm_bound) return -EINVAL; |