Skip to contentSkip to conversation

drm/amdgpu/sriov move program of sq_config to PF

PATCH In review Jack Zhang 3 participants 4 messages Apr 8, 2020 – Apr 9, 2020

Subsystems (2)
lore
Share & tools
lore

Jack Zhang

author
#0 lore raw

PATCH 1/1 drm/amdgpu/sriov move program of sq_config to PF

Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. Therefore, program of SQ_CONFIG need to be moved to PF under siov. Skip it here in guest driver.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
index 2d56b067..9bb89f2 100644
@@ -2575,7 +2575,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)
 
 	gfx_v9_0_init_compute_vmid(adev);
 	gfx_v9_0_init_gds_vmid(adev);
-	gfx_v9_0_init_sq_config(adev);
+	if (!amdgpu_sriov_vf(adev))
+		gfx_v9_0_init_sq_config(adev);
 }
 
 static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
Signature · 6 lines
2.7.4

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

-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Wednesday, April 8, 2020 6:34 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov move program of sq_config to PF

Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. Therefore, program of SQ_CONFIG need to be moved to PF under siov. Skip it here in guest driver.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
index 2d56b067..9bb89f2 100644
@@ -2575,7 +2575,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)
 
 	gfx_v9_0_init_compute_vmid(adev);
 	gfx_v9_0_init_gds_vmid(adev);
-	gfx_v9_0_init_sq_config(adev);
+	if (!amdgpu_sriov_vf(adev))
+		gfx_v9_0_init_sq_config(adev);
 }
 
 static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)

--
2.7.4

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

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Jack Zhang

[AMD Public Use]

________________________________
From: amd-gfx <[email protected]> on behalf of Jack Zhang <[email protected]>
Sent: Wednesday, April 8, 2020 6:33 AM
To: [email protected] <[email protected]>
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov move program of sq_config to PF

Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. Therefore, program of SQ_CONFIG need to be moved to PF under siov. Skip it here in guest driver.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
index 2d56b067..9bb89f2 100644
@@ -2575,7 +2575,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)
 
         gfx_v9_0_init_compute_vmid(adev);
         gfx_v9_0_init_gds_vmid(adev);
-       gfx_v9_0_init_sq_config(adev);
+       if (!amdgpu_sriov_vf(adev))
+               gfx_v9_0_init_sq_config(adev);
 }
 
 static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C38604ab03f8142a547f808d7dba854d4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637219388971131150&amp;sdata=gBSa%2BchPmFMSaTgAq8z5Sabs3G6ARuHN8wAPSi%2FoJqA%3D&amp;reserved=0

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

#3 lore raw

Am 2020-04-08 um 9:27 a.m. schrieb Deucher, Alexander:

Quoted 5 lines

[AMD Public Use]

Quoted 11 lines

------------------------------------------------------------------------
*From:* amd-gfx <[email protected]> on behalf of Jack Zhang <[email protected]>
*Sent:* Wednesday, April 8, 2020 6:33 AM
*To:* [email protected] <[email protected]> *Cc:* Zhang, Jack (Jian) <[email protected]>
*Subject:* [PATCH] drm/amdgpu/sriov move program of sq_config to PF
Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. Therefore, program of SQ_CONFIG need to be moved to PF under siov. Skip it here in guest driver.

We'll need to change this register when the debugger enables address watch. If this setting is global across VFs, it will be a problem. Can this be saved and restored on world-switch so that each VF has its own setting? Then you could allow changing it in the VF.

Otherwise we will not be able to enable the address watch feature in the debugger under virtualization.

Regards,
  Felix

Quoted 14 lines

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index 2d56b067..9bb89f2 100644
@@ -2575,7 +2575,8 @@ static void gfx_v9_0_constants_init(struct
 amdgpu_device *adev)

Quoted 21 lines

         gfx_v9_0_init_compute_vmid(adev); gfx_v9_0_init_gds_vmid(adev);
-       gfx_v9_0_init_sq_config(adev);
+       if (!amdgpu_sriov_vf(adev))
+               gfx_v9_0_init_sq_config(adev);
 }

 static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)

Signature · 12 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C38604ab03f8142a547f808d7dba854d4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637219388971131150&amp;sdata=gBSa%2BchPmFMSaTgAq8z5Sabs3G6ARuHN8wAPSi%2FoJqA%3D&amp;reserved=0
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cfelix.kuehling%40amd.com%7Cda6c5ebaaf6c4f1619f108d7dbc08d98%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637219493056058157&sdata=MAhOm9usqEEnTCO1XMxteWqFHMnlOeDG0V93sA%2BhE%2Bo%3D&reserved=0>

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cfelix.kuehling%40amd.com%7Cda6c5ebaaf6c4f1619f108d7dbc08d98%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637219493056078139&amp;sdata=HCjruFYRNoF4bWVTCgwuxqk0h3dnxP%2FJBsq6%2Flr%2FFXw%3D&amp;reserved=0

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