diff options
author | Dave Airlie <airlied@redhat.com> | 2009-08-17 21:21:02 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-17 21:21:53 +1000 |
commit | 1978f6d8d1215a9501882eb074901bcd0dfc0775 (patch) | |
tree | 4a00425a356c9a5815e265998c197f0f186c6dbf /libdrm | |
parent | f7996165fffe0a835752e8b9bb6b4d81bba5c91d (diff) |
radeon: fix bo wait at map time.
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/radeon/radeon_bo_gem.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c index 3c3b3e5b..cf59a359 100644 --- a/libdrm/radeon/radeon_bo_gem.c +++ b/libdrm/radeon/radeon_bo_gem.c @@ -156,11 +156,7 @@ static int bo_map(struct radeon_bo *bo, int write) return 0; } if (bo_gem->priv_ptr) { - r = bo_wait(bo); - bo->ptr = bo_gem->priv_ptr; - if (r) - return r; - return 0; + goto wait; } bo->ptr = NULL; @@ -180,8 +176,12 @@ static int bo_map(struct radeon_bo *bo, int write) if (ptr == MAP_FAILED) return -errno; bo_gem->priv_ptr = ptr; +wait: bo->ptr = bo_gem->priv_ptr; - return r; + r = bo_wait(bo); + if (r) + return r; + return 0; } static int bo_unmap(struct radeon_bo *bo) |