summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-08-27 08:36:58 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-08-27 08:36:58 +0200
commit0a732983f059c353b267b6bf877e1f0eea4e033f (patch)
tree3e187ab5b879befa88a8680062a6e6d1b027fd45
parentce6c68dc8a893ed8673f49d381a8500c2ee3c29f (diff)
libdrm_radeon: Always wait for BO idle in bo_map.
This allows users to eliminate explicit bo_wait calls before bo_map calls.
-rw-r--r--libdrm/radeon/radeon_bo_gem.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c
index 76d80e7e..add55db9 100644
--- a/libdrm/radeon/radeon_bo_gem.c
+++ b/libdrm/radeon/radeon_bo_gem.c
@@ -152,10 +152,7 @@ static int bo_map(struct radeon_bo *bo, int write)
int r;
void *ptr;
- if (bo_gem->map_count++ != 0) {
- return 0;
- }
- if (bo_gem->priv_ptr) {
+ if (bo_gem->map_count++ != 0 || bo_gem->priv_ptr) {
goto wait;
}