drm/amd/powerplay: add kicker flag into smumgr
authorHuang Rui <ray.huang@amd.com>
Fri, 10 Feb 2017 08:42:19 +0000 (16:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Feb 2017 16:43:11 +0000 (11:43 -0500)
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
drivers/gpu/drm/amd/include/cgs_common.h
drivers/gpu/drm/amd/powerplay/inc/smumgr.h
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c

index fa34dcae392fd8997b17ba3d22fb8044d7e24596..d9e5aa4a79efae12f541d93aab8d7098b06aa8d9 100644 (file)
@@ -834,16 +834,18 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
                        case CHIP_TOPAZ:
                                if (((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x81)) ||
                                    ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x83)) ||
-                                   ((adev->pdev->device == 0x6907) && (adev->pdev->revision == 0x87)))
+                                   ((adev->pdev->device == 0x6907) && (adev->pdev->revision == 0x87))) {
+                                       info->is_kicker = true;
                                        strcpy(fw_name, "amdgpu/topaz_k_smc.bin");
-                               else
+                               else
                                        strcpy(fw_name, "amdgpu/topaz_smc.bin");
                                break;
                        case CHIP_TONGA:
                                if (((adev->pdev->device == 0x6939) && (adev->pdev->revision == 0xf1)) ||
-                                   ((adev->pdev->device == 0x6938) && (adev->pdev->revision == 0xf1)))
+                                   ((adev->pdev->device == 0x6938) && (adev->pdev->revision == 0xf1))) {
+                                       info->is_kicker = true;
                                        strcpy(fw_name, "amdgpu/tonga_k_smc.bin");
-                               else
+                               else
                                        strcpy(fw_name, "amdgpu/tonga_smc.bin");
                                break;
                        case CHIP_FIJI:
@@ -858,9 +860,10 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
                                            ((adev->pdev->device == 0x67ff) &&
                                             ((adev->pdev->revision == 0xcf) ||
                                              (adev->pdev->revision == 0xef) ||
-                                             (adev->pdev->revision == 0xff))))
+                                             (adev->pdev->revision == 0xff)))) {
+                                               info->is_kicker = true;
                                                strcpy(fw_name, "amdgpu/polaris11_k_smc.bin");
-                                       else
+                                       else
                                                strcpy(fw_name, "amdgpu/polaris11_smc.bin");
                                } else if (type == CGS_UCODE_ID_SMU_SK) {
                                        strcpy(fw_name, "amdgpu/polaris11_smc_sk.bin");
@@ -874,9 +877,10 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
                                             (adev->pdev->revision == 0xe4) ||
                                             (adev->pdev->revision == 0xe5) ||
                                             (adev->pdev->revision == 0xe7) ||
-                                            (adev->pdev->revision == 0xef)))
+                                            (adev->pdev->revision == 0xef))) {
+                                               info->is_kicker = true;
                                                strcpy(fw_name, "amdgpu/polaris10_k_smc.bin");
-                                       else
+                                       else
                                                strcpy(fw_name, "amdgpu/polaris10_smc.bin");
                                } else if (type == CGS_UCODE_ID_SMU_SK) {
                                        strcpy(fw_name, "amdgpu/polaris10_smc_sk.bin");
index 1d26ae768147a05204e5872a6641ab5577d9d2b6..17b9d41f3e879b45dc7cc69313d5e1cd6e421e8c 100644 (file)
@@ -171,6 +171,7 @@ struct cgs_firmware_info {
        uint32_t                ucode_start_address;
 
        void                    *kptr;
+       bool                    is_kicker;
 };
 
 struct cgs_mode_info {
index 9b6531bd63503a8601d231021603a8f6241004b3..7c318a95e0c280406dfd5e70f23fd06e863814de 100644 (file)
@@ -137,6 +137,7 @@ struct pp_smumgr {
        uint32_t usec_timeout;
        bool reload_fw;
        const struct pp_smumgr_func *smumgr_funcs;
+       bool is_kicker;
 };
 
 extern int smum_early_init(struct pp_instance *handle);
index 6749fbe26c74033f6a65071b67908fb3dcffdc06..35ac276814150a4fcf91e798a4de7283acf01855 100644 (file)
@@ -533,6 +533,8 @@ int smu7_upload_smu_firmware_image(struct pp_smumgr *smumgr)
                cgs_get_firmware_info(smumgr->device,
                        smu7_convert_fw_type_to_cgs(UCODE_ID_SMU_SK), &info);
 
+       smumgr->is_kicker = info.is_kicker;
+
        result = smu7_upload_smc_firmware_data(smumgr, info.image_size, (uint32_t *)info.kptr, SMU7_SMC_SIZE);
 
        return result;