diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-03-23 21:52:49 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-03-24 13:16:08 +1000 |
commit | f25e9a743221a0c4fe7d45fe50bb50712ce46334 (patch) | |
tree | 05758fd693f5577d5bd0d319362765caa1eb3532 | |
parent | 7e3e9808cc1e47be3a2d26cd507aef1ba6d508be (diff) |
radeontool: handle r128 again
An r128 has a tiny (16 KiB) control region and a small (64 MiB)
framebuffer, but radeontool can handle it anyway.
In particular, this gets 'radeontool light off' (and 'on'), which is
often used to work around bugs in Dell suspend support, working again
for the r128. It hasn’t been working since the change to use
libpciaccess.
Analysis-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | radeontool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/radeontool.c b/radeontool.c index d8622d5..7cfd8e4 100644 --- a/radeontool.c +++ b/radeontool.c @@ -914,9 +914,10 @@ static void map_radeon_cntl_mem(void) continue; } for (i = 0; i < 6; i++) { - if (device->regions[i].size == 64 * 1024) + if (device->regions[i].size >= 16 * 1024 && + device->regions[i].size <= 64 * 1024) ctrl_region = i; - else if (device->regions[i].size >= 128 * 1024 * 1024) + else if (device->regions[i].size >= 64 * 1024 * 1024) fb_region = i; } if (ctrl_region == -1) |