diff options
author | Eric Anholt | 2008-03-04 14:16:51 -0600 |
---|---|---|
committer | Eric Anholt | 2008-03-04 14:16:51 -0600 |
commit | eedf3fa2f08eb774a36109c2fbda7207bf83fbe9 (patch) | |
tree | e48e18d6274d7d487330b76c74247c093f7005da /libdrm | |
parent | 63fd6f284ddd1096d34b39941683ae244c1e01fc (diff) | |
download | external-libdrm-eedf3fa2f08eb774a36109c2fbda7207bf83fbe9.tar.gz external-libdrm-eedf3fa2f08eb774a36109c2fbda7207bf83fbe9.tar.xz external-libdrm-eedf3fa2f08eb774a36109c2fbda7207bf83fbe9.zip |
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.
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 23 |
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) | |||
2799 | } | 2799 | } |
2800 | return 0; | 2800 | return 0; |
2801 | } | 2801 | } |
2802 | 2802 | ||
2803 | int drmBOBusy(int fd, drmBO *buf, int *busy) | 2803 | int drmBOBusy(int fd, drmBO *buf, int *busy) |
2804 | { | 2804 | { |
2805 | if (!(buf->flags & DRM_BO_FLAG_SHAREABLE) && | 2805 | int ret = drmBOInfo(fd, buf); |
2806 | !(buf->replyFlags & DRM_BO_REP_BUSY)) { | 2806 | |
2807 | *busy = 0; | 2807 | if (ret) |
2808 | return 0; | 2808 | return ret; |
2809 | } | 2809 | |
2810 | else { | 2810 | *busy = (buf->replyFlags & DRM_BO_REP_BUSY); |
2811 | int ret = drmBOInfo(fd, buf); | 2811 | return 0; |
2812 | if (ret) | ||
2813 | return ret; | ||
2814 | *busy = (buf->replyFlags & DRM_BO_REP_BUSY); | ||
2815 | return 0; | ||
2816 | } | ||
2817 | } | 2812 | } |
2818 | 2813 | ||
2819 | int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize, | 2814 | int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize, |
2820 | unsigned memType) | 2815 | unsigned memType) |
2821 | { | 2816 | { |