[PATCH 3/7] radeontool: handle r128 again

Jonathan Nieder jrnieder at gmail.com
Tue Mar 23 19:52:49 PDT 2010


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 at gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
---
 radeontool.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/radeontool.c b/radeontool.c
index 7fd1010..019f0ce 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)
-- 
1.7.0.3



More information about the xorg-driver-ati mailing list