History

drm/amdgpu: add feature version for SDMA ucode

Jammy Zhou committed 11 years ago

Commit cfa21041 parent 351643d5 files · +5 −1Browse files

Unified · Split

5 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 −0
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 −1
  3. drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 −0
  4. drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +1 −0
  5. drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 −0
drivers/gpu/drm/amd/amdgpu/amdgpu.h+1−0
@@ -1642,6 +1642,7 @@ struct amdgpu_sdma { · 1641 unmodified lines
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};
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c+1−1
@@ -337,7 +337,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file · 336 unmodified lines
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;
drivers/gpu/drm/amd/amdgpu/cik_sdma.c+1−0
@@ -500,6 +500,7 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev) · 499 unmodified lines
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);
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c+1−0
@@ -542,6 +542,7 @@ static int sdma_v2_4_load_microcode(struct amdgpu_device *adev) · 541 unmodified lines
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 +
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c+1−0
@@ -631,6 +631,7 @@ static int sdma_v3_0_load_microcode(struct amdgpu_device *adev) · 630 unmodified lines
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 +