[PATCH/RFC v2 0/10] Re: avivotool: error out unless there is exactly one control and fb region

2012-02-24 Thread Jonathan Nieder
(unfriendly behavior when run as non-root). The rest of the patches are cleanups or small potential improvements noticed in the process of writing those two. Still untested, since my radeon is still temporarily out of commission. Compiles at least. :) Jonathan Nieder (10): avivotool: make card

[PATCH 01/10] avivotool: make card mapping failure non-fatal

2012-02-24 Thread Jonathan Nieder
than exiting. That is just asking for trouble, so make lack of a card and other card detection trouble into non-fatal errors as preparation for making die() exit again. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 12 1 file changed, 8 insertions(+), 4

[PATCH 02/10] avivotool, radeonreg: make fatal errors exit

2012-02-24 Thread Jonathan Nieder
It's safer not to continue once in an erroneous situation. This reverses a change made in radeontool-1.6.0~28 (add more ram dumping stuff) and makes the behavior of avivotool match radeontool again. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c |2 +- radeonreg.c |2

[PATCH 03/10] use continue statement to simplify for each PCI device loop

2012-02-24 Thread Jonathan Nieder
in functionality intended. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 62 ++ radeonreg.c | 28 ++ radeontool.c | 54 ++ 3 files changed, 75

[PATCH 04/10] avivotool, radeonreg: completely skip early cards with --skip

2012-02-24 Thread Jonathan Nieder
If only one card is present but --skip=n was supplied, it is more intuitive to error out than to guess which earlier card the user meant. Compare commit a8ce2f23c589 (radeontool: completely skip early cards with --skip, 2010-03-23). Signed-off-by: Jonathan Nieder jrnie...@gmail.com

[PATCH 4.5/10] fixup! avivotool, radeonreg: completely skip early cards with --skip

2012-02-24 Thread Jonathan Nieder
Jonathan Nieder wrote: If only one card is present but --skip=n was supplied, it is more intuitive to error out than to guess which earlier card the user meant. Oops, sent the wrong version of this patch. Please squash in the following for sanity. Later patches assume the following has been

[PATCH 07/10] switch to modern pci_device_map_range API

2012-02-24 Thread Jonathan Nieder
-declarations. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 31 ++- configure.ac |2 +- radeonreg.c | 22 ++ radeontool.c | 22 ++ 4 files changed, 35 insertions(+), 42 deletions(-) diff --git

[PATCH 08/10] include errno string in more messages

2012-02-24 Thread Jonathan Nieder
: cannot map ctrl region: Permission denied Inspired by a patch by Tormod Volden. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 38 -- radeonreg.c | 23 +-- radeontool.c | 23 +-- 3 files changed

[PATCH 10/10] radeontool: make card detection and mapping errors non-fatal

2012-02-24 Thread Jonathan Nieder
on a patch by Tormod Volden. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- That's the end of the series. Thanks for reading. radeontool.c | 74 -- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/radeontool.c b

[PATCH/RFC radeontool 0/5] Re: Only print current status in usage() if we are root

2012-02-20 Thread Jonathan Nieder
you think? Jonathan Nieder (5): avivotool, radeonreg: make fatal errors exit avivotool: error out unless there is exactly one control and fb region switch to modern pci_device_map_range API make some error messages more verbose radeontool: make card detection and mapping errors non-fatal

[PATCH 1/6] avivotool: make card detection and mapping errors non-fatal

2012-02-20 Thread Jonathan Nieder
than exiting. That had some unpleasant side effects, so make lack of a card and other card detection trouble into non-fatal errors as preparation for making die() exit again. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 12 1 files changed, 8 insertions(+), 4

[PATCH 2/6] avivotool, radeonreg: make fatal errors exit

2012-02-20 Thread Jonathan Nieder
It's safer not to continue once in an erroneous situation. This reverses a change made in radeontool-1.6.0~28 (add more ram dumping stuff) and makes the behavior of avivotool match radeontool again. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c |2 +- radeonreg.c |2

[PATCH 3/6] avivotool: error out unless there is exactly one control and fb region

2012-02-20 Thread Jonathan Nieder
Just like radeontool, avivotool should not blindly fall back to region 0 when the expected memory areas cannot be found. Noticed by code inspection. (Compare commits 51a87cf0 and 7e3e9808.) Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 29

[PATCH 4/6] switch to modern pci_device_map_range API

2012-02-20 Thread Jonathan Nieder
-declarations. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 37 +++-- configure.ac |2 +- radeonreg.c | 22 +- radeontool.c | 29 - 4 files changed, 49 insertions(+), 41 deletions(-) diff --git

[PATCH 5/6] include errno string in more messages

2012-02-20 Thread Jonathan Nieder
: cannot map ctrl region: Permission denied Inspired by a patch by Tormod Volden. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 34 -- radeonreg.c | 25 ++--- radeontool.c | 21 +++-- 3 files changed, 53

[PATCH 6/6] radeontool: make card detection and mapping errors non-fatal

2012-02-20 Thread Jonathan Nieder
. Based on a patch by Tormod Volden. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- That's the end of the series. Sorry about the off-by-one error in patch numbering. Hopefully the patches were entertaining anyway. I'd also like to address the -Wformat warnings, but it's getting late, so

Re: [PATCH radeontool 1/5] Clearer error message on fatal errors

2011-12-02 Thread Jonathan Nieder
-Wformat-security seems like an unambiguously good thing. :) Missing newlines in error messages would be easier to avoid if fatal() took care of the newline. So maybe something like the following would make sense. With or without these tweaks, Reviewed-by: Jonathan Nieder jrnie...@gmail.com

[PATCH 1/4] avoid -Wformat-security warnings

2011-12-02 Thread Jonathan Nieder
by Tormod. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c |2 +- radeonreg.c |2 +- radeontool.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/avivotool.c b/avivotool.c index 240f523f..02b03bab 100644 --- a/avivotool.c +++ b/avivotool.c

[PATCH 2/4] radeontool: add missing newline to error message

2011-12-02 Thread Jonathan Nieder
From: Tormod Volden debian.tor...@gmail.com $ test $ radeontool romtables test $ PCI ROM signature 0x55 0xaa missing$ Signed-off-by: Tormod Volden debian.tor...@gmail.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- radeontool.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH 3/4] prefix fatal error messages with fatal error:

2011-12-02 Thread Jonathan Nieder
From: Tormod Volden debian.tor...@gmail.com Let the user know which message corresponds to the error that caused the tool to exit. [jn: using fatal error: instead of Error: for consistency with usage:] Signed-off-by: Tormod Volden lists.tor...@gmail.com Signed-off-by: Jonathan Nieder jrnie

[PATCH 4/4] teach fatal() to write newline

2011-12-02 Thread Jonathan Nieder
adjusted will break the build. No change in functionality intended. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- avivotool.c | 28 ++-- radeonreg.c | 14 +++--- radeontool.c | 20 ++-- 3 files changed, 31 insertions(+), 31 deletions

Re: [PATCH radeontool 2/5] Warn if run without superuser rights

2011-12-02 Thread Jonathan Nieder
Hi, Tormod Volden wrote: From: Tormod Volden debian.tor...@gmail.com Signed-off-by: Tormod Volden debian.tor...@gmail.com I think there's a line or so of room here to explain the purpose of this patch. :) [...] --- a/radeontool.c +++ b/radeontool.c @@ -2951,6 +2951,8 @@ void

Re: [PATCH radeontool 3/5] Only print current status in usage() if we are root

2011-12-02 Thread Jonathan Nieder
--- this patch makes a nice improvement already in avoiding confusion when a person first runs radeontool -h. So for what it's worth, once the whitespace is fixed, Reviewed-by: Jonathan Nieder jrnie...@gmail.com ___ xorg-driver-ati mailing list xorg-driver-ati

Re: [PATCH radeontool 5/5] Fix string format mismatch warnings

2011-12-02 Thread Jonathan Nieder
; - printf(FSB: %f Mhz\n, fsb); + printf(FSB: %i Mhz\n, fsb); Good catch, yikes. Except where noted above, Reviewed-by: Jonathan Nieder jrnie...@gmail.com Thanks for working on this. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http

[PATCH radeontool 0/7] r128 support

2010-03-24 Thread Jonathan Nieder
regmatch '*' locked up the system. Patches 5-6 make such a lockup more bearable; I used them while debugging. Patch 7 fixes it. I hope you enjoy the patches. I would be interested in any comments you have. Regards, Jonathan Nieder (7): radeontool: completely skip early cards with --skip radeontool

[PATCH 1/7] radeontool: completely skip early cards with --skip

2010-03-24 Thread Jonathan Nieder
improves error handling: if only one card is present but --skip=1 was supplied, then without this patch radeontool will not actually error out. Signed-off-by: Jonathan Nieder jrnie...@gmail.com Acked-by: Tormod Volden debian.tor...@gmail.com --- radeontool.c |7 --- 1 files changed, 4 insertions

[PATCH 2/7] radeontool: error out for missing control or fb region

2010-03-24 Thread Jonathan Nieder
Do not blithely use an uninitialized value when the expected memory areas cannot be found. This is triggered by trying to use radeontool on an r128. Noticed-by: Tormod Volden debian.tor...@gmail.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Acked-by: Tormod Volden debian.tor...@gmail.com

[PATCH 5/7] radeontool regmatch: print name before reading each register

2010-03-24 Thread Jonathan Nieder
Register reads might take a long time or lock up the system. Let the user know which register before such an event occurs. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- radeontool.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/radeontool.c b

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

2010-03-24 Thread Jonathan Nieder
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 jrnie...@gmail.com --- This gave me some comfort. Overkill? radeontool.c

[PATCH 7/7] radeontool: Avoid lo ckup on ‘radeontool regmatch '*'’ on r128

2010-03-24 Thread Jonathan Nieder
with ‘radeontool regmatch [pattern]’. A similar crash was reported on 2009-12-02 on #radeon for an R300, so presumably this problem is not restricted to pre-Radeon cards. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- That’s the end of the series. Thanks for reading. radeontool.c | 12 1