Skip to contentSkip to conversation

drm/amdgpu: fix sdma firmware version error in sriov

PATCH In review Kevin Wang 2 participants 2 messages May 31, 2021 – Jun 1, 2021

Subsystems (2)
lore
Share & tools
lore

Kevin Wang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix sdma firmware version error in sriov

Re-adjust the function return order to avoid empty sdma version in the sriov environment. (read amdgpu_firmware_info)

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +3 -3
index deb907f96090..98059bce692f 100644
@@ -147,9 +147,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
 	struct amdgpu_firmware_info *info = NULL;
 	const struct common_firmware_header *header = NULL;
 
-	if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_SIENNA_CICHLID))
-		return 0;
-
 	DRM_DEBUG("\n");
 
 	switch (adev->asic_type) {
@@ -187,6 +184,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
 		       (void *)&adev->sdma.instance[0],
 		       sizeof(struct amdgpu_sdma_instance));
 
+	if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_SIENNA_CICHLID))
+		return 0;
+
 	DRM_DEBUG("psp_load == '%s'\n",
 		  adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

Regards,
Stanley

Quoted 46 lines

-----邮件原件-----
发件人: Wang, Kevin(Yang) <[email protected]>
发送时间: Monday, May 31, 2021 5:33 PM
收件人: [email protected]
抄送: [email protected]; Yang, Stanley <[email protected]>; Wang, Kevin(Yang) <[email protected]>
主题: [PATCH] drm/amdgpu: fix sdma firmware version error in sriov

Re-adjust the function return order to avoid empty sdma version in the sriov environment. (read amdgpu_firmware_info)

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0 -3
index deb907f96090..98059bce692f 100644
@@ -147,9 +147,6 @@ static int sdma_v5_2_init_microcode(struct
 amdgpu_device *adev)
 	struct amdgpu_firmware_info *info = NULL;
 	const struct common_firmware_header *header = NULL;
 
-	if (amdgpu_sriov_vf(adev) && (adev->asic_type ==
 CHIP_SIENNA_CICHLID))
-		return 0;
-
 	DRM_DEBUG("\n");
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +3 -0
 	switch (adev->asic_type) {
@@ -187,6 +184,9 @@ static int sdma_v5_2_init_microcode(struct
 amdgpu_device *adev)
 		       (void *)&adev->sdma.instance[0],
 		       sizeof(struct amdgpu_sdma_instance));
 
+	if (amdgpu_sriov_vf(adev) && (adev->asic_type ==
 CHIP_SIENNA_CICHLID))
+		return 0;
+
 	DRM_DEBUG("psp_load == '%s'\n",

adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ?
"true" : "false");

Quoted 2 lines

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx