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);
}
}
/* 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.