From: Felix Kuehling <[email protected]>

Set the physical pod configuration to PSP in the commit store callback.

Signed-off-by: Felix Kuehling <[email protected]>
Reviewed-by: Mukul Joshi <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
index 41d39f828dfec..6fd1238a50691 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
@@ -430,13 +430,19 @@ static ssize_t ualink_ppod_setup_commit_store(struct 
kobject *kobj,
        struct device *dev = kobj_to_dev(info->kobj.parent);
        struct drm_device *ddev = dev_get_drvdata(dev);
        struct amdgpu_device *adev = drm_to_adev(ddev);
+       int r;
 
        if (!sysfs_streq(buf, "true"))
                return -EINVAL;
 
-       /* TODO: Send configuration to ASP */
+       r = psp_ual_set_ppod_config(&adev->psp, adev->ualink.psp_if_ver,
+                                   setup);
+       if (r)
+               return r;
+       r = psp_ual_query_info(&adev->psp, adev->ualink.psp_if_ver, info);
+       if (r)
+               return r;
 
-       info->ppod = setup->ppod;
        info->accel_state = check_ppod_state(adev, setup);
 
        /* TODO: If accel_state was ACTIVE, reset all connections */
-- 
2.55.0

Reply via email to