summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-07-10 20:34:29 +0200
committerMarek Olšák <[email protected]>2010-07-10 20:46:26 +0200
commitd63cb78dddb2fc185b6031c06bcab6c1f0315fd9 (patch)
treee2dc23cd0a4c14fa7e6338830cfe5597dce4c11f /src/gallium
parent8dc6d7610fa2e639b6cdbc8b4e277563cfd87a5e (diff)
r300g: do not print a rejected CS if RADEON_DUMP_CS is not set
Also print relocation failures on non-debug builds too.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_buffer.c4
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c9
2 files changed, 9 insertions, 4 deletions
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.