ac/gpu_info: rework and extend device info to be more informative
authorMarek Olšák <marek.olsak@amd.com>
Sun, 3 Jul 2022 19:27:59 +0000 (15:27 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Jul 2022 05:01:38 +0000 (05:01 +0000)
commit9552da66cc9fb640bcf37826b193c75ad1fb8848
treebb44e7630c446022826c9cca613305ed0379ff2e
parentdd6b001775d3a58bfa4390da9440ec3e08a7cfe2
ac/gpu_info: rework and extend device info to be more informative

This is the result with AMD_DEBUG=info:

Device info:
    name = NAVI23
    marketing_name = AMD Radeon RX 6600
    num_se = 2
    num_rb = 8
    num_cu = 28
    max_gpu_freq = 2750 MHz
    max_gflops = 9856 GFLOPS
    l0_cache_size = 16 KB
    l1_cache_size = 128 KB
    l2_cache_size = 2048 KB
    l3_cache_size = 32 MB
    memory_channels = 8 (TCC blocks)
    memory_size = 8 GB (8192 MB)
    memory_freq = 14 GHz
    memory_bus_width = 128 bits
    memory_bandwidth = 224 GB/s
    clock_crystal_freq = 100000 KHz
    IP GFX     10.3  queues:1
    IP COMP    10.3  queues:4
    IP SDMA     5.2  queues:2
    IP VCN_DEC  3.0  queues:1
    IP VCN_ENC  3.0  queues:1
    IP VCN_JPG  3.0  queues:1

It might not be 100% correct with other chips.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h
src/amd/common/ac_rgp.c
src/gallium/drivers/r600/r600_pipe_common.c
src/gallium/drivers/radeonsi/si_get.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c