diff options
author | Jammy Zhou <Jammy.Zhou@amd.com> | 2015-08-03 22:50:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 14:26:50 -0400 |
commit | cfa2104fbcb87ab0abbdaba608087df1e24fe195 (patch) | |
tree | 27fd56e55ff791058d7fdb829de69dd8adac388b /drivers/gpu/drm/amd | |
parent | 351643d7dd8a48b1053aac5fe3a1aebac614c301 (diff) |
drm/amdgpu: add feature version for SDMA ucode
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 |
5 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 8db642b5abb2..f7b49d5ce4b8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1642,6 +1642,7 @@ struct amdgpu_sdma { | |||
1642 | /* SDMA firmware */ | 1642 | /* SDMA firmware */ |
1643 | const struct firmware *fw; | 1643 | const struct firmware *fw; |
1644 | uint32_t fw_version; | 1644 | uint32_t fw_version; |
1645 | uint32_t feature_version; | ||
1645 | 1646 | ||
1646 | struct amdgpu_ring ring; | 1647 | struct amdgpu_ring ring; |
1647 | }; | 1648 | }; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 79eba82defed..3bfe67de8349 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -337,7 +337,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | |||
337 | if (info->query_fw.index >= 2) | 337 | if (info->query_fw.index >= 2) |
338 | return -EINVAL; | 338 | return -EINVAL; |
339 | fw_info.ver = adev->sdma[info->query_fw.index].fw_version; | 339 | fw_info.ver = adev->sdma[info->query_fw.index].fw_version; |
340 | fw_info.feature = 0; | 340 | fw_info.feature = adev->sdma[info->query_fw.index].feature_version; |
341 | break; | 341 | break; |
342 | default: | 342 | default: |
343 | return -EINVAL; | 343 | return -EINVAL; |
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index ab83cc1ca4cc..15df46c93f0a 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |||
@@ -500,6 +500,7 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev) | |||
500 | amdgpu_ucode_print_sdma_hdr(&hdr->header); | 500 | amdgpu_ucode_print_sdma_hdr(&hdr->header); |
501 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; | 501 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; |
502 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); | 502 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); |
503 | adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); | ||
503 | fw_data = (const __le32 *) | 504 | fw_data = (const __le32 *) |
504 | (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes)); | 505 | (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes)); |
505 | WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0); | 506 | WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0); |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c index d7895885fe0c..01bd5c903f9b 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | |||
@@ -542,6 +542,7 @@ static int sdma_v2_4_load_microcode(struct amdgpu_device *adev) | |||
542 | amdgpu_ucode_print_sdma_hdr(&hdr->header); | 542 | amdgpu_ucode_print_sdma_hdr(&hdr->header); |
543 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; | 543 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; |
544 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); | 544 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); |
545 | adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); | ||
545 | 546 | ||
546 | fw_data = (const __le32 *) | 547 | fw_data = (const __le32 *) |
547 | (adev->sdma[i].fw->data + | 548 | (adev->sdma[i].fw->data + |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 7bb37b93993f..cf9bc2e126fc 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | |||
@@ -631,6 +631,7 @@ static int sdma_v3_0_load_microcode(struct amdgpu_device *adev) | |||
631 | amdgpu_ucode_print_sdma_hdr(&hdr->header); | 631 | amdgpu_ucode_print_sdma_hdr(&hdr->header); |
632 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; | 632 | fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; |
633 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); | 633 | adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); |
634 | adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); | ||
634 | 635 | ||
635 | fw_data = (const __le32 *) | 636 | fw_data = (const __le32 *) |
636 | (adev->sdma[i].fw->data + | 637 | (adev->sdma[i].fw->data + |