Commit cfa2104f authored by Jammy Zhou's avatar Jammy Zhou Committed by Alex Deucher

drm/amdgpu: add feature version for SDMA ucode

Signed-off-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
parent 351643d7
...@@ -1642,6 +1642,7 @@ struct amdgpu_sdma { ...@@ -1642,6 +1642,7 @@ struct amdgpu_sdma {
/* SDMA firmware */ /* SDMA firmware */
const struct firmware *fw; const struct firmware *fw;
uint32_t fw_version; uint32_t fw_version;
uint32_t feature_version;
struct amdgpu_ring ring; struct amdgpu_ring ring;
}; };
......
...@@ -337,7 +337,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file ...@@ -337,7 +337,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
if (info->query_fw.index >= 2) if (info->query_fw.index >= 2)
return -EINVAL; return -EINVAL;
fw_info.ver = adev->sdma[info->query_fw.index].fw_version; fw_info.ver = adev->sdma[info->query_fw.index].fw_version;
fw_info.feature = 0; fw_info.feature = adev->sdma[info->query_fw.index].feature_version;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
...@@ -500,6 +500,7 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev) ...@@ -500,6 +500,7 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev)
amdgpu_ucode_print_sdma_hdr(&hdr->header); amdgpu_ucode_print_sdma_hdr(&hdr->header);
fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
fw_data = (const __le32 *) fw_data = (const __le32 *)
(adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes)); (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0); WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0);
......
...@@ -542,6 +542,7 @@ static int sdma_v2_4_load_microcode(struct amdgpu_device *adev) ...@@ -542,6 +542,7 @@ static int sdma_v2_4_load_microcode(struct amdgpu_device *adev)
amdgpu_ucode_print_sdma_hdr(&hdr->header); amdgpu_ucode_print_sdma_hdr(&hdr->header);
fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
fw_data = (const __le32 *) fw_data = (const __le32 *)
(adev->sdma[i].fw->data + (adev->sdma[i].fw->data +
......
...@@ -631,6 +631,7 @@ static int sdma_v3_0_load_microcode(struct amdgpu_device *adev) ...@@ -631,6 +631,7 @@ static int sdma_v3_0_load_microcode(struct amdgpu_device *adev)
amdgpu_ucode_print_sdma_hdr(&hdr->header); amdgpu_ucode_print_sdma_hdr(&hdr->header);
fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
fw_data = (const __le32 *) fw_data = (const __le32 *)
(adev->sdma[i].fw->data + (adev->sdma[i].fw->data +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment