[haiku-commits] Re: r41526 - haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon_hd

Hi,

+       // Populate graphics_memory_size with graphics memory size in KB
+       if (info.shared_info->device_chipset>= RADEON_R800) {
+               // R800+ has memory stored in MB
+               info.shared_info->graphics_memory_size
+                       = read32(info.registers + R6XX_CONFIG_MEMSIZE) * 1024;
+       } else {
+               // R600-R700 has memory stored in bytes
+               info.shared_info->graphics_memory_size
+                       = read32(info.registers + R6XX_CONFIG_MEMSIZE)>>  10;
+       }

If you mean "/ 1024", just write that. Also "R6XX_CONFIG_MEMSIZE" is misnamed if it applies to R600, R700 and R800. :-)

Best regards,
-Stephan


Other related posts: