amd/common: get ME/PFP/CE firmware feature versions as well
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 25 Aug 2017 22:33:14 +0000 (00:33 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 13 Sep 2017 16:25:06 +0000 (18:25 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h
src/gallium/drivers/radeon/r600_pipe_common.c

index e55d864187d59b97cbfe06c2cbb97721f52603a2..d10b0eb0af957d4ca98463dadcc996a6091111a7 100644 (file)
@@ -100,7 +100,6 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
        struct amdgpu_heap_info vram, vram_vis, gtt;
        struct drm_amdgpu_info_hw_ip dma = {}, compute = {}, uvd = {}, vce = {}, vcn_dec = {};
        uint32_t vce_version = 0, vce_feature = 0, uvd_version = 0, uvd_feature = 0;
-       uint32_t unused_feature;
        int r, i, j;
        drmDevicePtr devinfo;
 
@@ -176,21 +175,24 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
        }
 
        r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_ME, 0, 0,
-                                       &info->me_fw_version, &unused_feature);
+                                       &info->me_fw_version,
+                                       &info->me_fw_feature);
        if (r) {
                fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(me) failed.\n");
                return false;
        }
 
        r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_PFP, 0, 0,
-                                       &info->pfp_fw_version, &unused_feature);
+                                       &info->pfp_fw_version,
+                                       &info->pfp_fw_feature);
        if (r) {
                fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(pfp) failed.\n");
                return false;
        }
 
        r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_CE, 0, 0,
-                                       &info->ce_fw_version, &unused_feature);
+                                       &info->ce_fw_version,
+                                       &info->ce_fw_feature);
        if (r) {
                fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(ce) failed.\n");
                return false;
index 06b0c77546653ae4301588e8fb7860ab4eb6ecc9..5722709d24f97ac952fa70001f6f655030a6e4bc 100644 (file)
@@ -66,8 +66,11 @@ struct radeon_info {
        uint32_t                    uvd_fw_version;
        uint32_t                    vce_fw_version;
        uint32_t                    me_fw_version;
+       uint32_t                    me_fw_feature;
        uint32_t                    pfp_fw_version;
+       uint32_t                    pfp_fw_feature;
        uint32_t                    ce_fw_version;
+       uint32_t                    ce_fw_feature;
        uint32_t                    vce_harvest_config;
        uint32_t                    clock_crystal_freq;
        uint32_t                    tcc_cache_line_size;
index fc27b4c218bcad71ebe8c9cf84ede953dcf31f6c..b283bc65b5b6bcac38bddfe3fa910a2d7a805feb 100644 (file)
@@ -1554,8 +1554,11 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
                printf("uvd_fw_version = %u\n", rscreen->info.uvd_fw_version);
                printf("vce_fw_version = %u\n", rscreen->info.vce_fw_version);
                printf("me_fw_version = %i\n", rscreen->info.me_fw_version);
+               printf("me_fw_feature = %i\n", rscreen->info.me_fw_feature);
                printf("pfp_fw_version = %i\n", rscreen->info.pfp_fw_version);
+               printf("pfp_fw_feature = %i\n", rscreen->info.pfp_fw_feature);
                printf("ce_fw_version = %i\n", rscreen->info.ce_fw_version);
+               printf("ce_fw_feature = %i\n", rscreen->info.ce_fw_feature);
                printf("vce_harvest_config = %i\n", rscreen->info.vce_harvest_config);
                printf("clock_crystal_freq = %i\n", rscreen->info.clock_crystal_freq);
                printf("tcc_cache_line_size = %u\n", rscreen->info.tcc_cache_line_size);