Mesa (master): r300g: fix DRM errors

Marek Olšák mareko at kemper.freedesktop.org
Sun Mar 7 07:36:50 PST 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Feb 23 01:14:44 2010 +0100

r300g: fix DRM errors

---

 src/gallium/drivers/r300/r300_transfer.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index 56a6976..ec89681 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -102,10 +102,15 @@ static void r300_copy_into_tiled_texture(struct pipe_context *ctx,
                                   PIPE_BUFFER_USAGE_GPU_WRITE |
                                   PIPE_BUFFER_USAGE_PIXEL);
 
+    /* XXX this flush prevents the following DRM error from occuring:
+     * [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation !
+     * Reproducible with perf/copytex. */
+    ctx->flush(ctx, 0, NULL);
+
     ctx->surface_copy(ctx, dst, r300transfer->x, r300transfer->y, src, 0, 0,
                       transfer->width, transfer->height);
 
-    /* XXX this flush fixes lots of regressions, not sure why */
+    /* XXX this flush fixes a few piglit tests (e.g. glean/pixelFormats). */
     ctx->flush(ctx, 0, NULL);
 
     pipe_surface_reference(&src, NULL);



More information about the mesa-commit mailing list