Mesa (master): r600g: avoid unneeded bo wait

Dave Airlie airlied at kemper.freedesktop.org
Tue Oct 5 07:13:08 UTC 2010


Module: Mesa
Branch: master
Commit: 12be1568d0ad648930a2bb04a10b3181061fa468
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12be1568d0ad648930a2bb04a10b3181061fa468

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Oct  5 16:00:48 2010 +1000

r600g: avoid unneeded bo wait

if we know the bo has gone not busy, no need to add another bo wait

thanks to Andre (taiu) on irc for pointing this out.

---

 src/gallium/winsys/r600/drm/radeon_bo_pb.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/r600/drm/radeon_bo_pb.c b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
index 3396481..a345202 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo_pb.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
@@ -100,6 +100,10 @@ radeon_bo_pb_map_internal(struct pb_buffer *_buf,
 		uint32_t domain;
 		if (radeon_bo_busy(buf->mgr->radeon, buf->bo, &domain))
 			return NULL;
+		if (radeon_bo_map(buf->mgr->radeon, buf->bo)) {
+			return NULL;
+		}
+		goto out;
 	}
 
 	if (buf->bo->data != NULL) {
@@ -115,7 +119,7 @@ radeon_bo_pb_map_internal(struct pb_buffer *_buf,
 			return NULL;
 		}
 	}
-
+out:
 	LIST_DELINIT(&buf->maplist);
 	return buf->bo->data;
 }




More information about the mesa-commit mailing list