summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radeontool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/radeontool.c b/radeontool.c
index 7cfd8e4..10b9266 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -915,10 +915,15 @@ static void map_radeon_cntl_mem(void)
}
for (i = 0; i < 6; i++) {
if (device->regions[i].size >= 16 * 1024 &&
- device->regions[i].size <= 64 * 1024)
+ device->regions[i].size <= 64 * 1024) {
+ if (ctrl_region != -1)
+ fatal("cannot distinguish ctrl region\n");
ctrl_region = i;
- else if (device->regions[i].size >= 64 * 1024 * 1024)
+ } else if (device->regions[i].size >= 64 * 1024 * 1024) {
+ if (fb_region != -1)
+ fatal("cannot distinguish fb region\n");
fb_region = i;
+ }
}
if (ctrl_region == -1)
fatal("cannot find ctrl region\n");