}
}
- if (ttm_buf->delayed_unmap)
- drmBOUnmap(bufmgr_ttm->fd, &ttm_buf->drm_bo);
+ if (ttm_buf->delayed_unmap) {
+ int ret = drmBOUnmap(bufmgr_ttm->fd, &ttm_buf->drm_bo);
+
+ if (ret != 0) {
+ fprintf(stderr, "%s:%d: Error unmapping buffer %s: %s.\n",
+ __FILE__, __LINE__, ttm_buf->name, strerror(-ret));
+ }
+ }
ret = drmBOUnreference(bufmgr_ttm->fd, &ttm_buf->drm_bo);
if (ret != 0) {
dri_bufmgr_ttm *bufmgr_ttm;
dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
unsigned int flags;
+ int ret;
bufmgr_ttm = (dri_bufmgr_ttm *)buf->bufmgr;
return 0;
}
- return drmBOMap(bufmgr_ttm->fd, &ttm_buf->drm_bo, flags, 0, &buf->virtual);
+ ret = drmBOMap(bufmgr_ttm->fd, &ttm_buf->drm_bo, flags, 0, &buf->virtual);
+ if (ret != 0) {
+ fprintf(stderr, "%s:%d: Error mapping buffer %s: %s .\n",
+ __FILE__, __LINE__, ttm_buf->name, strerror(-ret));
+ }
+
+ return ret;
}
static int
{
dri_bufmgr_ttm *bufmgr_ttm;
dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
+ int ret;
if (buf == NULL)
return 0;
buf->virtual = NULL;
- return drmBOUnmap(bufmgr_ttm->fd, &ttm_buf->drm_bo);
+ ret = drmBOUnmap(bufmgr_ttm->fd, &ttm_buf->drm_bo);
+ if (ret != 0) {
+ fprintf(stderr, "%s:%d: Error unmapping buffer %s: %s.\n",
+ __FILE__, __LINE__, ttm_buf->name, strerror(-ret));
+ }
+
+ return ret;
}
/**
ret = drmFenceWait(bufmgr_ttm->fd, DRM_FENCE_FLAG_WAIT_LAZY, &fence_ttm->drm_fence, 0);
if (ret != 0) {
- fprintf(stderr, "%s:%d: Error %d waiting for fence %s.\n",
- __FILE__, __LINE__, ret, fence_ttm->name);
+ fprintf(stderr, "%s:%d: Error waiting for fence %s: %s.\n",
+ __FILE__, __LINE__, fence_ttm->name, strerror(-ret));
abort();
}