Skip to contentSkip to conversation

drm/amdgpu/display: fix DMUB firmware version info

PATCH In review Shirish S 2 participants 2 messages Aug 3, 2021

Subsystems (3)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 drm/amdgpu/display: fix DMUB firmware version info

DMUB firmware info is printed before it gets initialized. Correct this order to ensure true value is conveyed.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 7e09b6d26a51..396a2dca2fe0 100644
@@ -1548,6 +1548,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
 	}
 
 	hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data;
+	adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
 
 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
 		adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id =
@@ -1561,7 +1562,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
 			 adev->dm.dmcub_fw_version);
 	}
 
-	adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
 
 	adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL);
 	dmub_srv = adev->dm.dmub_srv;
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

________________________________
From: S, Shirish <[email protected]>
Sent: Tuesday, August 3, 2021 4:42 AM
To: Wentland, Harry <[email protected]>; Kazlauskas, Nicholas <[email protected]>; Deucher, Alexander <[email protected]>
Cc: [email protected] <[email protected]>; S, Shirish <[email protected]>
Subject: [PATCH] drm/amdgpu/display: fix DMUB firmware version info

DMUB firmware info is printed before it gets initialized. Correct this order to ensure true value is conveyed.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 7e09b6d26a51..396a2dca2fe0 100644
@@ -1548,6 +1548,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
         }
 
         hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data;
+       adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
 
         if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
                 adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id =
@@ -1561,7 +1562,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
                          adev->dm.dmcub_fw_version);
         }
 
-       adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
 
         adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL);
         dmub_srv = adev->dm.dmub_srv;

--
2.17.1