drm/amd/display: Add DMCU firmware version
authorDavid Francis <David.Francis@amd.com>
Thu, 13 Sep 2018 19:36:27 +0000 (15:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Sep 2018 14:37:35 +0000 (09:37 -0500)
Read the version number from the common firmware header and store
it in the dm struct

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

index 1ff2e8fd5a22774bf900564add7be9f76ecbd747..985c6291dbfd1415c5b836fa0625b8385b72cf1c 100644 (file)
@@ -589,6 +589,8 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
        adev->firmware.fw_size +=
                ALIGN(le32_to_cpu(hdr->intv_size_bytes), PAGE_SIZE);
 
+       adev->dm.dmcu_fw_version = le32_to_cpu(hdr->header.ucode_version);
+
        DRM_DEBUG_KMS("PSP loading DMCU firmware\n");
 
        return 0;
index 9a57c654943ae389f27b6fca7578c90051bc68c1..b6fe9adf4b932ef22339ac1398fbe3a70c8b42a7 100644 (file)
@@ -131,6 +131,7 @@ struct amdgpu_display_manager {
        struct dm_comressor_info compressor;
 
        const struct firmware *fw_dmcu;
+       uint32_t dmcu_fw_version;
 };
 
 struct amdgpu_dm_connector {