Skip to contentSkip to conversation

drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue

PATCH In review Trigger Huang 4 participants 4 messages Apr 10, 2017 – Apr 11, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue

In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, there is no actual firmware data, but we still need alloc a BO and tell the BO's mc address to HW, or world switch will hang on VFs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -1
index a1891c9..b7307b0 100644
@@ -383,7 +383,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
 	 * ucode info here
 	 */
 	if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
-		adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4;
+		adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 3;
 	else
 		adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 6 lines · Trigger Huang

In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, there is no actual firmware data, but we still need alloc a BO and tell the BO's mc address to HW, or world switch will hang on VFs.

---

Quoted 18 lines
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/ renamed from drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0 -0

amdgpu/amdgpu_ucode.c
index a1891c9..b7307b0 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -2
@@ -383,7 +383,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
          * ucode info here
          */
         if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
-               adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4;
+               adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 3;
         else
                 adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM;
 
--
Quoted 2 lines

2.7.4

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

Reviewed-by Xiangliang Yu
#4 lore raw
In reply to a message not in the archive
Quoted 36 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Trigger Huang
Sent: Monday, April 10, 2017 2:46 PM
To: [email protected]
Cc: Huang, Ray <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue

In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, there is no actual firmware data, but we still need alloc a BO and tell the BO's mc address to HW, or world switch will hang on VFs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -1
index a1891c9..b7307b0 100644
@@ -383,7 +383,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device
 *adev)
 	 * ucode info here
 	 */
 	if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
-		adev->firmware.max_ucodes =
 AMDGPU_UCODE_ID_MAXIMUM - 4;
+		adev->firmware.max_ucodes =
 AMDGPU_UCODE_ID_MAXIMUM - 3;
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0 -0
 	else
 		adev->firmware.max_ucodes =

AMDGPU_UCODE_ID_MAXIMUM;

Quoted 7 lines

--
2.7.4

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

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

Reviewed-by Monk Liu Acked-by Huang Rui
#3 lore raw
In reply to Huang Rui

Don't change bare-metal logic, so please use amdgpu_sriov_vf() to differentiate -4 or -4 for the ID_MAXIMUM

With that addressed, this patch is :

-----邮件原件-----
发件人: amd-gfx [mailto:[email protected]] 代表 Huang Rui 发送时间: Monday, April 10, 2017 2:52 PM
收件人: Huang, Trigger <[email protected]>
抄送: [email protected]
主题: Re: [PATCH] drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue

Quoted 6 lines · Trigger Huang

In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, there is no actual firmware data, but we still need alloc a BO and tell the BO's mc address to HW, or world switch will hang on VFs.

---

Quoted 19 lines
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/ amdgpu/amdgpu_ucode.c index a1891c9..b7307b0 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2 -2
@@ -383,7 +383,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
          * ucode info here
          */
         if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
-               adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4;
+               adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 
+ 3;
         else
                 adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM;
 
--
Quoted 2 lines

2.7.4

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