]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: ignore digest_size when loading sdma fw for raven
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 10 Aug 2017 03:24:43 +0000 (11:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2017 18:46:20 +0000 (14:46 -0400)
digest_size has been retired from sdma v4 fw

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

index 79a9e44dc8ebcb98c60e5e41391518cfaeeb404d..fd7c72aaafa6248a566996140128a1fc22569279 100644 (file)
@@ -799,15 +799,12 @@ static int sdma_v4_0_load_microcode(struct amdgpu_device *adev)
        const struct sdma_firmware_header_v1_0 *hdr;
        const __le32 *fw_data;
        u32 fw_size;
-       u32 digest_size = 0;
        int i, j;
 
        /* halt the MEs */
        sdma_v4_0_enable(adev, false);
 
        for (i = 0; i < adev->sdma.num_instances; i++) {
-               uint16_t version_major;
-               uint16_t version_minor;
                if (!adev->sdma.instance[i].fw)
                        return -EINVAL;
 
@@ -815,23 +812,12 @@ static int sdma_v4_0_load_microcode(struct amdgpu_device *adev)
                amdgpu_ucode_print_sdma_hdr(&hdr->header);
                fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
 
-               version_major = le16_to_cpu(hdr->header.header_version_major);
-               version_minor = le16_to_cpu(hdr->header.header_version_minor);
-
-               if (version_major == 1 && version_minor >= 1) {
-                       const struct sdma_firmware_header_v1_1 *sdma_v1_1_hdr = (const struct sdma_firmware_header_v1_1 *) hdr;
-                       digest_size = le32_to_cpu(sdma_v1_1_hdr->digest_size);
-               }
-
-               fw_size -= digest_size;
-
                fw_data = (const __le32 *)
                        (adev->sdma.instance[i].fw->data +
                                le32_to_cpu(hdr->header.ucode_array_offset_bytes));
 
                WREG32(sdma_v4_0_get_reg_offset(i, mmSDMA0_UCODE_ADDR), 0);
 
-
                for (j = 0; j < fw_size; j++)
                        WREG32(sdma_v4_0_get_reg_offset(i, mmSDMA0_UCODE_DATA), le32_to_cpup(fw_data++));