[PATCH 13/95] drm/amdgpu: Set virtual pod configuration to PSP
Alex Deucher <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
From: Felix Kuehling <[email protected]> Set the virtual 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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c index 706e4effb1a8d..b25f61f223ca7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c @@ -681,6 +681,7 @@ static ssize_t ualink_vpod_config_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; @@ -689,10 +690,13 @@ static ssize_t ualink_vpod_config_commit_store(struct kobject *kobj, return -EINVAL; } - /* TODO: instead of just copying the info, call ASP vpod config API - * and query ASP for the updated info - */ - info->vpod = config->vpod; + r = psp_ual_set_vpod_config(&adev->psp, adev->ualink.psp_if_ver, + config); + if (r) + return r; + r = psp_ual_query_info(&adev->psp, adev->ualink.psp_if_ver, info); + if (r) + return r; /* The integrity check makes sure each new GPU is consistent with the * other GPUs already in the vPod. All known local GPUs can become -- 2.55.0