[PATCH 6/7] radeontool regmatch: sync() before reading a bunch of registers

Jonathan Nieder jrnieder at gmail.com
Tue Mar 23 19:55:43 PDT 2010


A hard lock-up is always an unpleasant event, but it can be less
unpleasant if any unrelated pending I/O is finished first.  Make
‘radeontool regmatch '*'’ a little safer by calling sync().

Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
---
This gave me some comfort.  Overkill?

 radeontool.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/radeontool.c b/radeontool.c
index e715a18..2c5c4ca 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -732,6 +732,9 @@ void radeon_reg_match(const char *pattern)
         printf("%s\t0x%08x (%d)\n", pattern, value, value);
     }
     else {
+        /* Prepare for a crash (just in case). */
+        sync();
+
         for (i = 0; i < sizeof(reg_list) / sizeof(reg_list[0]); i++) {
             if (fnmatch(pattern, reg_list[i].name, 0) == 0) {
                 printf("%s (%s%04x)\t", reg_list[i].name,
-- 
1.7.0.3



More information about the xorg-driver-ati mailing list