drm/amdgpu: add ucode_start_address into cgs_firmware_info
authorHuang Rui <ray.huang@amd.com>
Sun, 19 Jun 2016 15:55:14 +0000 (23:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jul 2016 16:33:10 +0000 (12:33 -0400)
The ucode_start_address would be used on powerplay of iceland.

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

index 5556ce97919921254a924aa71b5bdeba128b8b09..ee95e950a19b054b3ffcb2038e705f118f32fc41 100644 (file)
@@ -752,6 +752,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 
                if (!adev->pm.fw) {
                        switch (adev->asic_type) {
+                       case CHIP_TOPAZ:
+                               strcpy(fw_name, "amdgpu/topaz_smc.bin");
+                               break;
                        case CHIP_TONGA:
                                strcpy(fw_name, "amdgpu/tonga_smc.bin");
                                break;
@@ -800,6 +803,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 
                info->version = adev->pm.fw_version;
                info->image_size = ucode_size;
+               info->ucode_start_address = ucode_start_address;
                info->kptr = (void *)src;
        }
        return 0;
index 0c8c85d2a2a57f9a4ca11f52d0d7faaf5da7ef27..f32af2f2091a626a092f79b79f8c102e6f724395 100644 (file)
@@ -160,6 +160,10 @@ struct cgs_firmware_info {
        uint16_t                feature_version;
        uint32_t                image_size;
        uint64_t                mc_addr;
+
+       /* only for smc firmware */
+       uint32_t                ucode_start_address;
+
        void                    *kptr;
 };