[PATCH 1/2] drm/amd/display: Add DMCU firmware version

David Francis David.Francis at amd.com
Thu Sep 13 19:45:13 UTC 2018


Read the version number from the common firmware header and store
it in the dm struct

Signed-off-by: David Francis <David.Francis at amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f0ae11802e9a..d21d738c8356 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -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;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
index 9a57c654943a..b6fe9adf4b93 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -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 {
-- 
2.17.1



More information about the amd-gfx mailing list