radeon_hd: from Cedar, memory sizes as bytes only for PALM/SUMO/SUMO2
should help with #17664 register change from Tahiti for #17377 Change-Id: I52b9691cd6a04b58b70e905bc29e803f06936789 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5526 Reviewed-by: John Scipione <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Alex von Gluck IV
parent
8dc67def4b
commit
265899da3a
@@ -290,7 +290,8 @@ struct radeon_free_graphics_memory {
|
|||||||
// registers
|
// registers
|
||||||
#define R6XX_CONFIG_APER_SIZE 0x5430 // r600>
|
#define R6XX_CONFIG_APER_SIZE 0x5430 // r600>
|
||||||
#define OLD_CONFIG_APER_SIZE 0x0108 // <r600
|
#define OLD_CONFIG_APER_SIZE 0x0108 // <r600
|
||||||
#define CONFIG_MEMSIZE 0x5428 // r600>
|
#define CONFIG_MEMSIZE 0x5428 // r600>
|
||||||
|
#define CONFIG_MEMSIZE_TAHITI 0x03de // tahiti>
|
||||||
|
|
||||||
|
|
||||||
#endif /* RADEON_HD_H */
|
#endif /* RADEON_HD_H */
|
||||||
|
|||||||
@@ -705,16 +705,24 @@ radeon_hd_init(radeon_info &info)
|
|||||||
mmioMapper.Detach();
|
mmioMapper.Detach();
|
||||||
|
|
||||||
// *** Populate frame buffer information
|
// *** Populate frame buffer information
|
||||||
if (info.chipsetID >= RADEON_CEDAR) {
|
if (info.chipsetID >= RADEON_TAHITI) {
|
||||||
if ((info.chipsetFlags & CHIP_APU) != 0
|
// Tahiti+ has memory stored in MB
|
||||||
|| (info.chipsetFlags & CHIP_IGP) != 0) {
|
info.shared_info->graphics_memory_size
|
||||||
// Evergreen+ fusion in bytes
|
= read32(info.registers + CONFIG_MEMSIZE_TAHITI) * 1024;
|
||||||
info.shared_info->graphics_memory_size
|
} else if (info.chipsetID >= RADEON_CEDAR) {
|
||||||
= read32(info.registers + CONFIG_MEMSIZE) / 1024;
|
switch (info.chipsetID) {
|
||||||
} else {
|
default:
|
||||||
// Evergreen+ has memory stored in MB
|
// Evergreen+ has memory stored in MB
|
||||||
info.shared_info->graphics_memory_size
|
info.shared_info->graphics_memory_size
|
||||||
= read32(info.registers + CONFIG_MEMSIZE) * 1024;
|
= read32(info.registers + CONFIG_MEMSIZE) * 1024;
|
||||||
|
break;
|
||||||
|
case RADEON_PALM:
|
||||||
|
case RADEON_SUMO:
|
||||||
|
case RADEON_SUMO2:
|
||||||
|
// Fusion in bytes
|
||||||
|
info.shared_info->graphics_memory_size
|
||||||
|
= read32(info.registers + CONFIG_MEMSIZE) / 1024;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (info.chipsetID >= RADEON_R600) {
|
} else if (info.chipsetID >= RADEON_R600) {
|
||||||
// R600-R700 has memory stored in bytes
|
// R600-R700 has memory stored in bytes
|
||||||
|
|||||||
Reference in New Issue
Block a user