Looks like this can be handled during post_init. It will be called as smu_post_init() happening during late_init part of smu block. You can check vangogh or navi examples on how to add your implementation.
Thanks,
Lijo
From: Liu, Shaoyun <Shaoyun.Liu@xxxxxxx>
Sent: Friday, March 12, 2021 8:57 PM
To: Lazar, Lijo <Lijo.Lazar@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Quan, Evan <Evan.Quan@xxxxxxx>; Zhang, Hawking <Hawking.Zhang@xxxxxxx>
Subject: RE: [PATCH] drm/amdgpu: Enable light SBR in XGMI+passthrough configuration
I don’t like to add this set_light_sbr into ppt_funcs either , but please check current swsmu code structure , there is no asic specific swsmu late init function and there is no direct routine form amdgpu_smu.c to smu_v11_0.c either
. It requires smu common code ->ppt_func -> smu_v11_0 for Arcturus specific function . So unless SMU and PPT have a major re-structure , set_light_sbr need to go through ppt_func for now, I think I better leave this re-structure task to SMU and PPT
owner in the future .
Add SMU and PPT code owner Hawking and Quan for comments .
Regards
Shaoyun.liu
We want to keep ppt_funcs minimal. Adding everything to ppt_funcs and keeping as NULL is not the right way. Please keep the code to arcturus.
Thanks,
Lijo
Thanks for the comments. This light sbr solution could be applied to other asic as well. In swsmu code, It will check whether the function pointer set_light_sbr is valid before real call the function. So for other asics if the smu apply
the same change, just add the ppt function pointer and we will have this support without further code change.
[AMD Public Use]
We don't need this as a generic ppt_func. Reset functionalities are changing over programs and this could be valid only for Arcturus. Please move it to Arcturus swsmu late init.
Thanks,
Lijo
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of shaoyunl
Sent: Thursday, March 11, 2021 10:46 PM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Liu, Shaoyun <Shaoyun.Liu@xxxxxxx>
Subject: [PATCH] drm/amdgpu: Enable light SBR in XGMI+passthrough configuration
This is to fix the commit dda9bbb26c7 where it only enable the light SMU on normal device init. This feature actually need to be enabled after ASIC been reset as well.
Signed-off-by: shaoyunl <shaoyun.liu@xxxxxxx>
Change-Id: Ie7ee02cd3ccdab3522aad9a02f681963e211ed44
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index cada3e77c7d5..fb775a9c0db1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2513,6 +2513,9 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
if (r)
DRM_ERROR("enable mgpu fan boost failed (%d).\n", r);
+ /* For XGMI + passthrough configuration , enable light SBR */
+ if (amdgpu_passthrough(adev) && adev->gmc.xgmi.num_physical_nodes > 1)
+ smu_set_light_sbr(&adev->smu, true);
if (adev->gmc.xgmi.num_physical_nodes > 1) {
mutex_lock(&mgpu_info.mutex);
@@ -3615,10 +3618,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (amdgpu_device_cache_pci_state(adev->pdev))
pci_restore_state(pdev);
- /* Enable lightSBR on SMU in passthrough + xgmi configuration */
- if (amdgpu_passthrough(adev) && adev->gmc.xgmi.num_physical_nodes > 1)
- smu_set_light_sbr(&adev->smu, true);
-
if (adev->gmc.xgmi.pending_reset)
queue_delayed_work(system_wq, &mgpu_info.delayed_reset_work,
msecs_to_jiffies(AMDGPU_RESUME_MS));
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://nam11.safelinks.protection.outlook.com/?url="">
|