summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-03-23 21:51:32 -0500
committerDave Airlie <airlied@redhat.com>2010-03-24 13:16:05 +1000
commita8ce2f23c5898c701f7ec0a8a7bb823081a29317 (patch)
treea8aa3fb831edb95f802117d5a29b7174b17a3604
parent3709886e4b1116f44537750533af7a74cf64b78e (diff)
radeontool: completely skip early cards with --skip
radeontool looks for the control and fb regions for early cards with --skip even though that they are not going to be used. If radeontool fails to detect one of those regions for the chosen card, the result can be a setup with one region from one card and the other from another. This also 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 <jrnieder@gmail.com> Acked-by: Tormod Volden <debian.tormod@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--radeontool.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/radeontool.c b/radeontool.c
index 009e96c..03b9f8d 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -910,6 +910,9 @@ static void map_radeon_cntl_mem(void)
device->device_id, device->device_class);
}
+ if (skip-- != 0) {
+ continue;
+ }
for (i = 0; i < 6; i++) {
if (device->regions[i].size == 64 * 1024)
ctrl_region = i;
@@ -917,9 +920,7 @@ static void map_radeon_cntl_mem(void)
fb_region = i;
}
avivo_device = device;
- if(skip-- == 0) {
- break;
- }
+ break;
}
}