summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2007-05-12 00:14:33 +0000
committerOliver McFadden <[email protected]>2007-05-12 00:14:33 +0000
commit93881edb46fc95e1cfb4ded4e8a5db92612d3e4d (patch)
tree7669975be4424cfb26022ff18a284795706c891e /src/mesa/drivers
parent56b99ace19cbe36df3e3995a299f28f99ba613fe (diff)
r300: Perform the locking closer to the DRM texture upload call.
This might help if with attaching GDB if the driver gets into a -EAGAIN loop.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c
index eef5ff186f4..30f3886542f 100644
--- a/src/mesa/drivers/dri/r300/r300_texmem.c
+++ b/src/mesa/drivers/dri/r300/r300_texmem.c
@@ -469,12 +469,14 @@ static void r300UploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t,
}
}
- LOCK_HARDWARE(&rmesa->radeon);
do {
+ LOCK_HARDWARE(&rmesa->radeon);
ret =
drmCommandWriteRead(rmesa->radeon.dri.fd,
DRM_RADEON_TEXTURE, &tex,
sizeof(drm_radeon_texture_t));
+ UNLOCK_HARDWARE(&rmesa->radeon);
+
if (ret) {
if (RADEON_DEBUG & DEBUG_IOCTL)
fprintf(stderr,
@@ -483,8 +485,6 @@ static void r300UploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t,
}
} while (ret == -EAGAIN);
- UNLOCK_HARDWARE(&rmesa->radeon);
-
if (ret) {
fprintf(stderr, "DRM_RADEON_TEXTURE: return = %d\n", ret);
fprintf(stderr, " offset=0x%08x\n", offset);