From d63cb78dddb2fc185b6031c06bcab6c1f0315fd9 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 10 Jul 2010 20:34:29 +0200 Subject: r300g: do not print a rejected CS if RADEON_DUMP_CS is not set Also print relocation failures on non-debug builds too. --- src/gallium/winsys/radeon/drm/radeon_drm_buffer.c | 4 ++-- src/gallium/winsys/radeon/drm/radeon_r300.c | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c index cb4ec32feae..c5f133e7b28 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c @@ -361,8 +361,8 @@ void radeon_drm_bufmgr_write_reloc(struct pb_buffer *_buf, retval = radeon_cs_write_reloc(buf->mgr->rws->cs, buf->bo, gem_rd, gem_wd, flags); if (retval) { - debug_printf("radeon: Relocation of %p (%d, %d, %d) failed!\n", - buf, gem_rd, gem_wd, flags); + fprintf(stderr, "radeon: Relocation of %p (%d, %d, %d) failed!\n", + buf, gem_rd, gem_wd, flags); } } diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index 51cfc0fd400..af35497fd7c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -252,8 +252,13 @@ static void radeon_flush_cs(struct r300_winsys_screen *rws) /* Emit the CS. */ retval = radeon_cs_emit(ws->cs); if (retval) { - debug_printf("radeon: Bad CS, dumping...\n"); - radeon_cs_print(ws->cs, stderr); + if (debug_get_bool_option("RADEON_DUMP_CS", FALSE)) { + fprintf(stderr, "radeon: The kernel rejected CS, dumping...\n"); + radeon_cs_print(ws->cs, stderr); + } else { + fprintf(stderr, "radeon: The kernel rejected CS, " + "see dmesg for more information.\n"); + } } /* Reset CS. -- cgit v1.2.3