diff options
author | Ronie Salgado <roniesalg@gmail.com> | 2016-04-13 21:56:15 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-09-05 15:46:29 +0200 |
commit | a625ba8d2d4da33bd6d7bb057d2bdf7cb484fd6c (patch) | |
tree | af03eea0cffb329493b9afd561c2f55e8b469257 /amdgpu | |
parent | c65377977597e1d3a317aa5022ac7d3bc0f6ff83 (diff) | |
download | libdrm-a625ba8d2d4da33bd6d7bb057d2bdf7cb484fd6c.tar.gz libdrm-a625ba8d2d4da33bd6d7bb057d2bdf7cb484fd6c.tar.bz2 libdrm-a625ba8d2d4da33bd6d7bb057d2bdf7cb484fd6c.zip |
amdgpu: add SI support
v2: without the amdgpu_drm.h change
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'amdgpu')
-rw-r--r-- | amdgpu/amdgpu_gpu_info.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c index 3eecd798..0f232977 100644 --- a/amdgpu/amdgpu_gpu_info.c +++ b/amdgpu/amdgpu_gpu_info.c @@ -187,10 +187,12 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) if (r) return r; - r = amdgpu_read_mm_registers(dev, 0xa0d5, 1, instance, 0, + if (dev->info.family_id >= AMDGPU_FAMILY_CI) { + r = amdgpu_read_mm_registers(dev, 0xa0d5, 1, instance, 0, &dev->info.pa_sc_raster_cfg1[i]); - if (r) - return r; + if (r) + return r; + } } r = amdgpu_read_mm_registers(dev, 0x2644, 32, 0xffffffff, 0, @@ -198,10 +200,12 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) if (r) return r; - r = amdgpu_read_mm_registers(dev, 0x2664, 16, 0xffffffff, 0, - dev->info.gb_macro_tile_mode); - if (r) - return r; + if (dev->info.family_id >= AMDGPU_FAMILY_CI) { + r = amdgpu_read_mm_registers(dev, 0x2664, 16, 0xffffffff, 0, + dev->info.gb_macro_tile_mode); + if (r) + return r; + } r = amdgpu_read_mm_registers(dev, 0x263e, 1, 0xffffffff, 0, &dev->info.gb_addr_cfg); |