AMD-GFX Archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix sdma firmware version error in sriov
@ 2021-05-31  9:33 Kevin Wang
  2021-06-01  3:23 ` 回复: " Yang, Stanley
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wang @ 2021-05-31  9:33 UTC (permalink / raw
  To: amd-gfx; +Cc: Kevin Wang, stanley.yang, frank.min

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

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index deb907f96090..98059bce692f 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -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");
 
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* 回复: [PATCH] drm/amdgpu: fix sdma firmware version error in sriov
  2021-05-31  9:33 [PATCH] drm/amdgpu: fix sdma firmware version error in sriov Kevin Wang
@ 2021-06-01  3:23 ` Yang, Stanley
  0 siblings, 0 replies; 2+ messages in thread
From: Yang, Stanley @ 2021-06-01  3:23 UTC (permalink / raw
  To: Wang, Kevin(Yang), amd-gfx@lists.freedesktop.org; +Cc: frank.min@amd.ccom

[AMD Official Use Only]

Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com>

Regards,
Stanley
> -----邮件原件-----
> 发件人: Wang, Kevin(Yang) <Kevin1.Wang@amd.com>
> 发送时间: Monday, May 31, 2021 5:33 PM
> 收件人: amd-gfx@lists.freedesktop.org
> 抄送: frank.min@amd.ccom; Yang, Stanley <Stanley.Yang@amd.com>; Wang,
> Kevin(Yang) <Kevin1.Wang@amd.com>
> 主题: [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)
> 
> Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> index deb907f96090..98059bce692f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> @@ -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");
> 
> --
> 2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-01  3:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31  9:33 [PATCH] drm/amdgpu: fix sdma firmware version error in sriov Kevin Wang
2021-06-01  3:23 ` 回复: " Yang, Stanley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).