summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-03-04 12:16:51 -0800
committerEric Anholt <eric@anholt.net>2008-03-04 12:16:51 -0800
commiteedf3fa2f08eb774a36109c2fbda7207bf83fbe9 (patch)
treee48e18d6274d7d487330b76c74247c093f7005da
parent63fd6f284ddd1096d34b39941683ae244c1e01fc (diff)
Don't shortcut the info syscall for drmBOBusy on nonshareable objects.
This broke the results when you're trying to check if a buffer you dispatched some time ago is done being rendered from.
-rw-r--r--libdrm/xf86drm.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index e3550de7..fb8f1c66 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2799,23 +2799,18 @@ int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint)
}
return 0;
}
-
+
int drmBOBusy(int fd, drmBO *buf, int *busy)
{
- if (!(buf->flags & DRM_BO_FLAG_SHAREABLE) &&
- !(buf->replyFlags & DRM_BO_REP_BUSY)) {
- *busy = 0;
- return 0;
- }
- else {
- int ret = drmBOInfo(fd, buf);
- if (ret)
- return ret;
- *busy = (buf->replyFlags & DRM_BO_REP_BUSY);
- return 0;
- }
+ int ret = drmBOInfo(fd, buf);
+
+ if (ret)
+ return ret;
+
+ *busy = (buf->replyFlags & DRM_BO_REP_BUSY);
+ return 0;
}
-
+
int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize,
unsigned memType)
{